ros2bag_invert supports inverting ROS2 bag files with custom messages to ROS bag files.
System dependencies (tested on Ubuntu 22.04)
- rosbags (tested with version 0.10.3)
sudo pip3 install rosbags
To use this script, please follow the steps below.
- Clone the repository
git clone https://github.com/ASIG-X/ros2bag_invert
-
Add the folder of your own customed messages to the main directory.
Please check folder
livox_ros_driver2
as an example. -
Run the following command in the terminal
cd ros2bag_invert
python3 invertBag/main.py -src /path/to/source/bag/file/ -dst /path/to/destination/bag/file/bag_name.bag -msg_paths /path/to/custom/messages/message_name.msg
# e.g., python3 invertBag/main.py -src ~/Documents/testbag/ -dst ./testbag.bag -msg_paths ./livox_ros_driver2/msg/CustomPoint.msg ./livox_ros_driver2/msg/CustomMsg.msg
Ziyu Cao (email: [email protected])
Kailai Li (email: [email protected])
The source code is released under GPLv3 license.
We are constantly working on improving our code. For any technical issues, please contact Ziyu Cao ([email protected]).