The clock object in the scene configuration determines how simulation time advances. There are four supported types:
1. Steppable Clock (Fixed-step)
Best for deterministic, repeatable simulations. It advances by step-ns (nanoseconds) every real-time-update-rate (nanoseconds).
- Deterministic scaling: To run at 2x real-time, set
step-ns to twice the real-time-update-rate. pause-on-start: If true, the simulation starts paused, allowing manual control via APIs.
2. Real-time Clock (Variable-step)
A variable-step clock where the simulation time step equals the real-time interval between execution periods.
- Warning: This is not deterministic or repeatable and cannot be paused.
3. Engine-driven Clock (Fixed-step)
A fixed-step clock driven by a host loop outside the core simulation executor.
- Use case: When Project AirSim is embedded in another runtime (e.g., another game engine).
- In
UnrealNative scenes, this is known as the unreal-driven-clock. - Note: Does not use
real-time-update-rate and does not support pause/resume via SimClock APIs.
4. External-clock
Currently behaves identically to engine-driven. It is intended as a future entry point for driving simulations from external applications while maintaining the same runtime behavior.
// Example: Steppable clock
"clock": {
"type": "steppable",
"step-ns": 3000000,
"real-time-update-rate": 3000000,
"pause-on-start": false
}
// Example: Real-time clock
"clock": {
"type": "real-time",
"real-time-update-rate": 3000000
}
// Example: Engine-driven clock
"clock": {
"type": "engine-driven",
"step-ns": 3000000
}