0
$\begingroup$

Rosanswers logo

Hi everyone,

I am trying to get a Logitech webcam to work with visp_auto_tracker to do some QR tracking. I am running ROS Hydro on Ubuntu. I started off with usb_cam and that worked fine with the webcam, so now I am trying the live video example launch file (tracklive_usb.launch) on the wiki page at wiki.ros.org/visp_auto_tracker. The webcam light turns on, but there is no camera feed, and I get this error:

[ WARN] [1402326372.657815348]: Camera calibration file /home/toshiba/.ros/camera_info/head_camera.yaml not found.
terminate called after throwing an instance of 'std::runtime_error'
what():  uncalibrated camera
[visp_auto_tracker-1] process has died [pid 17186, exit code -6, cmd /opt/ros/hydro/lib/visp_auto_tracker/visp_auto_tracker /visp_auto_tracker/camera_info:=/usb_cam/camera_info /visp_auto_tracker/image_raw:=/usb_cam/image_raw __name:=visp_auto_tracker __log:=/home/toshiba/.ros/log/fc4ac0ee-eb3d-11e3-a916-70f1a177b603/visp_auto_tracker-1.log].
log file: /home/toshiba/.ros/log/fc4ac0ee-eb3d-11e3-a916-70f1a177b603/visp_auto_tracker-1*.log

So then I try to calibrate the camera with this line by following wiki.ros.org/camera_calibration/Tutorials/MonocularCalibration

rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.108 image:=/camera/image_raw camera:=/usb_cam

But I get this message:

('Waiting for service', '/usb_cam/set_camera_info', '...')
Service not found

I am pretty new to ROS having just started a few weeks ago, so I'm kind of stumped. Is it really a problem with calibration? Any help is much appreciated. Thanks!


Originally posted by Alvin on ROS Answers with karma: 37 on 2014-06-09

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

To run a camera calibration, you must be running the camera driver node (usb_cam in your case) before you start the calibration node.


Originally posted by ahendrix with karma: 47576 on 2014-06-09

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Alvin on 2014-06-10:
I see. Thanks for the tip!

Comment by Alvin on 2014-06-10:
I can't seem to get the calibration to fully finish. After i'm done with the checkerboard, I click "calibrate" and "save". After clicking "commit", the computer freezes, and eventually kills the process, so the calibration doesn't seem to get saved onto the webcam. Console just says "Killed"

Comment by ahendrix on 2014-06-10:
After you click calibrate, you should wait for the video stream to resume before clicking save and commit. It should display the checkerboard and the calculated reprojection error.

Comment by Alvin on 2014-06-10:
That is exactly what I did. When I click save, i get the msg: ('Wrote calibration data to', '/tmp/calibrationdata.tar.gz'). What exactly is the calculated reprojection error? After clicking commit,I get a result like the bottom of http://wiki.ros.org/camera_calibration/Tutorials/MonocularCalibration

Comment by Alvin on 2014-06-10:
But then, the video stream display window freezes and stops responding and nothing happens afterwards...

Comment by ahendrix on 2014-06-10:
That sounds like a bug in the calibration program, but it might not be a big deal. Can you tell if the calibration data is reflected properly in your camera's camera_info topic?

Comment by Alvin on 2014-06-11:
I'm not entirely sure what you mean, but when i did rostopic echo /usb_cam/camera_info, i noticed the D matrix was empty and the K,P,R matrices are full of zeros, which is different from the matrices shown after I clicked commit..

Comment by ahendrix on 2014-06-11:
That's the correct check to do. Unfortunately it sounds like the calibration isn't being committed to the camera properly. This sounds like a bug in the calibration program; you should probably file it against their bugtracker: https://github.com/ros-perception/image_pipeline/issues .

Comment by ahendrix on 2014-06-11:
In the meantime, since you have the calibration data, you should be able to construct the calibration file from the console output and stick it in the correct place. This may be of some help: http://wiki.ros.org/camera_calibration_parsers#File_formats .

Comment by Alvin on 2014-06-11:
Thank you! After a bit of playing around with the calibration file, I was finally able to run that live video example launch file. Really appreciate your help! :)

$\endgroup$

Your Answer

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