Home

Awesome

rosbag2 composable recorder

A composable recorder node for ROS2 to allow recording rosbags without inter process communication.

NOTE: If you are running on ROS2 Jazzy or later, do not use this repo. A composable recorder node is now part of the standard rosbag2 framework.

Supported platforms

Currently only tested under Ubuntu 20.04/22.04. Will require ROS2 Galactic or later.

How to build

Create a workspace (e.g. ros2_ws), clone this repo, and build:

mkdir -p ~/ros2_ws/src
cd ~/ros2_ws/src
git clone -b galactic https://github.com/ros2/rosbag2.git
git clone https://github.com/berndpfrommer/rosbag2_composable_recorder
cd ..
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
. install/setup.bash

How to run

This recorder node is meant to be used as a composable node together with other nodes that produce a large number of messages. The launch file recorder.launch.py can serve as a template. Make a copy, edit it to your liking, then launch it.

ros2 launch rosbag2_composable_recorder recorder.launch.py

Setting the parameter start_recording_immediately will cause the recording to start immediately. To start the recording later:

ros2 service call /start_recording std_srvs/srv/Trigger

Alternatively, use the python script:

ros2 run rosbag2_composable_recorder start_recording.py

To stop the recording you have to kill (Ctrl-C) the recording driver.

Parameters

License

This software is issued under the Apache License Version 2.0.