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

How to subscribe & synchronize to two images topics [closed]

asked 2012-04-18 10:33:31 -0500

Vincent_V gravatar image

updated 2012-04-18 10:48:10 -0500

Hi all !

Now with my own camera driver (thanks to all of you) I'm able to run stereo_image_proc and obtain disparity and corrected images.

Now I'm facing a little problem that I'm sure was already solved.

I would like , with the stereo rectified images, to make a stereo matching in OpenCV.

How can I created a node that subscribe to 2 image topics at the same time with the same callback method that will convert the message_image to an OpenCV image with CVbridge.

I know how to convert images and do all the stuff with it thanks to this tutorial

But I don't know how to do it with two images topics to subscribe to :)!

I did a little search within the stereo_image_proc node (with the disparity.cpp )how they manage to do that (with the camera_info too) but the on-demand option do not suit me at all. However, since my camera are not very well synchronized (I use approximate_sync because of an arduino external trigger) I 'll also need to sync these two with the ros.time and their according time stamp ! (Or at least check if they'll be approximatly synced !

So I'm asking you is there any tutorials about it ? or do you know a way to do it simply ?



edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by tfoote
close date 2012-04-18 11:16:37

1 Answer

Sort by ยป oldest newest most voted

answered 2012-04-18 10:57:58 -0500

Eric Perko gravatar image

I think this question and it's answer are what you are looking for.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2012-04-18 10:33:31 -0500

Seen: 5,872 times

Last updated: Apr 18 '12