0
$\begingroup$

Rosanswers logo

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


Originally posted by ctralie on ROS Answers with karma: 41 on 2011-10-17

Post score: 4


Original comments

Comment by Marco on 2011-10-19:
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.

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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.


Originally posted by drew212 with karma: 57 on 2011-11-01

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$
0
$\begingroup$

Rosanswers logo

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!


Originally posted by sebsch with karma: 790 on 2011-10-19

This answer was NOT ACCEPTED on the original site

Post score: 5


Original comments

Comment by sebsch on 2011-10-20:
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.

Comment by ctralie on 2011-10-20:
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?

Comment by Daniel Canelhas on 2011-10-20:
nevermind. I was using "roslaunch openni_camera openni_node.launch". It works by your instructions. thanks!

Comment by Daniel Canelhas on 2011-10-20:
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

Comment by sebsch on 2011-10-20:
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).

Comment by Daniel Canelhas on 2011-10-20:
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?

$\endgroup$

Your Answer

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