The rosbag2 player can publish recorded messages faster or slower than their recorded spacing. A rate of 2.0 plays them at twice the normal playback rate; 0.5 stretches playback. The option changes the player's scheduling relationship to elapsed wall time. It does not rewrite every timestamp inside a message, recreate the original CPU and network load, or make system and steady clocks run at the same scaled rate.
This distinction matters when a robot developer replays camera frames, transforms, sensor packets, and commands into software that mixes several time sources. The same bag and same rate can produce different results if a consumer reads system time, depends on thread scheduling, drops samples under load, or retains state between runs.
Four time coordinates
First is the timestamp rosbag2 stored for each serialized record. The player uses recorded timing and ordering information to schedule publication. The Rolling README says multiple input bags are merged in order based on original recording reception timestamps. Player options can also select a message-order policy where supported. The chosen storage coordinate governs playback order; it is not automatically the acquisition time encoded by a sensor.
Second is a timestamp inside the message, such as a standard header stamp. rosbag2 republishes the recorded serialized message. Changing playback rate does not inherently scale that field. Two messages whose header stamps differ by 100 milliseconds still carry that 100-millisecond difference when replayed at 2x, even though the player may publish them about 50 milliseconds apart in current wall time.
Third is ROS time observed through a ROS clock. When rosbag2 fixed-frequency clock publication is enabled, it publishes /clock while a playback session is active. Pausing does not end the session; fixed-frequency updates continue with the paused time. When playback stops or finishes, clock publication stops until another session begins. A node uses that clock only if its time configuration selects ROS time.
Fourth is current system or steady time. A node can still call an operating-system wall clock or monotonic clock. rosbag2 playback rate does not make those clocks jump into recorded time. A timeout measured with steady time therefore experiences actual current duration, while recorded-message and ROS-time coordinates may advance at the configured playback rate.
Rate changes arrival spacing
Suppose a bag contains three records scheduled at bag times 10.0, 10.1, and 10.4 seconds. At rate 1.0, the player aims for wall-time gaps of 0.1 and 0.3 seconds. At rate 2.0, those intended gaps become 0.05 and 0.15 seconds. At rate 0.5, they become 0.2 and 0.6 seconds.
This arithmetic describes requested playback pacing, not a hard real-time guarantee. Disk reads, decompression, deserialization, publisher work, middleware queues, executor availability, and operating-system scheduling can add delay. The rosbag2 player source even reports when its internal message queue is starved and messages will be delayed.
Burst is a different operation. The documented burst service publishes a selected number of queued messages while paused and ignores message timing. It should not be presented as an extreme playback rate with equivalent temporal semantics.
Consumer behavior can change
A consumer that calculates velocity from message header stamps can receive the same timestamp deltas at several playback rates. A consumer whose control loop uses steady-time callback intervals sees different current spacing. A consumer that rejects a frame when system time minus header stamp is too large may reject every historical frame unless the experiment defines compatible time semantics.
Queue behavior also changes. At a higher rate, a subscriber may accumulate messages, drop old samples under KEEP_LAST depth, block a reliable path, or process data after a larger scheduling delay. A successful 0.25x replay shows that the algorithm can process a slow feed; it does not prove it can keep up with original acquisition timing.
Asynchronous work introduces another boundary. A GPU job, disk writer, external service, or hardware simulator may continue on current wall time. Scaling only message arrivals changes overlap between jobs. The output difference can be a valid load response rather than evidence that rosbag2 changed the recorded content.
Use /clock deliberately
Enable the player's clock publication only for an experiment that has identified which nodes should use simulated ROS time. Confirm each node's use_sim_time configuration and record the clock publication settings. A node that does not use ROS time remains on its own clock even though /clock is visible on the graph.
Test pause and seek. A timer based on ROS time should not silently be interpreted like a steady-time watchdog when playback pauses. Seeking backward changes the playback time coordinate, but it does not automatically rewind application state, clear filters, cancel tasks, or restore heap contents. Consumers that care about time jumps need explicit behavior.
Clock update frequency also matters. Fixed-frequency /clock messages approximate the player's current playback time at that publication cadence. They are not a copy of every sensor stamp. If the experiment needs clock updates aligned with selected topics, use and document the relevant player settings rather than assuming exact per-message clock emission.
Build a timing evidence table
For every important topic, record the storage timestamp, any header or payload timestamp, current publication time, current receipt time, and the consumer clock type. Include the configured playback rate, clock-publish mode and frequency, message-order mode, QoS, and whether the player queue reported starvation.
Instrument callback start and finish times using a steady clock while also recording ROS time. The two traces answer different questions: current scheduling cost and replay-time progress. Preserve raw values; a single chart with one unlabeled horizontal axis can conceal which coordinate was plotted.
Run rate controls at 0.5x, 1x, and 2x with fresh consumer processes. Compare message identity and application output separately from callback latency, queue depth, and dropped-sample evidence. Add a CPU or storage load only as a declared factor. Repeat enough times to distinguish deterministic timestamp logic from current scheduler variation.
Create a negative control in which a consumer uses header deltas only. Its computed delta should remain tied to recorded message content while wall-time callback intervals change. Another consumer using steady-time arrival deltas should show the opposite relationship. This confirms that the test can tell the clocks apart.
State the result narrowly
A defensible report says that a recorded sequence was played at a configured rate, with a specified /clock mode, ordering policy, QoS, and consumer clock configuration; it then reports observed current scheduling and application outputs. It does not say the run recreated the original network, processor, sensor, or wall-clock environment.
rosbag2 preserves valuable recorded inputs and offers controllable playback. Its rate setting scales the schedule used to offer those inputs. Reproducible timing analysis begins by naming every clock and timestamp involved, then measuring the boundary the replay actually exercises.