Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 118

What are the next steps after stereo calibration?

$
0
0
I've completed the [stereo calibration tutorial](http://wiki.ros.org/camera_calibration/Tutorials/StereoCalibration) and have my sample images and parameters in a calibrationdata.tar.gz file. Where do I go from here? I want to use this to create a depth map and point cloud for doing SLAM, but the tutorial doesn't mention anything about what to do with the calibrated camera. It only links to an old Willowgarage page which is long dead. Although it's completely undocumented, digging around I found that the "Commit" button in the cameracalibrator.py gui saves a YAML file to ~/.ros/camera_info/head_camera.yaml. However, it's unclear what this file represents. The file content saved for my camera was: image_width: 320 image_height: 240 camera_name: head_camera camera_matrix: rows: 3 cols: 3 data: [1034.231282067822, 0, 149.3986264583577, 0, 1059.726267583194, 27.5609680166836, 0, 0, 1] distortion_model: plumb_bob distortion_coefficients: rows: 1 cols: 5 data: [0.2006669805992255, -0.920386733283972, -0.06710445687079475, 0.01907417769046314, 0] rectification_matrix: rows: 3 cols: 3 data: [0.9491200720659563, 0.03439773884992495, 0.3130301652613153, -0.03871893115684572, 0.9992212648619694, 0.007596592506998183, -0.3125250920671578, -0.01933027184646673, 0.94971280259811] projection_matrix: rows: 3 cols: 4 data: [1300.089955798789, 0, -170.1720094680786, -89.58782554834289, 0, 1300.089955798789, 9.835054516792297, 0, 0, 0, 1, 0] However, the raw ost.txt file exported to the /tmp/calibrationdata.tar.gz contained: # oST version 5.0 parameters [image] width 320 height 240 [narrow_stereo/left] camera matrix 958.183533 0.000000 178.343947 0.000000 998.494337 -2.125240 0.000000 0.000000 1.000000 distortion -0.184614 3.428311 -0.078904 0.023000 0.000000 rectification 0.950676 0.038027 0.307845 -0.033772 0.999246 -0.019139 -0.308341 0.007799 0.951244 projection 1300.089956 0.000000 -170.172009 0.000000 0.000000 1300.089956 9.835055 0.000000 0.000000 0.000000 1.000000 0.000000 # oST version 5.0 parameters [image] width 320 height 240 [narrow_stereo/right] camera matrix 1034.231282 0.000000 149.398626 0.000000 1059.726268 27.560968 0.000000 0.000000 1.000000 distortion 0.200667 -0.920387 -0.067104 0.019074 0.000000 rectification 0.949120 0.034398 0.313030 -0.038719 0.999221 0.007597 -0.312525 -0.019330 0.949713 projection 1300.089956 0.000000 -170.172009 -89.587826 0.000000 1300.089956 9.835055 0.000000 0.000000 0.000000 1.000000 0.000000 So it looks like the YAML file saved by cameracalibrator.py is truncated and only contains the calibration data for a single camera. Do I need to manually organize this data, for both cameras, in separate YAML files and then give those to the nodes that read/publish the camera images? Edit: I was able to split the ost.txt file and convert it into separate yml files for each camera, and get a usb_cam node running who those calibration files. However, stereo_image_proc seems unable to connect or read these streams. My usb_cam launch file: I then run: roslaunch stereo_slam_test stereo_node.launch ROS_NAMESPACE=raw_stereo rosrun stereo_image_proc stereo_image_proc approximate_sync:=true The output of `rostopic list` is: /raw_stereo/disparity /raw_stereo/left/camera_info /raw_stereo/left/image_color /raw_stereo/left/image_color/compressed /raw_stereo/left/image_color/compressed/parameter_descriptions /raw_stereo/left/image_color/compressed/parameter_updates /raw_stereo/left/image_color/compressedDepth /raw_stereo/left/image_color/compressedDepth/parameter_descriptions /raw_stereo/left/image_color/compressedDepth/parameter_updates /raw_stereo/left/image_color/theora /raw_stereo/left/image_color/theora/parameter_descriptions /raw_stereo/left/image_color/theora/parameter_updates /raw_stereo/left/image_mono /raw_stereo/left/image_mono/compressed /raw_stereo/left/image_mono/compressed/parameter_descriptions /raw_stereo/left/image_mono/compressed/parameter_updates /raw_stereo/left/image_mono/compressedDepth /raw_stereo/left/image_mono/compressedDepth/parameter_descriptions /raw_stereo/left/image_mono/compressedDepth/parameter_updates /raw_stereo/left/image_mono/theora /raw_stereo/left/image_mono/theora/parameter_descriptions /raw_stereo/left/image_mono/theora/parameter_updates /raw_stereo/left/image_raw /raw_stereo/left/image_raw/compressed /raw_stereo/left/image_raw/compressed/parameter_descriptions /raw_stereo/left/image_raw/compressed/parameter_updates /raw_stereo/left/image_raw/compressedDepth /raw_stereo/left/image_raw/compressedDepth/parameter_descriptions /raw_stereo/left/image_raw/compressedDepth/parameter_updates /raw_stereo/left/image_raw/theora /raw_stereo/left/image_raw/theora/parameter_descriptions /raw_stereo/left/image_raw/theora/parameter_updates /raw_stereo/left/image_rect /raw_stereo/left/image_rect/compressed /raw_stereo/left/image_rect/compressed/parameter_descriptions /raw_stereo/left/image_rect/compressed/parameter_updates /raw_stereo/left/image_rect/compressedDepth /raw_stereo/left/image_rect/compressedDepth/parameter_descriptions /raw_stereo/left/image_rect/compressedDepth/parameter_updates /raw_stereo/left/image_rect/theora /raw_stereo/left/image_rect/theora/parameter_descriptions /raw_stereo/left/image_rect/theora/parameter_updates /raw_stereo/left/image_rect_color /raw_stereo/left/image_rect_color/compressed /raw_stereo/left/image_rect_color/compressed/parameter_descriptions /raw_stereo/left/image_rect_color/compressed/parameter_updates /raw_stereo/left/image_rect_color/compressedDepth /raw_stereo/left/image_rect_color/compressedDepth/parameter_descriptions /raw_stereo/left/image_rect_color/compressedDepth/parameter_updates /raw_stereo/left/image_rect_color/theora /raw_stereo/left/image_rect_color/theora/parameter_descriptions /raw_stereo/left/image_rect_color/theora/parameter_updates /raw_stereo/points2 /raw_stereo/right/camera_info /raw_stereo/right/image_color /raw_stereo/right/image_color/compressed /raw_stereo/right/image_color/compressed/parameter_descriptions /raw_stereo/right/image_color/compressed/parameter_updates /raw_stereo/right/image_color/compressedDepth /raw_stereo/right/image_color/compressedDepth/parameter_descriptions /raw_stereo/right/image_color/compressedDepth/parameter_updates /raw_stereo/right/image_color/theora /raw_stereo/right/image_color/theora/parameter_descriptions /raw_stereo/right/image_color/theora/parameter_updates /raw_stereo/right/image_mono /raw_stereo/right/image_mono/compressed /raw_stereo/right/image_mono/compressed/parameter_descriptions /raw_stereo/right/image_mono/compressed/parameter_updates /raw_stereo/right/image_mono/compressedDepth /raw_stereo/right/image_mono/compressedDepth/parameter_descriptions /raw_stereo/right/image_mono/compressedDepth/parameter_updates /raw_stereo/right/image_mono/theora /raw_stereo/right/image_mono/theora/parameter_descriptions /raw_stereo/right/image_mono/theora/parameter_updates /raw_stereo/right/image_raw /raw_stereo/right/image_raw/compressed /raw_stereo/right/image_raw/compressed/parameter_descriptions /raw_stereo/right/image_raw/compressed/parameter_updates /raw_stereo/right/image_raw/compressedDepth /raw_stereo/right/image_raw/compressedDepth/parameter_descriptions /raw_stereo/right/image_raw/compressedDepth/parameter_updates /raw_stereo/right/image_raw/theora /raw_stereo/right/image_raw/theora/parameter_descriptions /raw_stereo/right/image_raw/theora/parameter_updates /raw_stereo/right/image_rect /raw_stereo/right/image_rect/compressed /raw_stereo/right/image_rect/compressed/parameter_descriptions /raw_stereo/right/image_rect/compressed/parameter_updates /raw_stereo/right/image_rect/compressedDepth /raw_stereo/right/image_rect/compressedDepth/parameter_descriptions /raw_stereo/right/image_rect/compressedDepth/parameter_updates /raw_stereo/right/image_rect/theora /raw_stereo/right/image_rect/theora/parameter_descriptions /raw_stereo/right/image_rect/theora/parameter_updates /raw_stereo/right/image_rect_color /raw_stereo/right/image_rect_color/compressed /raw_stereo/right/image_rect_color/compressed/parameter_descriptions /raw_stereo/right/image_rect_color/compressed/parameter_updates /raw_stereo/right/image_rect_color/compressedDepth /raw_stereo/right/image_rect_color/compressedDepth/parameter_descriptions /raw_stereo/right/image_rect_color/compressedDepth/parameter_updates /raw_stereo/right/image_rect_color/theora /raw_stereo/right/image_rect_color/theora/parameter_descriptions /raw_stereo/right/image_rect_color/theora/parameter_updates /raw_stereo/stereo_image_proc/parameter_descriptions /raw_stereo/stereo_image_proc/parameter_updates /raw_stereo/stereo_image_proc_debayer_left/parameter_descriptions /raw_stereo/stereo_image_proc_debayer_left/parameter_updates /raw_stereo/stereo_image_proc_debayer_right/parameter_descriptions /raw_stereo/stereo_image_proc_debayer_right/parameter_updates /raw_stereo/stereo_image_proc_rectify_color_left/parameter_descriptions /raw_stereo/stereo_image_proc_rectify_color_left/parameter_updates /raw_stereo/stereo_image_proc_rectify_color_right/parameter_descriptions /raw_stereo/stereo_image_proc_rectify_color_right/parameter_updates /raw_stereo/stereo_image_proc_rectify_mono_left/parameter_descriptions /raw_stereo/stereo_image_proc_rectify_mono_left/parameter_updates /raw_stereo/stereo_image_proc_rectify_mono_right/parameter_descriptions /raw_stereo/stereo_image_proc_rectify_mono_right/parameter_updates /rosout /rosout_agg And the output of `rqt_graph` is: ![this](/upfiles/14313985112649415.png) What am I doing wrong?

Viewing all articles
Browse latest Browse all 118

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>