Principle:CARLA simulator Carla Synchronous Simulation Mode
| Knowledge Sources | |
|---|---|
| Domains | Simulation, Perception, Sensor_Fusion |
| Last Updated | 2026-02-15 00:00 GMT |
Overview
Synchronous simulation mode ensures that every sensor attached to the simulation produces exactly one data frame per simulation tick, enabling deterministic and temporally aligned multi-sensor data collection.
Description
In CARLA's default asynchronous mode, the server advances simulation time as fast as possible, independent of the client. This creates a fundamental problem for sensor data collection: sensors may produce data at inconsistent rates, frames may be dropped, and there is no guarantee that data from different sensors corresponds to the same simulation instant. Synchronous mode resolves this by requiring the client to explicitly call World.tick() to advance the simulation by one step. The server waits for this call before computing the next frame, and all sensors are guaranteed to produce data for that frame before the tick returns.
The key configuration parameters are:
- synchronous_mode: When set to True, the server will not advance to the next simulation step until the client calls World.tick().
- fixed_delta_seconds: Specifies the exact time increment (in seconds) for each simulation step. This ensures deterministic physics and consistent sensor sampling rates. Common values include 0.05 (20 Hz) and 0.1 (10 Hz).
Together, these settings create a lock-step execution model where the client controls the pace of simulation, and every sensor produces data at a predictable, fixed rate.
Usage
Synchronous mode should be enabled whenever:
- Collecting multi-sensor datasets where temporal alignment is critical (e.g., camera + LiDAR fusion datasets).
- Recording ground truth labels that must correspond exactly to sensor observations.
- Running perception algorithm benchmarks where reproducibility is required.
- Building training data pipelines for machine learning models that expect synchronized sensor inputs.
Theoretical Basis
The synchronous simulation model implements a discrete-time simulation paradigm where the simulation clock advances in fixed increments controlled by an external agent. This contrasts with continuous-time or variable-step simulations.
Deterministic Tick-Based Execution: In synchronous mode, the simulation follows a strict produce-consume cycle. Each call to World.tick() triggers the server to: (1) advance physics by fixed_delta_seconds, (2) update all actor states, (3) render sensor data for all active sensors, and (4) signal completion. The client then collects all sensor data before issuing the next tick. This guarantees a bijective mapping between simulation frames and sensor observations.
Temporal Alignment Guarantee: Because all sensors render from the same simulation state within a single tick, the resulting data is inherently temporally aligned. For N sensors, every tick produces exactly N data samples, all corresponding to the same world state at time t = frame_number * fixed_delta_seconds. This eliminates the need for post-hoc temporal interpolation or alignment algorithms that would be necessary in asynchronous operation.
Fixed Timestep Physics: The fixed_delta_seconds parameter ensures that the physics engine integrates equations of motion with a constant timestep. This yields bitwise-reproducible vehicle trajectories and object dynamics across repeated runs with the same inputs, which is essential for regression testing of perception systems.
Relationship to Real-Time Factor: The simulation may run faster or slower than real time depending on scene complexity. The real-time factor is decoupled from the simulation timestep, meaning data collection quality is independent of computational performance.