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

Revision history [back]

There are several ways to do this, and the best and the simplest one is to write your own package for this, as per your requirement; Here you need two exactly synchronized images at any given moment so subscribe to both the topics using msg_filter (see the section 7.2). once you are in call-back function convert both the images to cv::Mat and save them using imwrite("filenam",cv::Mat var) function. this way you can be sure about their time stamp.

another way is, using image_view package which comes with image_pipeline.

rosrun image_view extract_images _sec_per_frame:=0.01 image:=(image_topic_name) tLink

you will have to run this package for both the topics separately, but be sure that both the time you get same number of images (in your case 171 images). (otherwise they arent stereo-images). one issue here is, this package save the images in jpg format which can have some data loss due to jpg compression.