Ask Your Question

conversion of rosbag file format to rosbag2 file format.

asked 2019-01-31 06:52:13 -0600

kishornaik10 gravatar image

I have multiple rosbag (.bag) files stored, I want to use those files in ROS2 (.db3).
Is any tool available to convert the files directly compatible to ROS2?

Currently, I am using ros1bridge, but it will be good if tool is there to help.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-02-01 13:51:14 -0600

Karsten gravatar image

updated 2020-01-05 10:55:33 -0600

lucasw gravatar image

there is currently no explicit command line tool which converts from ros1 to ros2. however, the current rosbag2 cli allows to replay ros1 bag files and can thus be used to record a new ros2 bag file based on the replay of ros1.

you can find a bit of documentation here on how to replay ros1 bag files:

In order to use the plugins, again, the ROS 1 installation must be sourced before sourcing the ROS 2 installation. You can then just use the plugin through the regular interface. ...

For playing, one can similarly write:

ros2 bag play -s rosbag_v2 <path_to_bagfile>

If there is ROS 1 data where no topic matching exists to ROS 2 these topics are ignored when replying. When calling ros2 bag info, one can see a list of mismatching topics: ...

that being said, the api is functional enough to replay ros1 bag files and i believe it shouldn't be too hard to develop a real conversion tool for it based on that API.

edit flag offensive delete link more


Updated the link and added some text from it so it can be tracked done more easily if it moves again. 'there is currently no explicit command line tool which converts from ros1 to ros2.' is still true now?

lucasw gravatar image lucasw  ( 2020-01-05 10:56:05 -0600 )edit

Looks like this is still pending with an issue at

marguedas gravatar image marguedas  ( 2020-02-04 03:35:50 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-01-31 06:52:13 -0600

Seen: 814 times

Last updated: Jan 05 '20