ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Webcam does not display when using visp_auto_tracker

asked 2014-06-09 10:42:32 -0500

Alvin gravatar image

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 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

rosrun camera_calibration --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!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-06-09 13:11:02 -0500

ahendrix gravatar image

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

edit flag offensive delete link more


I see. Thanks for the tip!

Alvin gravatar image Alvin  ( 2014-06-10 09:04:07 -0500 )edit

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"

Alvin gravatar image Alvin  ( 2014-06-10 13:20:23 -0500 )edit

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.

ahendrix gravatar image ahendrix  ( 2014-06-10 15:09:08 -0500 )edit

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

Alvin gravatar image Alvin  ( 2014-06-10 15:38:58 -0500 )edit

But then, the video stream display window freezes and stops responding and nothing happens afterwards...

Alvin gravatar image Alvin  ( 2014-06-10 15:41:05 -0500 )edit

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?

ahendrix gravatar image ahendrix  ( 2014-06-10 16:28:38 -0500 )edit

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..

Alvin gravatar image Alvin  ( 2014-06-11 10:20:56 -0500 )edit

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: .

ahendrix gravatar image ahendrix  ( 2014-06-11 12:03:25 -0500 )edit

Question Tools

1 follower


Asked: 2014-06-09 10:42:32 -0500

Seen: 975 times

Last updated: Jun 09 '14