Filter and play a bag file

asked 2015-09-25 11:15:27 -0500

hidmic gravatar image

I'd like to play a bag file as part of a roslaunch and apply a filter to it at the same time. I couldn't find anything better than doing the filter step beforehand, which is awful if one needs a number of stripped versions of the same bag file.

Am I missing something here?

Thank you all

edit retag flag offensive close merge delete

Comments

What do you mean by "filter" the data?

allenh1 gravatar image allenh1  ( 2015-09-26 12:53:11 -0500 )edit

The same rosbag filter does. But without creating an aditional bag in the process.

hidmic gravatar image hidmic  ( 2015-09-26 14:00:12 -0500 )edit

What happens if you just remap the topics you want to filter out in the launch file? Send them all to dummy topic names. Also, you may be able to use something in topic_tools.

Tom Moore gravatar image Tom Moore  ( 2015-09-27 17:49:58 -0500 )edit

That's a good solution! But what if I need to exclude specific messages from a single topic? Thinking about TF messages here.

hidmic gravatar image hidmic  ( 2015-09-27 21:03:56 -0500 )edit

Filtering tf messages is hard to do even with rosbag filter. One option might be to remap all of /tf to another topic, and then use the topic_tools transform tool to re-broadcast transforms you want to keep, and change the frame_id on those you don't want to keep. Just spitballing.

Tom Moore gravatar image Tom Moore  ( 2015-09-28 07:51:58 -0500 )edit