Monday, May 30, 2011

rosjava setup on Fedora 15

After the announcement of the rosjava stack for android devices, I decided to bite the bullet and finally familiarize myself with ROS.  I have been looking for a way to periodically transmit my phone's GPS coordinates to a remote server for a project I'm working on, so I figured I'd try that as my first project with rosjava.

I've been following the directions at to install the rosjava stack on my Fedora 15 x86_64 system.  Unfortunately, there are a few gotchas that aren't outlined in the documentation:

1) If you have an x86_64 installation, you'll need some i686 libraries for the android SDK.  Luckily, Fedora supports installing libraries from multiple architectures side-by-side very well.  You can install the required libraries using the following command:

sudo yum install ncurses-devel.i686 zlib.i686 glibc.i686 libgcc.i686 ncurses-libs.i686 libstdc++.i386

2) Before you run "ant dist" to build rosjava, you'll likely have to edit the ant property files.  This is for two reasons: the location of your SDK installation may not be detected, and the target android API may also be wrong.  You can add a to the following directories:

all subdirs under rosjava/android/tutorials/

containing the following text:

You can modify the target for your desired API version (I found a more detailed explanation of these levels at

3) There's a missing directory in the build tree that ant seems to need, a simple "mkdir rosjava/android/library/libs" should suffice.

Now you should be able to run "ant dist" as per the directions and build rosjava.


  1. Hello Rich,

    I've follow your instructions, and after the last step, I get some compilation errors...

    See an extract below:

    [javac] /myfolder/rosjava/android/library/src/org/ros/rosjava/android/ cannot find symbol
    [javac] symbol : variable TYPE_ROTATION_VECTOR
    [javac] location: class android.hardware.Sensor
    [javac] if (event.sensor.getType() == Sensor.TYPE_ROTATION_VECTOR) {

    Did you get the same error?

  2. I didn't see that error. It might have something to do with Android API version you've downloaded for the SDK? I was using the 2.3.3 API when I did it.

  3. Dear Rich,

    I'm looking for RosJava User feed back. And it seeems dificult to find ... Can you contact me please, if you have the time to share your experience.



  4. As a topic of research, I find your project -- of a phone disclosing its GPS coordinates (via ROSjava) to a remote server -- somewhat interesting. Could you expand on the implementation please?