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

cannot extract images from bag file

asked 2016-05-26 13:09:43 -0500

Samer gravatar image

updated 2016-05-26 13:43:37 -0500

i am using Ubuntu 14.04 and Ros Indigo. I am trying to extract images from a bag file, I am using this launch file:

<launch>
  <node pkg="rosbag" type="play" name="rosbag" args="-d 30 $(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="/ci109/image_raw"/>
    <param name="filename_format" value="~/test/frame%06i.jpg"/>
  </node>
</launch>

I am away of this question wiki and this question. It seems like it is running fine but I do not see anything like

[ INFO] [1303939096.111425424]: Saved image frame0000.jpg

And I don't see any image in the .ros folder or the ~/test folder that I created to test. Here is my output:

SUMMARY
========

PARAMETERS
 * /extract/filename_format: /home/charis/test...
 * /rosdistro: indigo
 * /rosversion: 1.11.19

NODES
  /
    extract (image_view/extract_images)
    rosbag (rosbag/play)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[rosbag-1]: started with pid [15728]
process[extract-2]: started with pid [15729]
[ INFO] [1464279324.985270766]: Initialized sec per frame to 0.100000
[rosbag-1] process has finished cleanly

I did make sure that the bag file is in place. Basically, it seems that the console stays put for a while at

[ INFO] [1464288031.072128668]: Initialized sec per frame to 0.100000

then it says process has finished cleanly !

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-05-26 14:37:31 -0500

Samer gravatar image

updated 2016-05-26 14:37:59 -0500

It turns out that my images are compressed images and I just had to add this line to the launch file:

<param name="image_transport" value="compressed"/>
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-05-26 13:09:43 -0500

Seen: 1,416 times

Last updated: May 26 '16