Ask Your Question
0

Exporting jpegs from bag file

asked 2016-06-20 09:45:43 -0500

ROSkinect gravatar image

updated 2016-06-20 09:58:40 -0500

I record my bag file using this command:

rosbag record /camera/rgb/image_raw -O kinectrgb

And

rosbag info kinectrgb.bag

For its content I get this:

path:        kinectrgb.bag
version:     2.0
duration:    6.2s
start:       Jun 20 2016 16:19:52.89 (1466432392.89)
end:         Jun 20 2016 16:19:59.09 (1466432399.09)
size:        162.7 MB
messages:    185
compression: none [185/185 chunks]
types:       sensor_msgs/Image [060021388200f6f0f447d0fcd9c64743]
topics:      /camera/rgb/image_raw   185 msgs    : sensor_msgs/Image

But when I try to extract the images I don't get anything..

roslaunch export.launch

It says process has finished cleanly but I don't get the images in ROS_HOME ~/.ros

... logging to /home/jros/.ros/log/ff16c6e0-36f1-11e6-b3d4-5c260a35b6aa/roslaunch-jros-1932.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://jros:36064/

SUMMARY
========

PARAMETERS
 * /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 [1950]
process[extract-2]: started with pid [1951]
[ INFO] [1466432724.837729370]: Initialized sec per frame to 0.100000
[rosbag-1] process has finished cleanly
log file: /home/jros/.ros/log/ff16c6e0-36f1-11e6-b3d4-5c260a35b6aa/rosbag-1*.log

My launch file:

<launch>
  <node pkg="rosbag" type="play" name="rosbag" args="-d 2 $(find imagesequencekinect)/kinectrgb.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>

What am I doing wrong?

What does -d 2 mean in the launch file arg?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-06-20 10:04:46 -0500

updated 2016-06-20 10:07:08 -0500

Looks like you use the wrong topic name for extract_images in the launchfile

topics:      /camera/rgb/image_raw   185 msgs    : sensor_msgs/Image

vs

 <remap from="image" to="/camera/image_raw"/>

-d means "delay after advertising the topics before sending the first message" or as rosbag play --help puts it:

-d SEC, --delay=SEC   sleep SEC seconds after every advertise call (to allow subscribers to connect)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-06-20 09:45:43 -0500

Seen: 714 times

Last updated: Jun 20 '16