[ros-users] [Discourse.ros.org] [Client Libraries/rosjava] Is rosjava worth using when not using android

Michael McConnell ros.discourse at gmail.com
Tue Nov 13 14:47:11 UTC 2018

We have found ROS Java capable of handling our use cases in general. However, if we were to start over I think the team would go with C++. The ability to leverage our legacy Java code saved time but the difficulties in understanding how to integrate with ROS Java offset that benefit. The primary issue was lack of documentation, but there were a couple bugs in the source code which were also identified. While ROS Java is still actively updated, the documentation and support for C++ is far greater by comparison.

**Here are some key areas we struggled with** 
Clean System Shutdown
-  https://github.com/rosjava/rosjava_core/issues/279

Launching ROS Java Nodes:
- ROS Java generates two executables which can confuse roslaunch/rosrun. The extra executable can be deleted to get around this issue

No action lib support (as far as I know)

Service calls are not blocking and have a multi-threading bug
- https://github.com/rosjava/rosjava_core/issues/261

Default gradle build requires internet connection for pulling down a build script

Documentation for installing compiled binaries on external systems wasn't clear to us

rosjava does not properly sync with std_msgs set which can limit the rosbag api 
- (Problem was similar to this) https://answers.ros.org/question/108956/cannot-convert-imu-messages-from-bagfile-to-csv-file/
- rosbags can still be played back just not fully controlled using the client api's

**There were some benefits as well though**
- Gradle build system is fast and easy to use
- Unit testing and connecting a debugger to unit tests is easy with gradle
- Catkin/CMake integration is straight forward
- API Is pretty straightforward and pub/sub is fully interoperable with C++/Python nodes
- There is support for integration tests written in Java

I have acquired quite a bit of knowledge on workarounds for rosjava and would be happy to answer more detailed questions, but can't promise I'll be able to respond right away.

[Visit Topic](https://discourse.ros.org/t/is-rosjava-worth-using-when-not-using-android/1967/13) or reply to this email to respond.

More information about the ros-users mailing list