How to subscribe & synchronize to two images topics [closed]
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 http://www.ros.org/wiki/cv_bridge/Tutorials/UsingCvBridgeToConvertBetweenROSImagesAndOpenCVImages
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 ?
Regards
Thanks