0
$\begingroup$

Rosanswers logo

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


Originally posted by mhariharasudan on ROS Answers with karma: 70 on 2013-01-16

Post score: 2

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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?


Originally posted by davinci with karma: 2573 on 2013-01-27

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by ZoltanS on 2013-05-15:
Could you please give us an update, whether did you manage to make it work?

Comment by ZoltanS on 2013-05-15:
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.

Comment by mhariharasudan on 2013-05-15:
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

Comment by ZoltanS on 2013-05-16:
Hi, thanks! Unfortunately, my cameras don't work with the uvc_cam driver...

Comment by mhariharasudan on 2013-05-16:
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

Comment by ZoltanS on 2013-05-17:
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.

Comment by mhariharasudan on 2013-05-17:
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

Comment by mhariharasudan on 2013-05-17:
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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.