[Documentation] [TitleIndex] [WordIndex

The Problem

Rosjava isn't natively integrated into the ros ecosystem. While c++/python/lisp will automagically generate code for message packages on the fly, they will not yet do so for rosjava (though we are now one step closer).

The Solution

Indigo

There is now an 'unofficial' genjava that will automatically spin off java artifacts when building msg packages (similar to python/c++). For more details, see the RosJava Message Artifacts tutorial.

Hydro

Hydro spun off a secondary set of message generating gradle projects which worked on top of the original message packages. The code to do this was in rosjava_bootstrap (message_generation subproject) which will parse a ros message package and generate java classes. Previously this would be bundled in one rosjava_messages blob artifact - now rosjava is smart enough to split and version this into individual .jar's/maven artifacts.

Your own custom messages could be build via some helper scripts to setup custom gradle subprojects in a simmilar fashion. This is outlined in the Unofficial Messages tutorial.

Official artifacts are regularly uploaded and stored in the rosjava_mvn_repo - unofficial artifacts can be pull requested into the same repository if you wish.

Depending On Message Artifacts

To pull artifacts you have built from either your local maven repository (devel/share/maven) or from the officially stored artifacts in the rosjava_mvn_repo, add something like the following to the build.gradle file in your gradle subprojects:

dependencies {
  compile 'org.ros.rosjava_messages:geometry_msgs:1.10.+'
  compile 'org.ros.rosjava_messages:nav_msgs:1.10.+'
  compile 'org.ros.rosjava_messages:tf2_msgs:0.4.+'
}

2022-05-28 12:58