This readme assumes you have followed the
Guest Science Developer Guide and the
freeflyer/simulation/sim_overview.md.
It also assumes that freeflyer_android is checked out in $ANDROID_PATH,
freeflyer is checked out in $SOURCE_PATH, and you are building in
$BUILD_PATH.
This readme teaches you how to run a Guest Science Application by running one of the Guest Science examples. Once you have your own Guest Science Application, it should be trival to use these instructions and replace the example name with your project's name. Please follow all four sections. However, if you are doing Java only development, please use the Java only subsections and if you are using the emulator or HLP board, please use the Android subsections.
In every terminal you use, be sure to set up your environment. If you forgot how
to do this, follow the Setting up your Environment section of the
freeflyer/simulation/sim_overview.md.
Coming soon!!!
Please start your emulator or HLP board and make sure you can communicate with it (adb and network i.e. ping). Please refer to the emulator or the HLP board instructions if you forget how to do this.
you@machine:~ $ cd $ANDROID_PATH/core_apks/guest_science_manager
you@machine:guest_science_manager $ ANDROID_HOME=$HOME/Android/Sdk ./gradlew assembleDebug
you@machine:guest_science_manager $ adb install -gr activity/build/outputs/apk/activity-debug.apk
Important Please make sure to type the g before r. If you don't, Android
will not grant the APK the right permissions and the APK will fail to excute.
You will be running the test simple trajectory example. This example undocks the Astrobee and then moves it in a rectangular shape.
you@machine:~ $ cd $ANDROID_PATH/gs_examples/test_simple_trajectory
you@machine:guest_science_manager $ ANDROID_HOME=$HOME/Android/Sdk ./gradlew assembleDebug
you@machine:guest_science_manager $ adb install -gr app/build/outputs/apk/app-debug.apk
Important Please make sure to type the g before r. If you don't, Android
will not grant the APK the right permissions and the APK will fail to excute.
Please open two terminals and do the following in both terminals:
you@machine:~ $ export ROS_IP=$(getent hosts llp | awk '{ print $1 }')
you@machine:~ $ export ROS_MASTER_URI=http://${ROS_IP}:11311
you@machine:~ $ echo $ROS_IP
Ensure you can ping/connect to the ip echoed.
When you get to section 2 (Run the Simulator), use terminal 1. When you get to section 4 (Guest Science Commanding), use terminal 2.
Please start the simulator. If you forgot how to do this, follow the Running
the Simulator section of the
freeflyer/simulation/sim_overview.md.
Coming soon!!!
you@machine:~ $ ./$ANDROID_PATH/scripts/gs_manager.sh start
you@machine:~ $ cd $SOURCE_PATH/tools/gds_helper/
you@machine:gds_helper $ python gds_simulator.py
The GDS simulator is interactive. It will prompted you for the next step.
- Press any key to grab control
- Select the Guest Science Application (GSA) you are trying to run
- Type
band pressEnterto start the GSA - Press
Enterto stop listening for data - Press any key to get back to the application menu
If you want to see the robot move, command it to do so:
- Type
dand pressEnterto send a custom guest science command - Type
1and pressEnterto run the trajectory
Now Astrobee will undock and move in a rectangle.
In the terminal running the GDS simulator, please do the following:
- If needed, press
Enterto stop listening for data - If needed, press any key to get back to the application menu
- Type
cand pressEnterto stop the GSA - Press
Enterto stop listening for data - Press any key to get back to the application menu
- Type
faad pressEnterto exit the GDS simulator
In the terminal running the simulator, enter Ctrl+c
Coming soon!!!
you@machine:~ $ ./$ANDROID_PATH/scripts/gs_manager.sh hard_stop
To close the emulator, click on the x symbol.