Last active
September 19, 2020 03:17
-
-
Save sven-bock/408b6e845666e06a0cf4002271c2780f to your computer and use it in GitHub Desktop.
rosbag filter specific TF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Removes all tfs except the one that has 'base_footprint' as child frame id | |
rosbag filter old.bag new.bag "topic != '/tf' or (len(m.transforms)>0 and m.transforms[0].child_frame_id=='base_footprint')" | |
#Same as above but limiting other topics to '/odom' and '/scan' | |
rosbag filter old.bag new.bag "topic == '/odom' or topic == '/scan' or (topic == '/tf' and len(m.transforms)>0 and m.transforms[0].child_frame_id=='imu_link')" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment