ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Any up-to-date tutorial/instructions to setup rosjava in Android-Studio?

asked 2016-08-16 10:19:38 -0600

al gravatar image

I find it difficult to setup the libraries to use rosjava from an android application. the information available at wiki.ros.org refers to a bunch of pages on rosjava an related stuff, but they seem to be out-of-date, with many broken links or inaccurate descriptions.

For android development I use a windows computer with android-studio. So I would like to setup the libraries on this system too, intended for android development only, and provided that I use the predefined ros message types.

I would appreciate it a lot if anyone who has recently set up the rosjava in android-studio could give us some help and accurate descriptions on how to proceed to get the rosjava api accessible from an android app in android-studio.

thank you in advance

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-08-28 15:13:54 -0600

SebTuT gravatar image

I recently build it for Ubuntu 14.04 and summarized the steps. In case you do not want to use Ubuntu 14.04 you will probably have to build most of the packages named in the following by yourself:

  1. Download and install the latest Android Studio from Google. Make sure to install the required SDK Build Tools and adjust the environment variables according to: http://wiki.ros.org/android/Android%2...
  2. Download and install ros-indigo according to: http://wiki.ros.org/indigo/Installati... .
  3. Download and build the core sources of rosjava following the steps described at: http://wiki.ros.org/rosjava/Tutorials... (Steps 3.2 and 3.3 can be omitted).
  4. Download and build the core android libraries and import them to Android Studio (there's an example app available) according to: http://wiki.ros.org/android/Tutorials...
  5. Start developing new ros-android apps.

If you want to stick with Windows or in general want to skip the source installation of rosjava it is probably the most suitable and easiest way to use the dependencies from the maven repositories in your *.gradle build file in Android Studio:

repositories { maven { url 'https://github.com/me/myjava_mvn_repo/raw/master' } }

edit flag offensive delete link more

Comments

1

+1 to the "add the dependencies from the Maven repositories to your gradle build file": that is a really 'light-weight' way to write rosjava programs on Windows, and requires almost nothing of the ROS infrastructure to be present on the development machine.

gvdhoorn gravatar image gvdhoorn  ( 2016-08-29 05:38:13 -0600 )edit

Thank you for your comments and links! I opted for setting up the android-studio in windows by using the maven repository. I managed to create a simple rosjava android app from scratch. I am preparing a detailed tutorial that I will post here, so that beginners can face the typical issues.

al gravatar image al  ( 2016-08-31 04:08:22 -0600 )edit

@al: if you feel @SebTuT answered your question, could you please mark the question as answered by ticking the checkmark to the left of the answer? Thanks.

gvdhoorn gravatar image gvdhoorn  ( 2016-08-31 04:34:39 -0600 )edit
1

this links show some details of what I did: https://github.com/irvs/ros_tms/wiki/...

al gravatar image al  ( 2016-09-01 08:49:53 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-08-16 10:19:38 -0600

Seen: 1,606 times

Last updated: Aug 28 '16