ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
This cmd line would extract all messages on topic /odometry/gps between t1 and t2 and between t3 and t4. Is that what you want?
rosbag filter bag_in.bag bag_out.bag "topic == '/odometry/gps' and ((m.header.stamp.secs > t1 and m.header.stamp.secs < t2) or (m.header.stamp.secs > t3 and m.header.stamp.secs < t4))"
2 | No.2 Revision |
This cmd line would extract all messages on topic /odometry/gps between t1 and t2 and between t3 and t4. t4 (you can keep extending it for other intervals). Is that what you want?
rosbag filter bag_in.bag bag_out.bag "topic == '/odometry/gps' and ((m.header.stamp.secs > t1 and m.header.stamp.secs < t2) or (m.header.stamp.secs > t3 and m.header.stamp.secs < t4))"