Uncertain behavior of rosbag play when restoring corrupted bag files
0 reputation · 15 Sept 2021, 15:05 UTC
When a rosbag file is restored from a backup, the goal is to confirm that all original messages are present and unmodified. The standard workflow relies on rosbag check to flag internal index or CRC errors, followed by rosbag play to replay the data. However, the tool offers no automated comparison between the replayed stream and the source bag, and it is unclear whether rosbag play emits any warning or log entry when it encounters corrupted or truncated segments.
Additionally, the documented behavior for handling a partially corrupted file—such as a missing CRC or an incomplete index—is not fully defined. The tool may silently skip messages, potentially leaving the restored bag incomplete without notifying the user.
Given this ambiguity, the following questions arise:
- Does
rosbag playprovide any notification or log output when it skips messages due to corruption? - Is there a documented method to automatically compare the replayed stream against the original bag to verify fidelity?
- How does the handling of truncated indexes or missing CRC differ between ROS 1 (Melodic, Noetic) and ROS 2 (Foxy, Humble) when restoring a corrupted bag?