MaxFleur/ros2_utils_tool

A simple, but powerful toolset for various ROS2 utilities, with full UI and partial CLI support.

104

stars

261

commits

C++

primary language

Sep 7, 2026

updated

catch2
cpp
cpp20
qt
ros2
ros2-jazzy
ros2-kilted
ros2-lyrical
ros2-rolling

README

ros2_utils_tool - An intuitive and powerful toolset for everyday ROS2 activities.

The ros2_utils_tool package provides a large set of tools for various ROS2 activities. These include converting operations between bag and file data, UI tools for terminal based operations (for example playing and recording ROS bags) and publishing data from files.

  • 🎨 UI support: For every tool, full UI support is provided. A comprehensive and intuitive design making use of overarching layout designs, prefilled UI elements and tooltips makes sure that you get everything done as fast as possible.
  • 📟 Partial CLI support: For almost every tool there is a custom or official ROS2 CLI option, providing fast and precise operations which can also be used for scripting. Plus, they give you the full hacker experience!
  • 🚀 Highly optimized: Many tools support multithreading or hardware acceleration, vastly speeding up operations. Additionally, you can configure the CPU usage to prevent your system from slowing down too much.
  • 💾 Settings storage: UI elements input can be stored for later reusage, allowing you to easily rerun any tool.
  • ⚙️ Options: ros2_utils_tool provides additional functions for configuring warnings, input settings and more.

The most important information can be found here:

Provided tools

Below is a list of all tools which are currently available in the ros2_utils_tool:

ToolDescriptionCLI support
Conversion Tools
Bag to VideoExport a ROS bag video topic to a video. Supports mp4, mkv and avi.X
Video to BagPort a video file to a ROS bag. Supports mp4, mkv and avi.X
Bag to PCDsExport a ROS bag point cloud topic to a set of pcd files.X
PCDs to BagPort a set of PCD files to a ROS bag.X
Bag to ImagesExport a ROS bag video topic to an image sequence. Images can be in jpg, png or bmp.X
Bag TF2 to FileExport a ROS bag tf2 topic to a json or yaml file.X
Bag to YAMLExport bag topic messages to one or multiple yaml files.X
Bag Tools
Edit BagCreate a bag file out of an existing one via renaming, removing or cropping topics.
Merge BagsMerge selected topics of two bags into a new bag file.X
Record BagRecord a ROS bag, UI based. Supports topic and service selection, compression, bag splitting and including hidden/unpublished topics.X (ros2 bag record)
Dummy BagCreate a ROS bag with dummy message data. Supported message types are images, strings, integers, point clouds and tf2.X
Compress BagCompress a bag file.X
Decompress BagDecompress a compressed bag file.X
Play BagPlay a bag file, UI based. Supports topic and service selection and interactive commands such as stopping/resuming, rate adjustion and message skipping.X (ros2 bag play)
Publishing Tools
Video as ROS TopicPublish a video file to a ROS image message topic.X
Video as ROS TopicPublish a set of images to a ROS image message topic.X
Send TF2Send a static or non-static ROS transformation (tf2).X
Info Tools
Topic/Service InformationUI based, show current topics and services with name and type, including publishers and subscribers.X (ros2 topic list/ros2 service list)
Bag InfoUI based bag info vis.X (ros2 bag info)

[!Note]
This package still is in active development. More tools might be added later in the future, while already existing ones might expand and change constantly.

Installation

Prerequisites

A working ROS2 distribution is required. As of now, jazzy, kilted, lyrical and rolling are supported. Make sure that your ROS distro is properly sourced:

source /opt/ros/distro_name/setup.bash

[!Note]
As of version 0.15.0, humble is no longer supported and won't receive any more feature updates. However, critical bugfixes will still be included (see the humble branch).

Dependencies

The following packages are required to be installed manually:

  • Qt6/Qt5 for all UI features as well as some convenience functionalities.
  • catch2_ROS for Catch2-based unit tests with ROS2.

The following packages are also required, but should be installed automatically with ROS:

  • OpenCV for writing video files.
  • cv_bridge for converting ROS sensor images to cv matrices and vice versa.
  • PCL for creating point clouds and converting them from and to ROS messages.

The following packages are optional:

All dependencies aside from ROS2 can be installed at once using the following command:

sudo apt install libopencv-dev ros-&ROS_DISTRO-cv-bridge libpcl-dev qt6-base-dev qtbase5-dev ros-&ROS_DISTRO-catch-ros2

For example for Jazzy:

sudo apt install libopencv-dev ros-jazzy-cv-bridge libpcl-dev qt6-base-dev qtbase5-dev ros-jazzy-catch-ros2

Alternatively, use rosdep to install all dependencies.

Build the tool

  1. Navigate to your ROS2 workspace's src direction:
cd path/to/your/workspace/src
  1. Clone this repository:
git clone https://github.com/MaxFleur/ros2_utils_tool.git
  1. Navigate back to your workspace:
cd path/to/your/workspace/
  1. Build the project:
colcon build

Usage

Always source your workspace first:

source install/setup.bash

UI

ros2 run ros2_utils_tool tool_ui

CLI tools

For each CLI tool, type -h or --help to get additional information regarding all flags, alongside example commands.

Bag to Video Tool:

ros2 run ros2_utils_tool tool_bag_to_video /path/to/bag /path/to/video

(Note that a topic can be specified optionally. If no topic is specified, the first available video topic is used. The video needs to have an .mp4 or .mkv appendix).

Video to Bag Tool:

ros2 run ros2_utils_tool tool_video_to_bag /path/to/video /path/to/bag

(Note that a topic can be specified optionally. If no topic is specified, a predefined topic name will be taken. The video needs to have an .mp4 or .mkv appendix).

Bag to PCDs Tool:

ros2 run ros2_utils_tool tool_bag_to_pcds /path/to/bag /path/to/pcds

(Note that a topic can be specified optionally. If no topic is specified, the first available point cloud topic is used).

PCDs to Bag Tool:

ros2 run ros2_utils_tool tool_bag_to_pcds /path/to/pcds /path/to/bag

(Note that a topic can be specified optionally. If no topic is specified, a predefined topic name will be taken).

Bag to Images Tool:

ros2 run ros2_utils_tool tool_bag_to_images /path/to/bag /path/to/images

(Note that a topic can be specified optionally. If no topic is specified, the first available video topic is used. image_format needs to be either jpg, bmp or png, jpg is default).

Bag TF2 to File Tool:

ros2 run ros2_utils_tool tool_tf2_to_file /path/to/bag /path/to/output

(Accepted file formats are json or yaml. Note that a topic can be specified optionally. If no topic is specified, the first available tf2 topic is used).

Bag to YAML Tool:

ros2 run ros2_utils_tool tool_message_to_yaml /path/to/bag /path/to/yaml_dir

(Note that a topic can be specified optionally. If no topic is specified, the first available topic is used).

Merge Bags Tool:

ros2 run ros2_utils_tool tool_merge_bags path/to/first_bag path/to/second_bag -t1 topic_name_1 (...) -t2 topic_name_2 (...) path/to/output_bag

Dummy Bag Tool:

ros2 run ros2_utils_tool tool_dummy_bag path/to/bag topic_type_1 topic_name_1 ... message_count

(Topic type needs to be Integer, Image or PointCloud, String or TF2, up to five topics can be written, message_count needs to be a value from 1 to 1000).

Compress Bag Tool:

ros2 run mediassist4_ros_tools tool_compress_bag path/to/uncompressed/source/bag /path/to/compressed/target/bag

(Compression per file is default, use -m message to compress per message).

Decompress Bag Tool:

ros2 run mediassist4_ros_tools tool_decompress_bag path/to/compressed/source/bag /path/to/uncompressed/target/bag

Publish Video Tool:

ros2 run ros2_utils_tool tool_publish_video path/to/video

(Note that a topic can be specified optionally. If no topic is specified, a predefined topic name will be taken. The video needs to have an .mp4 or .mkv appendix).

Publish Images Tool:

ros2 run ros2_utils_tool tool_publish_images path/to/images

(Note that a topic can be specified optionally. If no topic is specified, a predefined topic name will be taken. Images need to be of format jpg, bmp or png).

Send TF2 Tool:

ros2 run ros2_utils_tool tool_send_tf2

(Translation and rotation are specified using the flags -t and -ro respectively. Transformations are static per default, specifying an additional rate will send a nonstatic one instead).

Unit tests:

ros2 run ros2_utils_tool tool_tests

License

The ros2_utils_tool package is licensed under EUPLv1.2.

Contribution

If you discover a new bug or wish for a new feature, feel free to open a new issue.

[!Note]
If you want to contribute another feature, please use the provided Uncrustify file for code formatting. As the main branch is only updated for new versions or critical bugfixes, the develop branch is the most current one, providing the newest updates and features. So please open a merge request with develop as the target branch.

Contributors

MaxFleur

260 commits

ivrolan

1 commits

MaxFleur/ros2_utils_tool

A simple, but powerful toolset for various ROS2 utilities, with full UI and partial CLI support.

104

stars

261

commits

C++

primary language

Sep 7, 2026

updated

catch2
cpp
cpp20
qt
ros2
ros2-jazzy
ros2-kilted
ros2-lyrical
ros2-rolling

README

ros2_utils_tool - An intuitive and powerful toolset for everyday ROS2 activities.

The ros2_utils_tool package provides a large set of tools for various ROS2 activities. These include converting operations between bag and file data, UI tools for terminal based operations (for example playing and recording ROS bags) and publishing data from files.

  • 🎨 UI support: For every tool, full UI support is provided. A comprehensive and intuitive design making use of overarching layout designs, prefilled UI elements and tooltips makes sure that you get everything done as fast as possible.
  • 📟 Partial CLI support: For almost every tool there is a custom or official ROS2 CLI option, providing fast and precise operations which can also be used for scripting. Plus, they give you the full hacker experience!
  • 🚀 Highly optimized: Many tools support multithreading or hardware acceleration, vastly speeding up operations. Additionally, you can configure the CPU usage to prevent your system from slowing down too much.
  • 💾 Settings storage: UI elements input can be stored for later reusage, allowing you to easily rerun any tool.
  • ⚙️ Options: ros2_utils_tool provides additional functions for configuring warnings, input settings and more.

The most important information can be found here:

Provided tools

Below is a list of all tools which are currently available in the ros2_utils_tool:

ToolDescriptionCLI support
Conversion Tools
Bag to VideoExport a ROS bag video topic to a video. Supports mp4, mkv and avi.X
Video to BagPort a video file to a ROS bag. Supports mp4, mkv and avi.X
Bag to PCDsExport a ROS bag point cloud topic to a set of pcd files.X
PCDs to BagPort a set of PCD files to a ROS bag.X
Bag to ImagesExport a ROS bag video topic to an image sequence. Images can be in jpg, png or bmp.X
Bag TF2 to FileExport a ROS bag tf2 topic to a json or yaml file.X
Bag to YAMLExport bag topic messages to one or multiple yaml files.X
Bag Tools
Edit BagCreate a bag file out of an existing one via renaming, removing or cropping topics.
Merge BagsMerge selected topics of two bags into a new bag file.X
Record BagRecord a ROS bag, UI based. Supports topic and service selection, compression, bag splitting and including hidden/unpublished topics.X (ros2 bag record)
Dummy BagCreate a ROS bag with dummy message data. Supported message types are images, strings, integers, point clouds and tf2.X
Compress BagCompress a bag file.X
Decompress BagDecompress a compressed bag file.X
Play BagPlay a bag file, UI based. Supports topic and service selection and interactive commands such as stopping/resuming, rate adjustion and message skipping.X (ros2 bag play)
Publishing Tools
Video as ROS TopicPublish a video file to a ROS image message topic.X
Video as ROS TopicPublish a set of images to a ROS image message topic.X
Send TF2Send a static or non-static ROS transformation (tf2).X
Info Tools
Topic/Service InformationUI based, show current topics and services with name and type, including publishers and subscribers.X (ros2 topic list/ros2 service list)
Bag InfoUI based bag info vis.X (ros2 bag info)

[!Note]
This package still is in active development. More tools might be added later in the future, while already existing ones might expand and change constantly.

Installation

Prerequisites

A working ROS2 distribution is required. As of now, jazzy, kilted, lyrical and rolling are supported. Make sure that your ROS distro is properly sourced:

source /opt/ros/distro_name/setup.bash

[!Note]
As of version 0.15.0, humble is no longer supported and won't receive any more feature updates. However, critical bugfixes will still be included (see the humble branch).

Dependencies

The following packages are required to be installed manually:

  • Qt6/Qt5 for all UI features as well as some convenience functionalities.
  • catch2_ROS for Catch2-based unit tests with ROS2.

The following packages are also required, but should be installed automatically with ROS:

  • OpenCV for writing video files.
  • cv_bridge for converting ROS sensor images to cv matrices and vice versa.
  • PCL for creating point clouds and converting them from and to ROS messages.

The following packages are optional:

All dependencies aside from ROS2 can be installed at once using the following command:

sudo apt install libopencv-dev ros-&ROS_DISTRO-cv-bridge libpcl-dev qt6-base-dev qtbase5-dev ros-&ROS_DISTRO-catch-ros2

For example for Jazzy:

sudo apt install libopencv-dev ros-jazzy-cv-bridge libpcl-dev qt6-base-dev qtbase5-dev ros-jazzy-catch-ros2

Alternatively, use rosdep to install all dependencies.

Build the tool

  1. Navigate to your ROS2 workspace's src direction:
cd path/to/your/workspace/src
  1. Clone this repository:
git clone https://github.com/MaxFleur/ros2_utils_tool.git
  1. Navigate back to your workspace:
cd path/to/your/workspace/
  1. Build the project:
colcon build

Usage

Always source your workspace first:

source install/setup.bash

UI

ros2 run ros2_utils_tool tool_ui

CLI tools

For each CLI tool, type -h or --help to get additional information regarding all flags, alongside example commands.

Bag to Video Tool:

ros2 run ros2_utils_tool tool_bag_to_video /path/to/bag /path/to/video

(Note that a topic can be specified optionally. If no topic is specified, the first available video topic is used. The video needs to have an .mp4 or .mkv appendix).

Video to Bag Tool:

ros2 run ros2_utils_tool tool_video_to_bag /path/to/video /path/to/bag

(Note that a topic can be specified optionally. If no topic is specified, a predefined topic name will be taken. The video needs to have an .mp4 or .mkv appendix).

Bag to PCDs Tool:

ros2 run ros2_utils_tool tool_bag_to_pcds /path/to/bag /path/to/pcds

(Note that a topic can be specified optionally. If no topic is specified, the first available point cloud topic is used).

PCDs to Bag Tool:

ros2 run ros2_utils_tool tool_bag_to_pcds /path/to/pcds /path/to/bag

(Note that a topic can be specified optionally. If no topic is specified, a predefined topic name will be taken).

Bag to Images Tool:

ros2 run ros2_utils_tool tool_bag_to_images /path/to/bag /path/to/images

(Note that a topic can be specified optionally. If no topic is specified, the first available video topic is used. image_format needs to be either jpg, bmp or png, jpg is default).

Bag TF2 to File Tool:

ros2 run ros2_utils_tool tool_tf2_to_file /path/to/bag /path/to/output

(Accepted file formats are json or yaml. Note that a topic can be specified optionally. If no topic is specified, the first available tf2 topic is used).

Bag to YAML Tool:

ros2 run ros2_utils_tool tool_message_to_yaml /path/to/bag /path/to/yaml_dir

(Note that a topic can be specified optionally. If no topic is specified, the first available topic is used).

Merge Bags Tool:

ros2 run ros2_utils_tool tool_merge_bags path/to/first_bag path/to/second_bag -t1 topic_name_1 (...) -t2 topic_name_2 (...) path/to/output_bag

Dummy Bag Tool:

ros2 run ros2_utils_tool tool_dummy_bag path/to/bag topic_type_1 topic_name_1 ... message_count

(Topic type needs to be Integer, Image or PointCloud, String or TF2, up to five topics can be written, message_count needs to be a value from 1 to 1000).

Compress Bag Tool:

ros2 run mediassist4_ros_tools tool_compress_bag path/to/uncompressed/source/bag /path/to/compressed/target/bag

(Compression per file is default, use -m message to compress per message).

Decompress Bag Tool:

ros2 run mediassist4_ros_tools tool_decompress_bag path/to/compressed/source/bag /path/to/uncompressed/target/bag

Publish Video Tool:

ros2 run ros2_utils_tool tool_publish_video path/to/video

(Note that a topic can be specified optionally. If no topic is specified, a predefined topic name will be taken. The video needs to have an .mp4 or .mkv appendix).

Publish Images Tool:

ros2 run ros2_utils_tool tool_publish_images path/to/images

(Note that a topic can be specified optionally. If no topic is specified, a predefined topic name will be taken. Images need to be of format jpg, bmp or png).

Send TF2 Tool:

ros2 run ros2_utils_tool tool_send_tf2

(Translation and rotation are specified using the flags -t and -ro respectively. Transformations are static per default, specifying an additional rate will send a nonstatic one instead).

Unit tests:

ros2 run ros2_utils_tool tool_tests

License

The ros2_utils_tool package is licensed under EUPLv1.2.

Contribution

If you discover a new bug or wish for a new feature, feel free to open a new issue.

[!Note]
If you want to contribute another feature, please use the provided Uncrustify file for code formatting. As the main branch is only updated for new versions or critical bugfixes, the develop branch is the most current one, providing the newest updates and features. So please open a merge request with develop as the target branch.

Contributors

MaxFleur

260 commits

ivrolan

1 commits

Languages

C++

96.0%

CMake

4.0%