# Comprehensive Survey on ROS 2

**URL:** <https://discourse.openrobotics.org/t/comprehensive-survey-on-ros-2/40483>\
**Category:** ROS General\
**Tags:** ros2\
**Created:** [November 8, 2024, 7:39am UTC](https://discourse.openrobotics.org/t/comprehensive-survey-on-ros-2/40483 "2024-11-08T07:39:17Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![JRTG](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/jrtg/32/15378_2.png) [@JRTG](https://discourse.openrobotics.org/u/JRTG)\
**Post date:** [November 8, 2024, 2:18pm UTC](https://discourse.openrobotics.org/t/comprehensive-survey-on-ros-2/40483/2 "2024-11-08T14:18:27Z")

</div>

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](https://github.com/ros2/rclcpp/blob/37e36880260f10c85fb20809accec7cc77a3b1dd/rclcpp/include/rclcpp/any_service_callback.hpp#L176), 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](http://discourse.ros.org/t/avoiding-priority-inversions-includes-draft-pull-requests/29219) and adding [thread attribute configuration](http://discourse.ros.org/t/adding-thread-attributes-configuration-in-ros-2-framework/30701), 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](https://control.ros.org/iron/index.html), or maybe use e.g. [cactus-rt](https://github.com/cactusdynamics/cactus-rt) or [Orocos](https://orocos.org/) (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.

---

_[View the full topic](https://discourse.openrobotics.org/t/comprehensive-survey-on-ros-2/40483)._
