← Latest papers
💻 computer science

Deterministic Execution of ROS~2 Applications via Lingua Franca

This paper presents a framework that converts unmodified ROS 2 applications into Lingua Franca programs to enforce deterministic execution and timing predictability, thereby eliminating the inherent nondeterminism of ROS 2's callback ordering and message interleaving.

Original authors: Harun Teper, Shaokai Lin, Shulu Li, Edward A. Lee, Jian-Jia Chen

Published 2026-06-09
📖 4 min read☕ Coffee break read

Original authors: Harun Teper, Shaokai Lin, Shulu Li, Edward A. Lee, Jian-Jia Chen

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). ✨ This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are running a busy restaurant kitchen. In a standard kitchen (which is like ROS 2, the software used to build robots), the head chef shouts out orders, and the cooks (the robot's different parts) grab them whenever they hear them.

The problem? If two orders arrive at the exact same time, the cook might grab the "salad" order before the "steak" order, or vice versa, depending on who was standing closer to the ticket window or who was faster that day. Sometimes the steak arrives before the salad, sometimes after. This is nondeterministic. For a robot driving a car, this is dangerous: if the robot gets a "stop" signal and a "go" signal at the same time, it needs to know exactly which one to process first, every single time. If it guesses wrong, the car might crash.

The authors of this paper built a traffic controller (called Lingua Franca, or LF) that can sit over your existing robot kitchen and force it to follow a strict, unchangeable schedule without you having to rewrite the recipes (the code).

Here is how they did it, broken down simply:

1. The Problem: The "Chaos Kitchen"

In the standard ROS 2 system, the order in which tasks happen depends on physical things like:

  • How fast the computer is at that exact second.
  • How long it takes for a message to travel across the network (like a waiter running to the kitchen).
  • Which thread of the computer picks up the message first.

Because of this, if you run the same robot program twice with the same inputs, it might do the tasks in a different order the second time. This makes it impossible to prove the robot is safe, because you can't predict exactly what it will do next.

2. The Solution: The "Logical Clock"

The authors introduced a concept called Logical Time. Imagine the kitchen has a magical clock that doesn't tick based on seconds on the wall, but based on "steps" in the recipe.

  • Step 1: The timer rings.
  • Step 2: The salad is prepped.
  • Step 3: The steak is cooked.

In this system, the "time" it takes to cook the steak doesn't matter. If the recipe says "Prep salad, then cook steak," the system waits until the salad is done before it even thinks about the steak. It ignores the real-world speed of the cook. This ensures that Step 2 always happens before Step 3, no matter how fast or slow the hardware is.

3. The Magic Trick: "No Rewriting Required"

Usually, to get this kind of perfect order, you would have to throw away your old recipes and write new ones from scratch in a different language. That is hard and expensive.

The authors created a translator tool.

  • You give it your existing ROS 2 robot code (the "old recipes").
  • The tool looks at the code, figures out how the parts connect (who talks to whom), and automatically builds a "wrapper" around it.
  • This wrapper forces the robot to run under the strict "Logical Time" rules.
  • Crucially: The original code inside the robot is never touched. It runs exactly as it was written, but the order in which it runs is now perfectly controlled by the new wrapper.

4. What They Found (The Results)

They tested this on two things:

  1. A simple made-up robot with a few parts.
  2. A real-world autonomous driving system (called Autoware) that has 24 different parts working together.

The Results:

  • Standard ROS 2: The order of tasks changed every time they ran the test. Sometimes the robot processed data in one order, sometimes another. The time it took to finish a task varied wildly (sometimes 5 milliseconds, sometimes 900 milliseconds).
  • Their New System (LF-controlled): The order of tasks was identical every single time. The time it took to finish was also identical every time.

They also showed that you can use this system to "tune" the robot. You can tell the system, "I want the robot to be super consistent (always do A before B), even if it means waiting a tiny bit longer," or "I want it to be super fast, even if the order varies slightly." You can adjust this "knob" without changing the robot's code.

Summary

Think of this paper as inventing a conductor for a chaotic orchestra. The musicians (the robot code) are still playing their own instruments exactly as they always have, but now the conductor (the new framework) tells them exactly when to play their notes. This ensures that every performance sounds exactly the same, making the robot safe, predictable, and reliable, without needing to teach the musicians how to read a new sheet of music.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →