AIT-Assistive-Autonomous-Systems / ros2bag_tools

Tool extensions for ros2bag cli
122 stars 34 forks source link

TopicMetadata API changes in rolling #34

Open devrite opened 4 months ago

devrite commented 4 months ago

Rolling has changed the topic metadata info and added topic_id (returned by storage or upon creation), qos and other info.

See https://github.com/ros2/rosbag2/pull/1538

They probably can be null initialized (need to check) but we need to adapt the code if possible maintaining backwards while hiding it from the user/dev somehow if they do not need or touch it.

devrite commented 4 months ago

Should be possible: https://docs.ros.org/en/rolling/Tutorials/Advanced/Recording-A-Bag-From-Your-Own-Node-Py.html#record-synthetic-data-from-a-node

        topic_info = rosbag2_py._storage.TopicMetadata(
            id=0,
            name='synthetic',
            type='example_interfaces/msg/Int32',
            serialization_format='cdr')
        self.writer.create_topic(topic_info)
devrite commented 2 months ago

Also see https://github.com/ros2/rosbag2/pull/1648 for QoS changes.