ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Removing Duplicate Msgs From Bag

asked 2021-06-30 17:33:10 -0600

suomynona gravatar image

I have multiple ros bags that I have recorded from a robot session. I want to merge the bags into one single bag that I can upload to AWS. I know I can do that from here. However, my bags have overlapping portions. When merging the bags, I want to remove duplicate msgs. Is there an efficient way of doing this?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-07-23 02:30:24 -0600

Immanuel gravatar image

Use the examples from http://wiki.ros.org/rosbag/Cookbook. Basically iterate through all the messages in the original bag and rewrite the messages in the new rosbag. As you iterate through messages in the original bag, if you encounter a message which has the exactly same contents as the previous message, ignore it (write only the unique messages basically).

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2021-06-30 17:33:10 -0600

Seen: 423 times

Last updated: Jul 23 '21