Open imstevenpmwyca opened 2 years ago
More generically I think I would call this feature "content-based filtering". This would involve the converter feature, but also needs the ability to provide an arbitrary python expression.
I think, though, that you should currently be able to do this via a small Python script using the rosbag2_py API.
For those who might be interested, I quickly did a script for the original issue using the rosbag2_py API as suggested. It is probably not the best, but it does the job. https://github.com/imstevenpmwork/filter_tf_topic_from_bag
related to https://github.com/ros2/design/pull/282
Description
Something similar to what this does in ros1:
rosbag filter mappingData_input.bag mappingData_output.bag 'topic != "/tf" or topic == "/tf" and m.transforms[0].header.frame_id != "map" and m.transforms[0].child_frame_id != "odom"'
Completion Criteria
After filtering a bag with a tf that has map->odom->base we get a new bag with a tf that has only odom->base