Two engineers replay the same recorded camera messages into a robot perception program and obtain different results. The bag file may be identical in both runs. The experiment may still differ because the program version, parameters, initial memory, or treatment of time changed.
A recording provides a defined set of inputs and timing information. It does not automatically explain every condition under which another component processes those inputs. A useful replay comparison makes that distinction explicit before calling a result reproducible.
What the recording and playback tools establish
The rosbag2 Rolling documentation describes selecting topics to record and replay, storing recorded messages, and controlling playback. Its current README also describes simulation-time recording using the latest received value from the clock topic. These are documented tool behaviors, not proof that a particular recording captured every input an application needed.
Rolling is a moving development branch. Available options and defaults must be checked against the actual ROS distribution and installed rosbag2 version. This article discusses an evidence model for a replay experiment and executes no playback command.
An original example with three observations
Imagine a hypothetical perception node that receives three images and maintains a count of detected items. Run A begins with an empty count. Run B starts after an earlier test and retains an existing count. Both receive the same three image messages.
If the displayed final count differs, the different initial state is a possible explanation even though the new image inputs are identical. The bag's identity alone does not prove that the two runs began with the same application state.
Now imagine both runs do start empty, but one uses a changed detection threshold. The same messages can produce different classifications because the processing definition changed. That may be the intended comparison, rather than a replay failure. The experiment should identify the changed factor instead of treating every difference as a defect.
Keep input identity separate from execution identity
A useful input record identifies the selected bag files, their checksums, message types, selected topics, and intended interval. It also records relevant gaps or exclusions. These details define the material supplied to the experiment.
An execution record identifies the software build, dependencies, configuration, and initial conditions of the consumers. Those details define the interpretation of that material. A bag checksum does not identify a parameter file, and a source-code revision does not identify which recording was used.
This is an editorial recordkeeping proposal, not a universal rosbag metadata schema. The point is to avoid asking one artifact to stand in for another. Keeping the two identities distinct also makes an intentional software comparison easier to explain.
The time source is part of the experiment
ROS 2's Clock and Time design explains that ROS time can follow a published clock source when the node's simulation-time setting is active. It also anticipates pauses and backward jumps used in playback. That time abstraction is distinct from system and steady time.
For a replay consumer, the relevant question is which time source each important decision uses. A timestamp inside a recorded message, the time at which playback publishes it, and a consumer's own current-time reading can have different roles. Their names should not be treated as interchangeable descriptions of when an observation happened.
Suppose a hypothetical node discards images it considers old. Replaying a historical message while the node compares its stamp with the present system clock asks a different question from replaying with a compatible simulated-time arrangement. The example supplies no universal configuration fix; the application's actual timestamp semantics determine the appropriate experiment.
A restart and a time jump are different events
Returning playback to an earlier point does not logically imply that every consuming algorithm has returned to its earlier internal state. An accumulator, learned map, cache, or pending work item can retain information unless the application defines another behavior.
The Clock and Time design discusses notification of time jumps so software can handle discontinuities. The availability of a clock mechanism does not establish that an arbitrary consumer clears the particular state relevant to a test. That behavior needs to be specified and observed.
In the hypothetical counting example, starting again from the first image while preserving the previous count changes the experiment. A result record should describe that condition instead of presenting it as another fresh run.
Playback speed changes more than elapsed wall time
Consider a separate hypothetical consumer that performs work asynchronously while images arrive. Increasing the rate at which playback offers messages can change the relationship between arrivals and available processing time. Whether messages are queued, rejected, or processed in time depends on the complete setup.
The same message contents are therefore insufficient to establish identical application scheduling. Nor does a successful slow replay prove the consumer keeps up with the original acquisition rate. A useful comparison identifies whether it evaluates algorithmic output, throughput, timing behavior, or several of these separately.
Keep the experiment's output explicit as well. A visual display, a final count, and an event-by-event result trace support different comparisons. An identical screenshot can conceal differing intermediate decisions; differing render timing can make equivalent computed results look different.
Define the result before comparing runs
For an original test plan, select the output being compared, identify the permitted variation, and preserve the observations needed to apply that rule. State which inputs and execution conditions are held fixed and which factor intentionally changes. If a required input is absent from the recording, retain that limitation rather than inventing its historical value.
A message recording can make robot software analysis far more repeatable. Its strongest use is as an identified input to an identified experiment. Calling the bag the whole experiment hides precisely the configuration, state, and timing assumptions needed to interpret its results.
Image note: The accompanying site-library robot and computer image is a concept illustration. It does not show a recorded ROS installation, an executed replay, or a verified benchmark.
Sources and further reading
rosbag2, Rolling README:
https://github.com/ros2/rosbag2/blob/rolling/README.md
ROS 2, Clock and Time design document:
https://design.ros2.org/articles/clock_and_time.html
Sources checked October 23, 2026. Hypothetical node behavior, experiment records, and interpretation: original ZHILIANHAI editorial analysis.