Robotics

ESOL's ROS 2 Realtime Support adds RT thread control via YAML

ROS 2 gets real-time thread attributes without touching core rclcpp—just a YAML file.

Deep Dive

ESOL Community has introduced ros2_realtime_support, a standalone package designed to add real-time functionality to ROS 2 applications without altering the core rcl and rclcpp packages. Since 2022, developers have worked on integrating real-time features directly into rcl/rclcpp, but maintainers noted that approach complicated release checks and OS support. Following the announcement of CallbackIsolatedExecutor, the team pivoted to a separate package strategy. The result is a rclcpp-friendly API exposed via the rclcpp_realtime namespace.

The package allows users to configure thread attributes—such as scheduling policy, priority, and CPU affinity—through a YAML configuration file or environment variables, passed via --ros-args. Executors are then created using these attributes, enabling fine-grained control over real-time behavior without invasive code changes. The current implementation provides abstracted thread operations and extended rcl interfaces, while the roadmap includes swapping internal mutexes and condition variables for OS-native calls on RTOS, and making intra-process communication real-time to guarantee performance on single-PC robot systems. This fills a long-standing gap in ROS 2's real-time story.

Key Points
  • New package esol-community/ros2_realtime_support adds real-time features to ROS 2 without modifying core rcl/rclcpp.
  • Configure thread scheduling priority, affinity, and policy via YAML file or --ros-args environment variables.
  • Future plans include RTOS-native mutexes and real-time intra-process communication for single-PC robots.
  • Leverages CallbackIsolatedExecutor design; work ongoing since 2022 within the ros2 wg-real-time group.

Why It Matters

Gives ROS 2 developers a standardized, non-invasive path to determinism for real-time robot control.

📬 Get the top 10 AI stories daily