Principle:CARLA simulator Carla Playback Speed Control
| Knowledge Sources | |
|---|---|
| Domains | Simulation, Recording |
| Last Updated | 2026-02-15 00:00 GMT |
Overview
Playback speed control enables temporal scaling of recording replay, allowing analysts to slow down, speed up, or pause the playback to focus on events of interest.
Description
During replay of a recorded simulation, the default playback speed matches the original simulation's timing: one second of recording maps to one second of replay. Playback speed control allows this mapping to be adjusted by setting a time factor that scales the replay rate.
A time factor of 1.0 produces real-time playback. Values less than 1.0 produce slow-motion replay (e.g., 0.5 plays at half speed), while values greater than 1.0 produce fast-forward replay (e.g., 2.0 plays at double speed). A time factor of 0.0 effectively pauses the replay, freezing all actors in their current positions.
This capability is essential for detailed analysis of recorded scenarios. Crash investigations benefit from slow-motion replay to observe the sequence of events leading to a collision. Overview passes benefit from fast-forward to quickly scan through long recordings. The ability to adjust speed dynamically during replay enables an interactive analysis workflow where the analyst can fast-forward through uneventful sections and slow down for critical moments.
An important technical constraint is that actor interpolation is disabled when the time factor exceeds 2.0. At lower speeds, the replayer interpolates actor positions between recorded frames to produce smooth motion. At speeds above 2.0x, this interpolation is skipped to reduce computational overhead, which may result in visible actor position jumps between frames.
Usage
Use playback speed control when:
- Investigating collisions -- slow down to 0.1x-0.5x to observe the exact sequence of events frame by frame.
- Scanning long recordings -- speed up to 4.0x-10.0x to quickly identify sections of interest.
- Pausing for inspection -- set to 0.0 to freeze the replay and examine actor positions in the 3D viewport.
- Presenting scenarios -- adjust speed for audience comprehension during demonstrations.
- Synchronizing with external tools -- slow down replay to give external analysis tools time to process each frame.
Theoretical Basis
Playback speed control implements temporal warping of the replay timeline. The relationship between replay time and recording time is governed by the equation:
- t_replay = t_recording / time_factor
Where t_replay is the wall-clock time elapsed during replay and t_recording is the corresponding time span in the recording. This linear scaling preserves the relative ordering and spacing of events while compressing or expanding the absolute time between them.
The interpolation threshold at time_factor > 2.0 represents a practical tradeoff between visual fidelity and computational cost. Linear interpolation between recorded frames requires computing intermediate transforms for every actor at every rendered frame. At high replay speeds, many recording frames pass per rendered frame, making interpolation unnecessary (the rendered frame would skip past the interpolated positions anyway). Disabling interpolation above 2.0x avoids wasted computation while maintaining acceptable visual quality for fast-forward review.
At very low time factors (approaching 0.0), the replay effectively becomes a freeze-frame mode. The simulation clock advances negligibly between ticks, causing actors to remain at their current interpolated positions. This is useful for spatial analysis of actor configurations at a specific moment in time.
The time factor can be changed dynamically during an active replay, enabling variable-speed scrubbing through the recorded timeline. This interactivity is key to efficient analysis workflows, where the analyst adjusts playback speed based on what they observe.