-
Clone the camera_umd package
$ git clone https://github.com/ktossell/camera_umd.git
-
Update parameters in camera_umd/uvc_camera/launch/stereo_node.launch (Eg- Turn off Auto exposure, Auto focus and set left/device and right/device accordingly)
-
Turn on the camera drivers
$ roslaunch uvc_camera stereo_node.launch
-
Calibration step
$ rosrun camera_calibration cameracalibrator.py --size 9x6 --square 0.026 right:=stereo/right/image_raw left:=stereo/left/image_raw left_camera:=/left right_camera:=/right
Here 9 and 6 are the number of internal nodes. For a 10 * 7 checkerboard pattern, it is 9*6, and if length of side of square is 26 mm, enter param as 0.026
-
Calculate disparity and publish it
$ ROS_NAMESPACE=stereo rosrun stereo_image_proc stereo_image_proc
-
Run the code to get the depth of an object filtered by HSV color filter
$ rosrun stereo_utils/Get_Depth