rosbag/Tutorials/Producing filtered bag files
rosbag filter <your bagfile> turtlecom.bag 'topic == "/turtle1/command_velocity"'
Now run rosbag info on turtlecom.bag. You should see a single topic for command_velocity.
The python filter functionality can extend beyond separating out messages by topic name - we can also filter based on the actual data in the message. For instance, suppose that my original teleop of turtlesim produced the following behavior:
github上有个老哥用qt搞了gui
https://github.com/AtsushiSakai/rosbag_filter_gui
不用自己搞了 I think github should add a "like" button
ROS Bag文件过滤教程
本文介绍如何使用rosbag工具过滤特定主题的消息,如从原始bag文件中分离出/turtle1/command_velocity主题的数据,并创建新的bag文件。此外,还提供了一个使用Python进行更复杂过滤的示例,以及一个基于Qt的GUI工具链接,用于简化rosbag过滤过程。
1901





