Numbe of extracted messages is less than number of messages

asked 2018-10-14 17:23:59 -0500

roskinetic gravatar image

Hi, I am new to ROS and need some help.

I recorded 4754 messages in a bag file from a camera with 10 FPS.

I extracted messages by

rosrun image_view extract_images _sec_per_frame:=0 image:=/camera/rgb/image

but the number of extracted images is always less than the number of messages. The number of images is 4065..

I played with the value of _sec_per_frame such as _sec_per_frame=0.1, 0.01, 0.001 but not successful.

How do I extract the same number of images as the number of messages?

Thank you!

edit retag flag offensive close merge delete


Are you sure you recorded all the frames? What does rosbag info tell you?

KenYN gravatar image KenYN  ( 2018-10-14 23:31:48 -0500 )edit

Yes, rosbag info tells me that 4754 msgs are recorded. However, only 4065 are extracted.. Is there any delay-related issue in rosbag play?

roskinetic gravatar image roskinetic  ( 2018-10-15 08:01:46 -0500 )edit

You could use rosbag play --pause to start it in paused mode before your rosrun, perhaps? We actually use a script like this one to dump images.

KenYN gravatar image KenYN  ( 2018-10-15 20:23:23 -0500 )edit