jrosservices is a Java module which allows to interact with ROS services in ROS2 and ROS1:
It is based on jrosclient module which is a pure Java client for ROS.
Supported DDS RMW implementations:
NOTE: jros2services supports DDS-RPC, which supposed to be implemented by all DDS RMW implementations (see Services and Actions). Unfortunately, as of Jazzy, only FastDDS implements DDS-RPC. As more RMW migrate to DDS-RPC the jros2services can be extended to support them too.
ROS Service nodes are not necessary can communicate with each other, when they are running different ROS releases. Even when the message format is identical across both ROS releases. As the result, users may need to make sure that all ROS nodes in their fleet are running same ROS release.
For example ROS Service client running in Jazzy cannot call ROS Service running in Humble:
[DEBUG] [1735257260.627838009] [rcl]: Client initialized [DEBUG] [1735257260.627881742] [rcl]: Client sending service request [DEBUG] [1735257260.627970593] [rcl]: Initializing wait set with '0' subscriptions, '0' guard conditions, '0' timers, '0' clients, '0' services [DEBUG] [1735257260.628098385] [rcl]: Subscription taking message [DEBUG] [1735257260.628138204] [rcl]: Subscription take succeeded: true [DEBUG] [1735257260.628189492] [rcl]: Subscription taking message [DEBUG] [1735257260.628201942] [rcl]: Subscription take succeeded: true [DEBUG] [1735257260.628212735] [rcl]: Subscription taking message [DEBUG] [1735257260.628224208] [rcl]: Subscription take succeeded: true [DEBUG] [1735257260.628242298] [rcl]: Subscription taking message [DEBUG] [1735257260.628256285] [rcl]: Subscription take succeeded: true [DEBUG] [1735257260.628267866] [rcl]: Subscription taking message [DEBUG] [1735257260.628274516] [rcl]: Subscription take succeeded: true [DEBUG] [1735257261.408352637] [rcl]: Client taking service response [DEBUG] [1735257261.408407177] [rcl]: Client take response succeeded: false [DEBUG] [1735257261.408420541] [rclcpp]: executor taking a service client response from service '/add_two_ints' failed to take anything
[DEBUG] [1735257261.408022417] [rcl]: Service server taking service request [DEBUG] [1735257261.408053733] [rcl]: Service take request succeeded: true [INFO] [1735257261.408100057] [minimal_service111111]: request: 41 + 1 [DEBUG] [1735257261.408122944] [rcl]: Sending service response
jros2services on the other hand, can communicate with ROS Service nodes irrespective ROS release they are running.