Skip to content

One Behavior, Out of Order: Deterministic Execution and Parallel Simulation of ROS 2 Applications

arXiv Robotics — research abstracts1Chengzi Huang, Behnam Khodabandeloo, Duc Anh Nguyen, Chuanchao Gao, Wang Yi

This paper addresses nondeterminism in ROS 2 by introducing a lightweight coordination scheme that enforces deterministic execution at predefined time instants. The authors then present an out-of-order parallel simulation algorithm that accelerates testing while preserving determinism. Implemented as a simulator, the approach runs existing ROS 2 applications without modification and demonstrates significant performance improvements on industrial use cases and synthetic graphs.

arXiv:2611.26676v1 Announce Type: new Abstract: System-level simulation is widely used to validate robotic applications before hardware deployment. However, Robot Operating System 2 (ROS 2), a popular middleware for such applications, uses asynchronous publish-subscribe communication, which can make application behavior depend on scheduling and the platform. The behavior can then vary across runs and machines even with the same inputs. This nondeterminism makes faults hard to reproduce and tests unreliable. In this paper, we first give ROS 2 applications a lightweight coordination scheme in which every component, including event-driven ones, reads its inputs and writes its outputs at predefined time instants. By decoupling computation and communication, the scheme makes an application deterministic, that is, it always has one behavior for given inputs. Tests are thus repeatable, but for large applications they still take a long time. To speed up these tests, we then present an out-of-order parallel simulation algorithm. From the predefined read and write instants, it knows before the run which activations of components depend on which. It starts each activation as soon as those it depends on have finished. Finally, we implement the algorithm in a simulator that runs existing ROS 2 applications without any change to them or to ROS 2. We evaluate the simulator on industrial use cases and synthetic graphs. On the industrial use cases, it is up to 2.6 times faster than synchronous parallel simulation and needs an order of magnitude less memory for messages than asynchronous parallel simulation.

Source notes

  1. One Behavior, Out of Order: Deterministic Execution and Parallel Simulation of ROS 2 Applications↩
Source evidence

Reported by the source; not independently verified.

Environment
Simulation[2]
speedup factor
≤2.6[3]
simulation type
1[4]
  1. arXiv:2611.26676v1 Announce Type: new Abstract: System-level simulation is widely used to validate robotic applications before hardware deployment. However, Robot Operating System 2 (ROS 2), a popular middleware for such applications, uses asynchronous publish-subscribe communication, which can make application behavior depend on scheduling and the platform. The behavior can then vary across runs and machines even wi
    Exact source↩
  2. m in a simulator that runs existing ROS 2 applications without any change to them or to ROS 2. We evaluate the simulator on industrial use cases and synthetic graphs. On the industrial use cases, it is up to 2.6 times faster than synchronous parallel simulation and needs an order of magnitude less memory for messages than asynchronous parallel simulation.
    Exact source↩
  3. th the same inputs. This nondeterminism makes faults hard to reproduce and tests unreliable. In this paper, we first give ROS 2 applications a lightweight coordination scheme in which every component, including event-driven ones, reads its inputs and writes its outputs at predefined time instants. By decoupling computation and communication, the scheme makes an application deterministic, that is, it always has one be
    Exact source↩
  4. havior for given inputs. Tests are thus repeatable, but for large applications they still take a long time. To speed up these tests, we then present an out-of-order parallel simulation algorithm. From the predefined read and write instants, it knows before the run which activations of components depend on which. It starts each activation as soon as those it depends on have finished. Finally, we implement the algorith
    Exact source

Automatically extracted; no manual editorial approval recorded.

Article details
Signal

The authors propose a deterministic execution scheme and out-of-order parallel simulation algorithm for ROS 2 applications, achieving up to 2.6× speedup and an order of magnitude less memory usage on industrial use cases without modifying existing applications or the ROS 2 middleware.

Timezone · UTC

Article dates follow your selected timezone. Briefing editions use Hong Kong time (UTC+8).