← Latest papers
💻 computer science

OSC2Runner: OpenSCENARIO 2.x Compliant High-Fidelity AV Simulation in CARLA

OSC2Runner is a novel orchestration framework that enables native, deterministic execution of OpenSCENARIO 2.x DSL within CARLA by compiling abstract syntax trees into dynamic behavior trees, thereby eliminating the spatiotemporal drift and latency inherent in legacy XML-based interpreters.

Original authors: Thoshitha Gamage, Lasanthi Gamage

Published 2026-06-26
📖 5 min read🧠 Deep dive

Original authors: Thoshitha Gamage, Lasanthi Gamage

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 trying to teach a self-driving car how to handle a dangerous situation, like a truck suddenly cutting in front of it. To do this safely, engineers use a "script" to tell the computer exactly what to do. For years, these scripts were written in an old, clunky language (like writing a complex story in a language that only has nouns and verbs, but no adjectives or logic). This made the computer's actions feel jerky, delayed, or "snapped" into place rather than moving naturally.

Recently, a new, smarter language called OpenSCENARIO 2.x was invented. It allows for much more detailed, logical, and natural instructions. However, the simulation software used to test these cars (called CARLA) didn't know how to read this new language yet. It was like having a brand-new book written in a futuristic language, but the library only had a translator for the old one. If you tried to force the old translator to read the new book, the story would get garbled, the timing would be off, and the car's movements would look fake.

Enter OSC2Runner.

Think of OSC2Runner as a high-tech, real-time translator and director rolled into one. Instead of just reading the script and guessing what to do, it takes the new, complex instructions and instantly compiles them into a set of precise, mathematical commands that the car simulation understands perfectly.

Here is how it works, using some simple analogies:

1. The "Translator" (The Transpiler)

Imagine the new script is a complex recipe written in a gourmet chef's language. The old way of running simulations was like a robot trying to guess the recipe step-by-step, often dropping ingredients or waiting too long between steps.
OSC2Runner acts like a master chef who reads the recipe, understands the intent (e.g., "cook until golden brown"), and immediately hands the kitchen staff (the simulation engine) a list of exact, timed instructions. It doesn't just play back a pre-recorded video of a car moving; it calculates the car's movement right now, every single millisecond, based on the rules in the script.

2. The "Conductor" (Behavior Trees)

In a symphony, if the violinist plays a second too late, the music sounds off. In self-driving tests, if a car brakes a split second too late, the test is invalid.
OSC2Runner uses something called Behavior Trees (think of these as a flowchart for the car's brain). It turns the script into a dynamic flowchart that the car follows in real-time.

  • The Magic: It ensures that if the script says "Brake when the car ahead is 10 meters away," the car checks that distance continuously, not just once a second. It's the difference between checking your watch once an hour versus checking it every second to know exactly when to leave for a meeting.

3. The "Physics Reality Check"

One of the biggest problems with old simulators was that they would "snap" a car to a speed. If the script said "go 50 mph," the old system would instantly teleport the car to 50 mph, ignoring the fact that real cars take time to accelerate.
OSC2Runner connects the script directly to the physics engine.

  • The Analogy: Imagine pushing a heavy shopping cart. If you push hard, it doesn't instantly reach top speed; it accelerates. OSC2Runner makes sure the virtual car behaves exactly like that heavy cart. If the script says "brake hard on a wet road," the system calculates that the tires will slip and the car won't stop as fast as it would on dry pavement. It respects the laws of physics, not just the rules of the script.

What They Proved (The Results)

The authors tested this system with two main scenarios:

  • The "Cut-In" Test: They simulated a heavy truck cutting in front of a car. The system successfully coordinated the actions of both vehicles. When the truck slowed down, the car reacted instantly. They proved that the "communication" between the two virtual cars happened with almost zero delay (about 100 milliseconds), which is fast enough to be considered instant for a computer.
  • The "Wet Road" Test: They made the virtual road wet and slippery. When they told the car to brake hard, the car didn't stop instantly like a cartoon character. Instead, it slid a bit, just like a real car would on a rainy day. This proved that the system respects the "friction" of the world, making the test results trustworthy.

Why This Matters

The paper claims that OSC2Runner is the first tool that can take these new, complex scripts and run them in a simulation without losing any accuracy or timing. It turns a "rough draft" of a test into a "mathematically perfect" execution.

This is crucial because before this, researchers couldn't fully trust simulations that used the new language. Now, they can use these scripts to test self-driving cars with the confidence that the virtual world is behaving exactly as the real world would. This paves the way for using advanced AI (like Large Language Models) to write these scripts automatically, knowing that the simulation engine can execute them perfectly.

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 →