Timing Analysis and Priority-driven Enhancements of ROS 2 Multi-threaded Executors
Hoora Sobhani, Hyunjong Choi, Hyoseung Kim
TL;DR
This paper addresses the lack of formal timing analysis for ROS 2 multi-threaded executors by introducing a comprehensive response-time analysis framework for chains running on such executors. It builds on NP-FP scheduling, derives constrained-deadline chain bounds, and introduces priority-driven enhancements to reduce pessimism and improve key chains’ latency, including handling for arbitrary deadlines and mutually-exclusive callback groups. A compositional end-to-end approach across multiple executors is presented, enabling safe aggregation of sub-chain analyses with propagation delays. Experimental validation on NVIDIA Jetson AGX Xavier shows that the proposed methods tighten analytical bounds and improve observed performance for high-priority chains, while maintaining acceptable overhead, thereby enhancing the practicality of ROS 2 for safety-critical robotics.
Abstract
The second generation of Robotic Operating System, ROS 2, has gained much attention for its potential to be used for safety-critical robotic applications. The need to provide a solid foundation for timing correctness and scheduling mechanisms is therefore growing rapidly. Although there are some pioneering studies conducted on formally analyzing the response time of processing chains in ROS 2, the focus has been limited to single-threaded executors, and multi-threaded executors, despite their advantages, have not been studied well. To fill this knowledge gap, in this paper, we propose a comprehensive response-time analysis framework for chains running on ROS 2 multi-threaded executors. We first analyze the timing behavior of the default scheduling scheme in ROS 2 multi-threaded executors, and then present priority-driven scheduling enhancements to address the limitations of the default scheme. Our framework can analyze chains with both arbitrary and constrained deadlines and also the effect of mutually-exclusive callback groups. Evaluation is conducted by a case study on NVIDIA Jetson AGX Xavier and schedulability experiments using randomly-generated chains. The results demonstrate that our analysis framework can safely upper-bound response times under various conditions and the priority-driven scheduling enhancements not only reduce the response time of critical chains but also improve analytical bounds.
