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

Calibrating in OpenNI_Kinect

asked 2011-10-17 07:58:44 -0500

updated 2016-10-24 09:01:27 -0500

ngrennan gravatar image

Hi all, I was wondering if it was possible to calibrate the Kinect in the openni_camera package, and if there was a standard way to do this. I did stumble across the following link:

http://www.ros.org/wiki/kinect_calibration

but noticed that this was associated with a deprecated package (and I was having issues getting that code to compile with the current version of libfreenect).

I also noticed in openni_camera/include several different parameter files that look like they have calibration information (e.g. calibration_rgb.yaml), but I noticed that the launch file openni_camera/openni_node.launch doesn't refer to any of them. In fact, when I removed those configuration files, everything still worked. Are these files even read by OpenNI_Camera? And if they aren't, where does OpenNI_Camera find its intrinsic parameters?

I apologise if I missed some other package out there. Thanks, Chris Tralie

edit retag flag offensive close merge delete

Comments

From what I understand the OpenNI package uses the factory calibration stored on the Kinect. I've been trying to figure out if it is possible to do a manual (better?) calibration but have not succeeded so far to use the data from the Kinect_Calibration in the latest OpenNI driver.
Marco gravatar image Marco  ( 2011-10-19 02:31:19 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
1

answered 2011-11-01 02:00:33 -0500

drew212 gravatar image

The newer openni_kinect drivers get the factory calibration settings, so calibration is no longer necessary. This is why the calibration tools are associated with the deprecated package, because it doesn't use the factory calibration settings.

edit flag offensive delete link more
5

answered 2011-10-19 21:58:36 -0500

sebsch gravatar image

It seems like many openni packages have changed and most information you can find in the wiki is for old versions.

I managed to calibrate my kinect based on this page in the wiki with the following additions:

  • cameracalibrator.py does not recognize the option --no-service-call, it should be --no-service-check. The command for calibrating the RGB camera in my case was:

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

  • cameracalibratory.py saved camera calibration information in a /tmp/calibrationdata.tar.gz which contained the actual calibration data in a file named ost.txt in videre's ini format (see here) instead of a YAML file.

  • I renamed both files to depth.ini and rgb.ini and pointed rgb_camera_info_url and depth_camera_info_url to their location (see openni.launch within the package openni_launch)

  • Finally, I had to adjust the name of the camera inf both .ini files. I.e., I had to change narrow_stereo/left to depth_XXX, where XXX is the serial number of my kinect, and rgb_XXX, accordingly.

Good luck!

edit flag offensive delete link more

Comments

The tutorial mentions a camera/ir/image topic. What driver do i need to publish that? openni_camera only publishes /camera/depth and /camera/rgb. How do you subscribe the calibrator to the actual IR camera images?
Daniel Canelhas gravatar image Daniel Canelhas  ( 2011-10-20 03:41:07 -0500 )edit
How do you launch your camera node? Since electric, I have to launch it using "roslaunch openni_launch openni.launch". Then you should be able to subscribe to /camera/ir/image_raw (note the _raw).
sebsch gravatar image sebsch  ( 2011-10-20 03:55:24 -0500 )edit
rosversion openni_kinect 0.3.1 Is that the same as you have? It doesn't matter if i use the launcher or rosrun the node directly, i still don't see any camera/ir topics
Daniel Canelhas gravatar image Daniel Canelhas  ( 2011-10-20 04:03:29 -0500 )edit
nevermind. I was using "roslaunch openni_camera openni_node.launch". It works by your instructions. thanks!
Daniel Canelhas gravatar image Daniel Canelhas  ( 2011-10-20 04:08:56 -0500 )edit
Thanks this looks very promising, and a lot of those little points I never would have guessed! I'm unfortunately now running into an error: when I try to run cameracalibrator.py it halts and says "Illegal Instruction". Have you ever seen anything like that?
ctralie gravatar image ctralie  ( 2011-10-20 07:23:57 -0500 )edit
That's strange. "Illegal Instruction" often occurs if you try to run a binary that was compiled for a CPU architecture supporting a larger instruction set, e.g. utilizing SSE instructions your CPU does not support. You could try to manually compile opencv - or try it on a different machine first.
sebsch gravatar image sebsch  ( 2011-10-20 19:39:18 -0500 )edit
0

answered 2011-11-16 11:12:23 -0500

yuyu gravatar image

Calibration is no longer necessary, drew212 said. Does this mean I don't have to read .yaml file because kinect outputs calibrated points? I'm trying to work on ASUS Xtion Pro, and it seems to me that I have to do calibration. I'm searching where to start - how can I apply my calibrated values the best if drew212 is right. Since this is the case, I don't expect to find a calibration tool to produce .yaml file any more.

edit flag offensive delete link more

Comments

The Xion Pro should be factory calibrated as well.
tfoote gravatar image tfoote  ( 2011-12-11 10:33:07 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2011-10-17 07:58:44 -0500

Seen: 2,226 times

Last updated: Nov 16 '11