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

Unable to extract images from *.bag

asked 2014-03-10 00:54:50 -0500

akash gravatar image

I am following this tutorial wiki.ros.org/rosbag/Tutorials/Exporting%20image%20and%20video%20data ,but "rosmake image_view --rosdep-install" gives an error
"rosmake: error: no such option: --rosdep-install". Any help will be greatly appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-03-10 01:27:59 -0500

Wolf gravatar image

If you installed ros-hydro-desktop-full by

sudo apt-get install ros-hydro-desktop-full

as stated in

http://wiki.ros.org/hydro/Installatio...

image_view typically comes along with the installation and does not have to be installed as separate package. Just continue with what is following in the tutorial....

edit flag offensive delete link more

Comments

Proceeding further, "roslaunch export.launch" gives the error process[rosbag-1]: started with pid [5274] [FATAL] [1394450389.001846739]: Error opening file: play process[extract-2]: started with pid [5286] [ INFO] [1394450389.280192931]: Initialized sec per frame to 0.100000 [rosbag-1] process has died [pid 5274, exit code 1, cmd /opt/ros/hydro/lib/rosbag/play play -d 2 /opt/ros/hydro/share/image_view/first.bag __name:=rosbag __log:=/home/master/.ros/log/d6ea7ee6-a841-11e3-8d46-60eb69709e0d/rosbag-1.log].

akash gravatar image akash  ( 2014-03-10 01:39:19 -0500 )edit

This tutorial requires that you have previously recorded a bag file which contains image data you would like to export as jpeg images or video.

Wolf gravatar image Wolf  ( 2014-03-10 02:07:45 -0500 )edit

Record a rosbag with an image stream and change args of the rosbag node in launch according to where your bag file is placed. Futhermore the remap tag of image_view node has to be set to the image topic you have recorded into your rosbag

Wolf gravatar image Wolf  ( 2014-03-10 02:10:01 -0500 )edit

my export.launch file "<launch> <node pkg="rosbag" type="rosbag" name="rosbag" args="play -d 2 /home/master/flare.bag"> <node name="extract" pkg="image_view" type="extract_images" respawn="false" output="screen" cwd="node"> <remap from="image" to="/camera/image_raw"> </remap></node> </node></launch>" -- MY "rosbag info first.bag" OUTPUT-------- path: first.bag version: 2.0 duration: 2:10s (130s) start: Feb 03 2014 07:51:42.82 (1391394102.82) end: Feb 03 2014 07:53:53.55 (1391394233.55) size: 47.3 MB messages: 1056 compression: none [61/61 chunks] types: sensor_msgs/CompressedImage [8f7a12909da2c9d3332d540a0977563f] topics: /front_camera/camera/image_rect_color/compressed 1056 msgs : sensor_msgs/CompressedImage

akash gravatar image akash  ( 2014-03-10 03:02:08 -0500 )edit

<launch> <node pkg="rosbag" type="rosbag" name="rosbag" args="play -d 2 /home/master/first.bag"> <node name="extract" pkg="image_view" type="extract_images" respawn="false" output="screen" cwd="node"> <remap from="image" to="/front/camera/image_rect_color/compressed"> </remap></node></node></launch>

Wolf gravatar image Wolf  ( 2014-03-10 04:17:05 -0500 )edit

You can try this one. I am not sure whether image_view can handle compressed images, though. Maybe also try to record image_raw of your camera....

Wolf gravatar image Wolf  ( 2014-03-10 04:17:58 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-03-10 00:54:50 -0500

Seen: 1,614 times

Last updated: Mar 10 '14