Classic bags: ROS 2 bags with ROS 1 interface

One frequent criticism of ROS 2 is that things were easier to do in ROS 1. ROS dos brings with it an unprecedented level of flexibility for things like serialization format and backend data storage. But sometimes you don’t care and just want to look at the data NOW.

classic_bags

Enter classic_bags: a simplified ROS 2 interface in the style of ROS 1 for reading and writing bag files

The APIs for both Python and C++ were taken directly from the ROS 1 Wiki.

import classic_bags
bag = classic_bags.Bag('test.bag')
for topic, msg, t in bag.read_messages(topics=['chatter', 'numbers']):
    print(msg)

See the README for more examples.

Coming soon to a distro near you.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.