Ask Your Question
2

calibrating individual webcams as stereo

asked 2013-01-16 00:14:16 -0500

mhariharasudan gravatar image

Hi, My ubuntu is 12.04 and im using ROS fuerte I would like to calibrate 2 individual external webcams (Microsoft HD) as stereo camera. I used the package named as camera_calibration that is available from the repository

This requires me to run the camera driver node that publishes right and left image topics. I tried to use the usb_cam package which is also available in the repository. In the file usb_cam_node.cpp under usb_cam/usb_cam/src, i couldnt not find anything as stereo mode or could not see the left and right image topics being published. I saw that uvc_cam supports this stereo mode and publishes right and left images. But i read somewhere to use usb_cam over uvc_cam for stereo calibration.

Could you please tell me how to use usb_cam as stereo mode to publish left and right images, or if not should i be using only uvc_cam?

Also i have another question which is out of context of this discussion. I have created a ROS overlay worskapce using rosws. Then i sourced the setup.bash in this new workspace. Now i have a package named as camera_calibration that has been downloaded to my workspace managed by rosws. The original location is /opt/ros/fuerte/stacks/image_pipeline/camera_calibration. Despite multiple times of resourcing the setup.bash at my workspace, when i enter the command roscd camera_calibration it goes by default to the /opt/... folder rather than coming to the one local in my workspace. I would also note that this happens only for the camera_calibration package. There is another package called as usb_cam that is being indexed directly when i use roscd usb_cam. Please tell me how to solve this problem.

Thanks in advance

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-01-27 03:13:56 -0500

davinci gravatar image

You can remap the image topics to left and right. But usb_cam does not support calibration, uvc_cam is better I think.

For the other question: Is the dir in the list of echo $ROS_PACKAGE_PATH?

edit flag offensive delete link more

Comments

Could you please give us an update, whether did you manage to make it work?

ZoltanS gravatar image ZoltanS  ( 2013-05-15 03:41:47 -0500 )edit

Here http://www.iheartrobotics.com/2010/05/testing-ros-usb-camera-drivers.html they write some hack how to make the calibration work with usb_cam. It also works using the --no-service-check switch in camera_calibration, but the calib results won't be commited to the camera, only saved in a file.

ZoltanS gravatar image ZoltanS  ( 2013-05-15 03:44:11 -0500 )edit

Hi, it was pretty simple. I had to run the camera node and find the topics in which the left and right images were being published and then had to edit my launch file accordingly. Check this out http://ohmm.wikidot.com/minoru. this works. Let me know if you find any problem

mhariharasudan gravatar image mhariharasudan  ( 2013-05-15 23:24:24 -0500 )edit

Hi, thanks! Unfortunately, my cameras don't work with the uvc_cam driver...

ZoltanS gravatar image ZoltanS  ( 2013-05-16 00:28:06 -0500 )edit

That shdnt be a problem.The trick is to run left and right camera simultaneously.i guess in usb_camera you need to write a launch file to do that.ill be happy to help you through

mhariharasudan gravatar image mhariharasudan  ( 2013-05-16 14:47:44 -0500 )edit

I made a launch file that runs the left+right camera simultaneously with the usb_cam driver. I can even calibrate them, the problem is, that the usb_cam driver doesn't support the upload of camera parameters, so it stores them in a file, which I don't know how to use.

ZoltanS gravatar image ZoltanS  ( 2013-05-17 01:44:36 -0500 )edit

You have almost done everything. Now since you have the parameters, you can do the image rectification and use them to do triangulation. As in the link you have included in you 2nd comment, you have to hard code the values for your D, K ,R and P matrices and then run the launch files

mhariharasudan gravatar image mhariharasudan  ( 2013-05-17 03:54:32 -0500 )edit

you have to hard code the matrices for both the left and right cameras in the same launch file. Then your camera will publish undistorted/rectified images and you can use them to triangulate. I am assuming you must be knowing about the math behind rectification and triangulation

mhariharasudan gravatar image mhariharasudan  ( 2013-05-17 03:58:03 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-01-16 00:14:16 -0500

Seen: 943 times

Last updated: Jan 27 '13