Skip to content
Melbourne University RacingMelbourne University RacingMUR Autonomous WikiAutonomous Wiki

Advanced

More in-depth material for people who already know the stack.

ROS 2 is putting the cart before the horse for this team. The real requirements of autonomous software is to have concurrent actors that run either statefully or

Real Time Synchronous Reactive Architectures

Section titled “Real Time Synchronous Reactive Architectures”

The essential idea is this, we have multiple subsystems that all might run at different rates. How do we let our systems be deterministic and concurrent? Instead of giving each subsystem its own periodic loop, we define a logical execution schedule. A central scheduler coordinates execution using dependency and timing rules.

Diagram of logical execution schedule

This allows the following:

  • Predictable logical ordering of computations.
  • Explicit deadlines and freshness constraints.
  • Reproducible scheduling behavior.
  • Easier reasoning about feedback-loop latency.
  • Potentially simpler deterministic replay.

However it isn’t all flowers and sunshine, this architecture doesn’t fit all workloads. Specifically, LiDAR Processing, neural inference, and nonlinear optimization can all have variable execution times.

So we implement a mix of both. Control and critical state estimation pipelines are on strict execution schedules while expensive sensor processing is asynchronous. The controller ingests the most recent valid snapshots with timestamps and freshness limits.

Logical Execution Time (LET) and Synchronous Reactive Programming (SRP). Because traditional C++ concurrency primitive like mutex and async introduce race conditions and scheduling non-determinism, we have to construct our own memory safe (or as close as C++ can get), deterministic, cycle-based execution.

For reference, we look to existing libraries like Lingua Franca

Every subsystem holds persitent internal state. Every subsystem has its own sensors that it must process

While C++ requires discipline around memory ownership, shared mutable state, callback lifetime, and race conditions. There is a breadth of libraries extremely useful to a driverless stack such as Ceres Solver, GTSAM, OpenCV, and PCL (Point Cloud Library)