Is rosjava worth using when not using android

Hello,
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

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

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

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.