Technical Support Center

ROS2 – Recording formats


Available ROS Formats

MCAP (Modern Capture Format)

  • Newer format designed to be a high-performance alternative to rosbag2.
  • More efficient in terms of storage and playback speed.
  • Cross-platform & language support (C++, Python, Rust, Go, etc.).
  • Better compression support (Zstandard, LZ4, and others).
  • Designed for large datasets and works well with sensors like LiDAR, cameras, and IMUs.
  • Faster indexing and seeking, improving playback efficiency.

ROSBAG (ROS 1 & ROS 2)

  • Originally designed for ROS 1 and adapted for ROS 2.
  • Uses SQLite or other storage backends in ROS 2.
  • Slower when handling large datasets compared to MCAP.
  • Compression support, but not as efficient as MCAP.
  • Limited indexing & metadata support, which can slow down seeking.

Which One Should You Use?

  • If you are using ROS 2, MCAP is the preferred format because of its speed, efficiency, and better compression.
  • If you are working with older ROS 1 systems, you might still need to use rosbag.

How to use MCAP in ROS2?

ROS 2 supports MCAP as a storage backend for ros2 bag. To record using MCAP:

ros2 bag record -a --storage mcap

To play it back:

ros2 bag play

The rosbag file can be recorded automatically at driver start with the record_rosbag argument in the adma_driver.launch.py set to True. By adapting the list recorded_topics, the ROS topics getting written to the bag file can be chosen.

Binary Format

Besides the ROS data formats that can be recorded, it is also possible to logg the binary data stream in .gsdb files. The binary data get saved automatically by default in the directory of the executed terminal. We recommend to always log .gsdb files for support purposes and for being able to reprocess the raw data with new ROS driver updates. If not needed, the loggiung can be disabled in the adma_driver.launch.py by setting log_gsdb_arg to False.

This enables you to use the data in the ADMA Postprocessing toolchain seamlessly.

Applikationsingenieur | bei GeneSys seit 2014

Notify me about Updates