[ros-users] confused by interaction of rosbag and image_transport

Jack O'Quin jack.oquin at gmail.com
Fri Apr 16 15:26:55 UTC 2010


We recently collected some large bags, using boxturtle, containing raw
Velodyne 3D LIDAR data and compressed output from two Sony XCD-SX90CR
cameras (each 1280x960, color).

The camera1394 driver uses image_transport, so we saved the
corresponding compressed images in the bags (for example:
/right_front/camera/image_raw/compressed). That seemed to work, and we
could use image_view to look at the bag. I forgot to save the
corresponding camera_info topics, but image_view does not care.

The problem came when writing an image_transport subscriber to process
and display the images. Just subscribing to the compressed image
published by the bag does not work. After some confusion, we hit upon
this solution:

$ rosrun image_transport republish compressed
in:=/right_front/camera/image_raw raw
out:=/right_front/camera/image_raw

That does work, and we can pass the images to opencv and view them
nicely. I suppose rosbag does not understand image_transport natively
for either recording or playing.

Is there a way to read the topic directly from rosbag play using an
image_transport client? I suspect the decompression happens in the
publisher. How does image_view deal with that? (Guess I should read
the code.)

What are the recommended Best Practices for saving and using large
files like these? In minutes, these devices produce gigabytes of data,
and we plan to add four more similar cameras with a 360 degree field
of view.

How do others deal with these issues?

Regards,
-- 
 joq



More information about the ros-users mailing list