ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

convert/use rosbag1 with ROS2 on Ubuntu 22.04

asked 2022-07-05 04:39:02 -0500

felixn gravatar image

Hi,

I just got several datasets in the form of ROS1 rosbags.

I would like to use them within ROS2 (humble), either by converting them to ROS2 bags, or by replaying them in ROS2, whatever is easier. Or even extract the data to text files + images.

I had the same situation before, while still using Ubuntu 20.04, and solved it playing the bags in ROS1, then using ros1_bridge to convert them to ROS2.

On Ubuntu 22.04 however, ROS1 (Noetic) is not supported as far as I understand, so I can't run the rosbag play in ROS1.

So how can I possibly get the data out of a ROS1 bag on ubuntu 22.04? Do you know any conversion tool not depending on ROS1?

Thanks a lot in advance Felix

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2022-07-05 12:31:33 -0500

gvdhoorn gravatar image

The developers behind Ternaris released conversion tools some time ago.

See Rosbags - the pure python library for everything rosbag for the announcement on ROS Discourse.

See ternaris.gitlab.io/rosbags for the documentation.

Specifically: convert.

edit flag offensive delete link more

Comments

Thanks a lot. It worked perfectly (and even faster than real time).

Just one note for those trying to do the same : the rosbags-convert command has to be used directy in terminal, and not from a python script as one might think from the python example just above in the documentation

felixn gravatar image felixn  ( 2022-07-06 02:58:19 -0500 )edit

Just one note for those trying to do the same : the rosbags-convert command has to be used directy in terminal, and not from a python script as one might think from the python example just above in the documentation

wasn't that clear from the convert page? It states:

The rosbags.convert package includes a CLI tool to convert legacy rosbag1 files to rosbag2 and vice versa.

"CLI tool" -> "command line interface tool".

gvdhoorn gravatar image gvdhoorn  ( 2022-07-06 03:16:29 -0500 )edit

true : I probably foccussed too much on the "getting started" page : on the convert page, it is clear indeed

felixn gravatar image felixn  ( 2022-07-06 03:44:28 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-07-05 04:39:02 -0500

Seen: 1,552 times

Last updated: Jul 05 '22