ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A

Rosjava NDK


I’ve been looking at the ROS Android NDK stuff that Gary Servin presented at ROSCon 2015:

My hobby is ROS, but my day job is doing Android Platform Development (custom AOSP stuff). The ROS Android NDK stuff you’re working on is therefore super interesting to me!

Have you guys managed to realize your goal of implementing a ROS robot entirely on an Android device? I’m eager to follow along in your footsteps, and contribute in whatever way I can.


@jpuderer yes you can run ros on Android to control your robot. There are two ways of doing so:

  1. Using Rosjava: is a port of ROS to the java language and can run on Android.
    Pros: easier and familiar, the Android way. Most basic ROS stuff will work.
    Cons: Not all functionality of ROS is implemented, few packages have been ported.
  2. Natively compiling and statically linking the C++ source code of the ROS system for the arm target.
    Pros: potentially any package can be used; no need to rewrite the code; faster native execution.
    Cons: complicated cross-compilation process; some functionality is not available in Android due to security limitations and sandboxing of the application; no python support.

We are addressing 1. by adding new functionality to Rosjava.
For 2. we have developed a building environment that cross-compiles the ros core together with the packages that you select. We are constantly adding new patches and workarounds so more packages can be used.
Finally you can use the best of both worlds mixing both approaches. You can have your main ros system running with rosjava on android and a your favorite ros package loading as a native library.


@ecorbellini Thank you for your reply! However, I also wanted to know a bit more about what you (and others) have managed to build using ROS on Android.

I’m interested to know if anyone has managed to implement a robot that runs entirely on an Android device. I know this should be possible (based on a combination of packages built using the methods you describe), but it would be great if there was an existing example or (even better) a reference robot.


Hi @jpuderer!
I know the response came a bit late, but you can take a look here: This hasn’t been yet announced here (it’s a work in progress), but the code is publicly available already.

And the answer is yes :slight_smile: it is possible indeed. It uses RosJava, RosAndroid, and the cross compiled version of the navigation stack. Feel free to take a look there!