1
$\begingroup$

Rosanswers logo

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


Originally posted by felixn on ROS Answers with karma: 23 on 2022-07-05

Post score: 1

$\endgroup$

1 Answer 1

1
$\begingroup$

Rosanswers logo

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.


Originally posted by gvdhoorn with karma: 86574 on 2022-07-05

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by felixn on 2022-07-06:
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

Comment by gvdhoorn on 2022-07-06:\

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".

Comment by felixn on 2022-07-06:
true : I probably foccussed too much on the "getting started" page : on the convert page, it is clear indeed

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.