rosbag包按时间截取

  • Post author:
  • Post category:其他


在使用rosbag录包的时候,我们有时候只需包中的某一段时间,因此就有必要按时间截取rosbag包。

一、在rosbag包目录下启动终端

二、按时间截取

rosbag filter 原始包名.bag 截取后的包名.bag  "t.to_sec() > 开始时间 and t.to_sec() < 结束时间"

Exemple:

rosbag filter lidar_zed4.bag lidar_zed4_filter.bag "t.to_sec() > 1641196460.608130 and t.to_sec() < 1641196485.7"

注意:时间是Bag Time,可以在回放rosbag包的时候看到。



版权声明:本文为ZHONG_HUAN原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。