Convert ROS1 bag to ROS2 bag
Last updated
Was this helpful?
Last updated
Was this helpful?
For rosbag files recorded in ROS1 environment, we cannot use them directly in ROS2 environment. There are some discussions on workarounds. In summary, there are two ways, as summarized in .
rosbag_v2
plugin and ros1_bridge
Requirement: Ubuntu 20 or below, where we have both ROS1 and ROS2 available.
Follow the instructions in and to install.
We can then playback ros1 bag files in a ros2 environment.
Additional comments: For Ubuntu 22 or above environment, according to , it may be possible to install ros1_bridge alongside ros2, if ros2 is installed from source. In practice, I did not run through this successfully and got stuck at the ros-core-dev : Depends: catkin but it is not installable
error.
References:
rosbags
to convert bag files (Recommended)This is a python package that does not depend on ros environment. We can convert a ros1 bag file into ros2 bag by running the following commands.
References: