Comprehensive Survey on ROS 2

Congrats on the paper.

A point of criticism though, given you specifically mention to analyse the โ€˜realtime capabilitiesโ€™:

For someone new to ROS 2 / DDS / etc., sentences such as the following invoke the expectation that ROS 2 is realtime capable:

With its real-time capabilities, supported by the Data Distribution Service (DDS) middleware, ROS 2 greatly improves communication reliability
and timing for multi-robot systems.

To my knowledge however, current state of ROS 2 is that it simply cannot be considered realtime compliant. There is no bounded-latency guarantee for standard node functionality such as messages and service calls.

Two examples:

  • Wrt. services: unless I am mistaken, a service callback allocates heap memory here, which is not realtime compliant.

  • Wrt. the mutices used throughout the code: there is currently no support for priority inheritance. A tremendous amount of work has been done wrt. avoiding priority inversion and adding thread attribute configuration, but to my knowledge that work has stalledโ€ฆ

So if you need a true realtime loop โ€œinโ€ ROS 2, my conclusion is that you rather need to implement one in ros2_control, or maybe use e.g. cactus-rt or Orocos (seems no longer maintained). Neither of those options is truly โ€œusing ROS 2 for realtime controlโ€, but rather โ€œusing ROS 2 for the non-realtime parts around a realtime control loopโ€.

So I think it is misleading to state that ROS 2 has โ€˜realtime capabilitiesโ€™. Either something is realtime, or it is not.

5 Likes