Skip to content

Software

ros2_unbag

By Institut für Kraftfahrzeuge, RWTH Aachen, ika, Germany (checked on github.com/ika-rwth-aachen (opens in a new tab)), from github.com/ika-rwth-aachen/ros2_unbag (opens in a new tab)

  • Middleware
  • Tool
  • MIT

A ROS 2 tool with a GUI and CLI that exports topics from .db3 or .mcap bag files into formats such as CSV, JSON, PCD and images. It supports custom export routines and processors.

Facts

GitHub stars
204read on 22 Nov 2026
Last update
6 Nov 2026Newest commit on main
Maintenance
Activea commit in the last 90 days
Difficulty
Beginner

Checked on GitHub on 22 Nov 2026.

Licenses

Code
MIT (opens in a new tab)

Read by Robotheca from LICENSE (opens in a new tab) (MIT) at commit 786aefb (opens in a new tab), on 15 Nov 2026.

Commercial use
Yes

At a glance

What it is
  • Provides an interactive GUI for exploring bag contents and configuring exports.
  • Offers a ros2 unbag CLI plugin for automation and scripting, with JSON config files for repeatable runs.
  • Includes export routines for all message types, and custom export plugins can be added for any ROS 2 message or format.
  • Custom processors can filter, transform or enrich messages before export.
  • Optional resampling time-aligns topics to a master topic using 'last' or 'nearest' association.
  • Can run multiple worker processes for export, with adjustable CPU usage.

Robotheca's summary of the project's documents, not the creator's words.

Robots on Robotheca
No robot on Robotheca uses it yet.
Licence
MIT. Commercial use: Yes. Where it was read
Install
In the creator's words: The project's README (opens in a new tab)
Maintenance
Active, last commit on 6 Nov 2026.

Use it

How to install it, in the creator's words: The project's README (opens in a new tab)

Robotheca doesn't review code. Read it before running it.

Files and versions

Facts read at commit 786aefb

Robotheca read the repository at two versions: the summary at aa2a68c and the facts and the README at 786aefb (read on 22 Nov 2026).

Robotheca never hosts the code: each link goes to the creator's own page.

The README

The creator's own README, copied as written: README.md by Institut für Kraftfahrzeuge, RWTH Aachen, ika, at commit 786aefb, under MIT (opens in a new tab). The original on GitHub (opens in a new tab).

Read the README here

Image (opens in a new tab)

ros2 unbag - fast ROS 2 bag export for any format

(opens in a new tab) (opens in a new tab) (opens in a new tab) (opens in a new tab) (opens in a new tab)

ros2 unbag is a powerful ROS 2 tool featuring an intuitive GUI and flexible CLI for extracting topics from .db3 or .mcap bag files into formats like CSV, JSON, PCD, images, and more.

  • 🎨 Intuitive GUI interface for interactive bag exploration and export configuration
  • ⚙️ Full-featured ROS 2 CLI plugin: ros2 unbag <args> for automation and scripting
  • 🔌 Pluggable export routines enable export of any message to any type
  • 🔧 Custom processors to filter, transform or enrich messages
  • ⏱️ Time‐aligned resampling (last | nearest)
  • 🚀 Multi‐process export with adjustable CPU usage
  • 💾 JSON config saving/loading for repeatable workflows

[!TIP] Quick install: sudo apt update && sudo apt install ros-<distro>-unbag

ROS binary packages are now the official distribution channel. See the distro badges above for current availability; installation details and a temporary pip fallback are provided below.

Table of Contents
Introduction

The GUI makes it easy to inspect bag contents, select topics, configure export formats, build processor chains, and manage resampling. For automation and scripting workflows, the CLI provides the same export capabilities through command-line arguments or JSON configuration files.

It comes with export routines for all message types (opens in a new tab) (sensor data, point clouds, images). You need a special file format or message type? Add your own export plugin (opens in a new tab) for any ROS 2 message or format, and chain custom processors (opens in a new tab) to filter, transform or enrich messages (e.g. drop fields, compute derived values, remap frames).

Optional resampling (opens in a new tab) synchronizes your data streams around a chosen master topic—aligning each other topic either to its last‑known sample (“last”) or to the temporally closest sample (“nearest”)—so you get a consistent sample count in your exports.

For high‑throughput workflows, ros2 unbag can spawn multiple worker processes and lets you tune CPU usage (opens in a new tab). Your topic selections, processor chains, export parameters and resampling mode (last or nearest) can be saved to and loaded from a JSON configuration (opens in a new tab), ensuring reproducibility across runs.

Whether you prefer the GUI for interactive exploration or ros2 unbag <args> for automated pipelines, you have a flexible, extensible way to turn bag files into the data you need.

Installation
Install via apt (Recommended)

ros2 unbag is released as a binary package for ROS 2 Humble, Jazzy, Kilted, Lyrical, and Rolling. Install it from the ROS apt repositories:

sudo apt update
sudo apt install ros-<distro>-unbag

Replace <distro> with your ROS 2 distribution (e.g. humble, jazzy, kilted, lyrical, or rolling). Once installed, source your ROS 2 installation and ros2 unbag is ready to use.

ROS binary repositories are updated on ROS build farm sync cycles, so a new release may not be available for every distribution immediately. The distro badges at the top of this README show the versions currently available via apt. If your distro has not been synced yet, use the temporary PyPI fallback:

pip install ros2-unbag

[!WARNING] PyPI/pip is no longer the official distribution channel; use the ROS binary package once it becomes available for your distro.

From source
  1. Create a ROS 2 workspace and clone the repository into src:

    mkdir -p ros2_ws/src
    git clone https://github.com/ika-rwth-aachen/ros2_unbag.git ros2_ws/src/ros2_unbag
    cd ros2_ws
    
  2. Source your ROS 2 installation:

    source /opt/ros/<distro>/setup.bash
    
  3. Install the package dependencies via rosdep:

    rosdep install --from-paths src --ignore-src -r -y
    
  4. Build the package with colcon:

    colcon build --packages-select unbag
    
  5. Source the workspace overlay:

    source install/setup.bash
    
Docker

You can skip local installs by running our ready‑to‑go Docker image:

docker pull ghcr.io/ika-rwth-aachen/ros2_unbag:latest

This image comes with ROS 2 Jazzy and ros2 unbag preinstalled. To launch it:

  1. Clone or download the docker/docker-compose.yml in this repo.

  2. Run:

    docker compose -f docker/docker-compose.yml up
    
  3. If you need the GUI, first enable X11 forwarding on your host (at your own risk!):

    xhost +local:
    

    Then start the container as above—the GUI will appear on your desktop.

Quick Start

ros2 unbag offers both an intuitive GUI for interactive workflows and a powerful CLI for automation and scripting.

GUI Mode (Recommended for First-Time Users)

Launch the interactive graphical interface:

ros2 unbag
CLI Mode (For Automation & Scripting)

Run the CLI tool by calling ros2 unbag with a path to a rosbag and an export config, consisting of one or more topic:format:[subdirectory] combinations:

ros2 unbag <path_to_rosbag> --export </topic:format[:subdir]>…

Alternatively, you can load a config file. In this case, you do not need any --export flag:

ros2 unbag <path_to_rosbag> --config <config.json>

The config file structure is described here (opens in a new tab).

In addition to these required arguments, the following optional flags are available:

FlagValue/FormatDescriptionUsageDefault
bag<path>Path to ROS 2 bag file (.db3 / .mcap) or split bag folder.CLI mode (required)–
-e, --export/topic:format[:subdir]Topic → format export spec. Repeatable.CLI mode (required or --config)–
-o, --output-dir<directory>Base directory for all exports.Optional.
--naming<pattern>Filename pattern. Supports %name, %index, %timestamp, %master_timestamp (when resampling), and strftime (e.g. %Y-%m-%d_%H-%M-%S) using ROS timestampsOptional%name_%index
--resample/master:association[,discard_eps].Time‑align to master topic. association = last or nearest; nearest needs a numeric discard_eps.Optional–
-p, --processing/topic:processor[:arg=value,…]Pre‑export processor spec; repeat to build ordered chains (executed in the order provided).Optional–
--cpu-percentage<float>% of cores for parallel export (0–100). Use 0 for single‑threaded.Optional80.0
--config<config.json>JSON config file path. Overrides all other args (except bag).Optional–
--gui(flag)Launch Qt GUI. If no bag/--export/--config, GUI is auto‑started.Optionalfalse
--use-routine<file.py>Load a routine for this run only (no install).Optional–
--use-processor<file.py>Load a processor for this run only (no install).Optional–
--install-routine<file.py>Copy & register custom export routine.Standalone–
--install-processor<file.py>Copy & register custom processor.Standalone–
--uninstall-routine(flag)Interactive removal of an installed routine.Standalone-
--uninstall-processor(flag)Interactive removal of an installed processor.Standalone-
--help(flag)Show usage information and exit.Standalone-

Example:

ros2 unbag rosbag/rosbag.mcap 
    --output-dir /docker-ros/ws/example/ --export /lidar/point_cloud:pointcloud/pcd:lidar --export /radar/point_cloud:pointcloud/pcd:radar --resample /lidar/point_cloud:last,0.2

⚠️ If you specify the --config option (e.g., --config configs/my_config.json), the tool will load all export settings from the given JSON configuration file. In this case, all other command-line options except <path_to_rosbag> are ignored, and the export process is fully controlled by the config file. The <path_to_rosbag> is always required in CLI use.

Documentation

For detailed information on advanced features, see the following guides:

Acknowledgements

This research is accomplished within the following research projects:

ProjectFunding Source
Image: 4-CAD (opens in a new tab) (opens in a new tab)Funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) DFG Proj. Nr. 503852364

| | Image: iEXXODUS (opens in a new tab) (opens in a new tab) | Funded by the European Union’s Horizon Europe Research and Innovation Programme under Grant Agreement No 101146091 |

| | Image: SYNERGIES (opens in a new tab) (opens in a new tab) | Funded by the European Union’s Horizon Europe Research and Innovation Programme under Grant Agreement No 101146542 |

|

Notice

[!IMPORTANT]
This repository is open-sourced and maintained by the Institute for Automotive Engineering (ika) at RWTH Aachen University (opens in a new tab).
We cover a wide variety of research topics within our Vehicle Intelligence & Automated Driving (opens in a new tab) domain.
If you would like to learn more about how we can support your automated driving or robotics efforts, feel free to reach out to us!
:email: opensource@ika.rwth-aachen.de (opens in a new tab)

Robotheca lists software as a reference: nothing is hosted or run here, and every fact links to where it was read.