This page describes the ROS bag format, which is a logging format for storing ROS messages in files. Files using this format are called bags, and have the file extension .bag. Bags are recorded, played back, and generally manipulated by tools in the rosbag and rqt_bag packages.
The ROS bag format has changed over time. This document describes all formats that have ever been officially supported.
There is no guarantee of compatibility between different versions. Newly created bags are always recorded at the current version. While we make every effort to support playback of older bags, in some cases user intervention may be required to update an old bag for playback.
Bag files begin with a newline-terminated string of the form:
where X and Y are the major and minor version numbers. (Past versions have used a #ROSRECORD or #ROSLOG prefix.)
After this line, the details vary by version.
Version 2.0 (ROS 1.1.5 onwards; current)
Version 1.2 (ROS 0.5.0 - 1.0.x)
Version 1.1 (ROS 0.4.x)
Version 1.0 (unreleased)