rosbag filter 过滤topic

本文介绍如何使用rosbag工具过滤特定主题的消息,如从原始bag文件中分离出/turtle1/command_velocity主题的数据,并创建新的bag文件。此外,还提供了一个使用Python进行更复杂过滤的示例,以及一个基于Qt的GUI工具链接,用于简化rosbag过滤过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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 

评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值