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

Revision history [back]

click to hide/show revision 1
initial version

If the number of frames is different all the time probably your computer is not fast enough to save (and jpeg compress) all images with the same frequency they are coming out of the bag file.... Consider using the rosbag play -r (rate) option to slow down the message frequency (e. g. -r 0.2 to run at 20% of the original rate). Your computer should then be able to save all images without missing some. If therefore in the end your video looks kind of slow-mow you can speed it up using any common video processing program....

If the number of frames is different all the time probably your computer is not fast enough to save (and jpeg compress) all images with the same frequency they are coming out of the bag file.... Consider using the rosbag play -r (rate) option to slow down the message frequency (e. g. -r 0.2 to run at 20% of the original rate). Your computer should then be able to save all images without missing some. If therefore in the end your video looks kind of slow-mow you can speed it up using any common video processing program....

Edit example launch:

<launch>
  <node pkg="rosbag" type="play" name="rosbag" args="-r 0.2 -d 2 $(find image_view)/test.bag"/>
  <node name="extract" pkg="image_view" type="extract_images" respawn="false" output="screen" cwd="ROS_HOME">
    <remap from="image" to="/camera/image_raw"/>
  </node>
</launch>