Deterministic Execution of ROS~2 Applications via Lingua Franca

๐Ÿ“… 2026-06-08
๐Ÿ“ˆ Citations: 0
โœจ Influential: 0
๐Ÿ“„ PDF
๐Ÿค– AI Summary
This work addresses the nondeterminism inherent in ROS 2 applications, which arises from their publish-subscribe communication model and distributed deployment, leading to unpredictable callback execution orders that complicate concurrency management and hinder safety analysis. To resolve this, the authors propose an automated, non-intrusive transformation method that converts native ROS 2 applications into deterministic programs based on Lingua Franca, without modifying the original codebase. By leveraging Lingua Francaโ€™s logical time semantics, the approach guarantees identical execution order and end-to-end latency for the same inputs. This is the first technique to provide deterministic execution for ROS 2 applications while preserving compatibility and enabling advanced features such as federated execution and fault tolerance. Experimental evaluation on synthetic benchmarks and the Autoware autonomous driving stack demonstrates the methodโ€™s efficacy and its clear advantage over the inherently nondeterministic behavior of native ROS 2.
๐Ÿ“ Abstract
The Robot Operating System~2 (ROS 2) is a widely used middleware for robotic systems, characterized by a publish-subscribe (pub-sub) communication mechanism in which computation is structured as callbacks dispatched by ROS 2 executors. Despite its popularity, the pub-sub pattern in ROS 2 is inherently nondeterministic: the order in which these callbacks run is nondeterministic even within a single executor, and distributed deployments add further nondeterminism from the interleaving of messages across nodes and from network latency. Such nondeterminism often leads to concurrency issues and makes it virtually impossible to analyze for safeness and provide guarantees. We present a framework that is able to convert an unmodified ROS 2 application and run it under Lingua Franca (LF), a coordination language for deterministic execution using logical time, so that the same input always produces the same deterministic execution order. We first describe which ROS 2 features can be executed deterministically under logical time. Such features enable the possibility to establish an automatic conversion framework to extract information from a ROS 2 application and directly convert it into an LF program. The rich features of LF, such as logical-time delays, federated execution across processes, and fault handling, can then be applied to make the ROS 2 application be executed in a deterministic and timing-predictable manner without changing the ROS 2 code. We evaluate the framework on a synthetic example and on the Autoware reference system. We show that the order in which callbacks are executed differs in default ROS 2, while also having end-to-end latencies that vary across executions. In contrast, our LF-controlled ROS 2 system produces a deterministic execution order and consistent end-to-end latencies.
Problem

Research questions and friction points this paper is trying to address.

ROS 2
nondeterminism
publish-subscribe
callback ordering
concurrency
Innovation

Methods, ideas, or system contributions that make the work stand out.

deterministic execution
logical time
ROS 2
Lingua Franca
callback scheduling
๐Ÿ”Ž Similar Papers
2023-05-01IEEE Real Time Technology and Applications SymposiumCitations: 14