Robotics StackExchange | Archived questions

Emulate missing messages from rosbag; publish only every 2nd/4th/8th message

I would like to check would stable some of my processing nodes work if there is data lost somehow. I would like to do so by feeding them only with every 2nd/4th/8th message of each topic of a rosbag. Is there anything ready to use for this?

If not there might be the following approaches for this:

  1. Use rosbag API to convert the bag and create a copied bag file that contains only every 2nd/4th/8th message.
  2. Set up a republisher node between the rosbag and the processing chain that only passes every 2nd/4th/8th message.
  3. Anything else you suggest;)

Which approach do you think is perferable?

Asked by Wolf on 2015-09-03 02:07:40 UTC

Comments

Answers

I am not sure this is what you are looking for, but I suggest using the throttle tool .

Asked by Procópio on 2015-09-03 02:44:35 UTC

Comments

rosbag filter might also work.

Asked by dornhege on 2015-09-03 04:24:01 UTC