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

rosbag play - skip every Nth file

asked 2019-02-11 11:21:57 -0500

Avner gravatar image

updated 2019-02-11 11:23:09 -0500

Hi,

I have a bag with X images, and messages.

I want to test if rtabmap odometry can handle images at different frame rates (e.g. using half the frames)

Is it possible to play the bag in a way that skips every second frame, so I don't have to create a bag for every possible frame rate?

Thanks, Avner

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-02-11 12:19:08 -0500

I don't know of any way you can do this with the standard command line tools. However if you don't mind getting your hands dirty, you could use the rosbag_api to write a simple node that published the sensor messages from a bag at the desired rate.

The example on the page I linked to prints every message out on the screen. But you would want to modify it so that it only publishes messages on the desired topic, and at the rate you want.

Hope this helps.

edit flag offensive delete link more

Comments

I definitely helps. thanks

Avner gravatar image Avner  ( 2019-02-11 12:39:26 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-02-11 11:21:57 -0500

Seen: 623 times

Last updated: Feb 11 '19