Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@ Please see the
[Guest Science Resources](https://www.nasa.gov/content/guest-science-resources)
page for information on guest science capabilities on Astrobee.

## Prerequisites

Before building the Astrobee Android project, ensure your system meets the following requirements:

- **Operating System**: Ubuntu 16.04 (Xenial Xerus) is needed for compatibility with `ros-kinetic-rosjava` dependencies.
- Ubuntu 16.04 support will soon be phased out as we migrate to Ubuntu 20.04
- `rosjava` has not yet been released for ROS Noetic on Ubuntu 20.04, so `ros-kinetic-rosjava` needs to be built from source. [ROS Wiki Source Installation Instructions](http://wiki.ros.org/rosjava/Tutorials/kinetic/Source%20Installation).
- Currently there are [dependency conflicts](https://github.com/nasa/astrobee_android/issues/44) when using `ros-kinetic-rosjava` with ROS Noetic on Ubuntu 20.04.
- **Android Studio**: Use version 3.6.3, which is compatible with the project's Gradle 3.3. Download from the [Android Studio archive](https://developer.android.com/studio/archive).
- **Java JDK**: Install Java JDK 8 for compatibility with the project's Gradle version. Download from the [Oracle website](https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html).

Ensure these tools and dependencies are installed and configured before attempting to build the Astrobee Android project.

## License

Copyright (c) 2017, United States Government, as represented by the
Expand Down
40 changes: 27 additions & 13 deletions creating_gs_app.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
# Creating a Guest Science Application

This readme assumes you have followed the
[Guest Science Developer Guide](gs_developer_guide.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`.

Astrobee has two major libraries for Guest Science developers: the Astrobee API
and the Guest Science Library. It is important for a Guest Scientist to
understand what these libraries do. Please see the About sections in the
Expand All @@ -29,11 +22,32 @@ to put it, we have created a `guest_science_projects` folder for you to use.
Please note, you don't have to use this directory and can store your project
anywhere on your computer.

## Environement Variables
This readme assumes you have followed the
[Guest Science Developer Guide](gs_developer_guide.md), where the [`astrobee_android`](https://github.com/nasa/astrobee_android.git)
repository was cloned and an environment variable `$ANDROID_PATH` was defined:

you@machine:~ $ export ANDROID_PATH=$HOME/astrobee_android

This readme also assumes that the [Astrobee ROS repository](https://github.com/nasa/astrobee.git) was cloned
and built using the [Astrobee Robot Software installation instructions](https://nasa.github.io/astrobee/v/develop/index.html):

you@machine:~ $ export BUILD_PATH=$HOME/astrobee

## Setup

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`](https://github.com/nasa/astrobee/blob/master/simulation/sim_overview.md#setting-up-your-environment).
In every terminal you use, be sure to set up your environment. Refer to the [Simulator Instructions](https://github.com/nasa/astrobee/blob/master/simulation/running_the_sim.md) found in the [`astrobee`](https://github.com/nasa/astrobee.git) repository.

pushd $BUILD_PATH
source devel/setup.bash
popd

or for a Zsh session

pushd $BUILD_PATH
source devel/setup.zsh
popd


## Build the Astrobee API

Expand All @@ -45,7 +59,7 @@ Ensure `rosjava` is installed:

Build the ff_msgs jar

you@machine:~ $ cd $BUILD_PATH
you@machine:~ $ cd $BUILD_PATH/build/ff_msgs
you@machine:native $ make rebuild_cache
you@machine:native $ make ff_msgs_generate_messages_java_gradle

Expand All @@ -59,10 +73,10 @@ rosjava generated files into the right location:

you@machine:~ $ mkdir -p $HOME/.m2
you@machine:.m2 $ cd $HOME/.m2
you@machine:.m2 $ ln -s $BUILD_PATH/devel/share/maven repository
you@machine:.m2 $ ln -s $BUILD_PATH/devel/.private/ff_msgs/share/maven repository

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this did not change, it's still devel/share/maven

this runs frequently and uses it..
https://github.com/nasa/isaac/blob/v0.2.6/scripts/docker/build_apk.Dockerfile#L46

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At some point when I was trying to get this to work I didn't have /maven in my /devel/share directory. I will have to retrace my steps to figure out why. I have developed a guest science app that logs coordinates from the simulator using the other path so it's a functional alternative for now.


Otherwise you will have to copy the contents of the maven directory out
of `devel/shared` into `$HOME/.m2/repository`.
of `/share` into `$HOME/.m2/repository`.

### Building the JAR Files

Expand Down
4 changes: 2 additions & 2 deletions running_gs_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ 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
you@machine:guest_science_manager $ adb install -g -r 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.
Expand All @@ -49,7 +49,7 @@ 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
you@machine:guest_science_manager $ adb install -g -r 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.
Expand Down