So I'm trying to build a depth map using two stereo images , from two cameras on my baxter robot. The structure of my code looks very similar to this one here: http://wiki.ros.org/cv_bridge/Tutorials/ConvertingBetweenROSImagesAndOpenCVImagesPython (the code under "01 An example ROS node")
My code is exactly like that one, minus all the rows columns and channels operations (basically my code is just taking a picture from my robot's camera, converting it to an opencv2 type and then displaying it)
What i want to be able to do, is to subscribe to a second camera, and using this piece of code (http://docs.opencv.org/master/dd/d53/tutorial_py_depthmap.html#gsc.tab=0) be able to create a depth map.
My problem is, with the main code structure that i have, i don't know how to subscribe to a second camera (do i need a second callback function?) and how/where would i add in the piece of code for the depth map operation?
Originally posted by laurent on ROS Answers with karma: 21 on 2016-06-07
Post score: 0