Rosbag Backward Compatibility

ROS 1 bags store the actual message data with the same format as it is being used on the wire (plus some additional header and meta information). This is done so that recording / replaying bags is efficient.

Since ROS 2 will use a different marshaling / transport its wire format will be different. Therefore I would expect the ROS 2 “bags” to be stored in a different format.

But there are two ways moving forward:

  • You can simply use the ROS 1 rosbag application to playback a ROS 1 bag file and use the ros1_bridge to bridge the messages to a ROS 2 system.
  • As soon as a ROS 2 specific bag solution exists someone could write a “plugin” to enable also reading files with the ROS 1 bag format.