jrosclient
CONTENT

Overview

jrosclient is a Java module which allows to interact with ROS (Robot Operating System).

Many people run their applications, webservices in Java. The problems they may encounter is when they try to interact from their existing Java code with ROS. What sounds as easy thing to do is in fact complicated because there are not many Java based ROS clients. Some of them already outdated, other require additional knowledge of catkin, Python or running a separate web service or are only Gradle compatible. With jrosclient none of these is required. You can add it to your project as an ordinary Java dependency.

jrosclient is completely Java based and does not rely on any native libraries. It is not a JNI wrapper around ROS and so it does not require ROS to be installed in the system at all:

Requirements

Supported ROS versions

ROS2

Tested RMW implementations:

It is possible that jrosclient works with other RMW too except they were not tested.

ROS1

Supported OS

Design

ROS computation graph model is based on the nodes which can publish messages to certain topics and subscribe to them. Instead of creating a new API for such publisher/subscriber model jrosclient reuses standard Java Flow API. It allows seamless integration of your existing Java Flow Subscribers with ROS model and there is no need to learn yet another publisher/subscriber API.

jrosclient supports two versions of ROS (ROS1 and ROS2) and its stack looks like:

This allows users to use jrosclient as a ROS bridge and in the same Java application to communicate between ROS1 and ROS2.

Additionally this allows users to write ROS version agnostic code as long as format of messages stays the same across ROS versions.

jros2client implements ROS2 transport protocol using rtpstalk module.

jros1client implements ROS1 transport protocol using ICE module which relies on Java Async Channels.

Android support

jrosclient provides support for Android 14+:

Ecosystem

Documentation

Logging

To keep 3rd party dependencies of jrosclient to minimum it uses java.util.logging (JUL) for logging. Many logging libraries provide JUL adapters so you can still use them to manage its logging.

jrosclient comes with two logging configurations (info, debug). You can enable them by specifying "java.util.logging.config.file" System property. For example:

This will generate debug logs inside system temporary folder (for example /tmp/jros2client-debug.log).

Links