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

Asus Xtion camera calibration fails to start.

asked 2012-05-31 20:56:12 -0600

liborw gravatar image

updated 2012-06-01 02:01:01 -0600

Hi,

I'm trying to calibrate Asus Xtion following tutorial in openni_launch package. I'm getting following error:

$ rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.030 image:=/camera/rgb/image_raw camera:=/camera/rgb
Waiting for service /camera/rgb/set_camera_info ...
OK
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/opt/ros/electric/stacks/image_pipeline/camera_calibration/nodes/cameracalibrator.py", line 68, in run
    self.function(m)
  File "/opt/ros/electric/stacks/image_pipeline/camera_calibration/nodes/cameracalibrator.py", line 133, in handle_monocular
    drawable = self.c.handle_msg(msg)
  File "/opt/ros/electric/stacks/image_pipeline/camera_calibration/src/camera_calibration/calibrator.py", line 684, in handle_msg
    rgb = self.mkgray(msg)
  File "/opt/ros/electric/stacks/image_pipeline/camera_calibration/src/camera_calibration/calibrator.py", line 233, in mkgray
    rgb = self.br.imgmsg_to_cv(msg, "bgr8")
  File "/opt/ros/electric/stacks/vision_opencv/cv_bridge/src/cv_bridge/cv_bridge.py", line 106, in imgmsg_to_cv
    source_type = self.encoding_as_cvtype(img_msg.encoding)
  File "/opt/ros/electric/stacks/vision_opencv/cv_bridge/src/cv_bridge/cv_bridge.py", line 54, in encoding_as_cvtype
    return eval("cv.CV_%s" % encoding)
  File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute 'CV_yuv422'

I'm running electric.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2012-07-09 13:35:58 -0600

Smot gravatar image

Hi, I had the same problem (using Fuerte), but I was able to calibrate my Asus Xtion by changing the launch call to:

rosrun camera_calibration cameracalibrator.py --size 10x7 --square 0.025 image:=/camera/rgb/image_mono camera:=/camera/rgb --no-service-check

for the RGB camera, and:

rosrun camera_calibration cameracalibrator.py --size 10x7 --square 0.025 image:=/camera/ir/image_raw camera:=/camera/ir --no-service-check

for the IR camera.

Hope this helps.

edit flag offensive delete link more

Comments

1

(Also on Fuerte) Worked for me, thanks! I didn't need the --no-service-check, just the switch from image:=/camera/rgb/image_raw to /camera/rgb/image_mono

tbernhard gravatar image tbernhard  ( 2012-07-11 03:31:55 -0600 )edit

Question Tools

3 followers

Stats

Asked: 2012-05-31 20:56:12 -0600

Seen: 1,716 times

Last updated: Jul 09 '12