Here's a procedure I always use...make sure you calibrate the RGB and IR cameras separately
Kinect Calibration: RGB and IR Cameras
Packages Needed:
git clone https://github.com/ros-perception/image_pipeline.git
git clone https://github.com/ros-perception/image_common.git
Install dependences: rosdep install ______
Make packages: rosmake ______
Procedure:
For RGB Camera
1.) roscore
2.) rosrun openni_camera openni_node
3.) rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.059 image:=/rgb/image_raw
rgb:=/rgb
Note: Size is number of rows of boxes-1 by number of columns of boxes-1.
Square is size of boxes in meters.
4.) Make sure Kinect is stationary. Move the checkerboard around slowly, changing the 6 degrees of
freedom: x, y, z, roll, pitch, yaw.
5.) Keep changing the position of the checkerboard until the X, Y, Size, and Skew green bars on the right side
of the screen are at a maximum.
6.) When the “Calibrate” button is lit, click it.
7.) When the “Save” button is lit, click it.
8.) This saves a .tar file in your system’s ‘tmp’ folder. Find it and extract the files somewhere handy. Inside
the extracted folder will be pictures and a ost.txt file. Change the file extension to ost.ini and copy it to
your sandbox/workspace.
9.) rosrun camera_calibration_parsers convert ost.ini cal.yml
10.) This saves the cal.yml in your sandbox/workspace. Change the extension to .yaml. Also, change the file
name corresponding to what openni_node refrenced in the terminal when it was trying to find the calibration
file. It’s usually something like “RGB_A00366812242050A”. Once the file name is changed, open the file in a
text editor and change the default camera_name to “RGB_A00366812242050A”, or whatever name
openni_node refrenced.
11.) Now, copy this .yaml file to home/.ros/camera_info folder
Note: The .ros folder might be a hidden folder
For IR Camera
1.) Procedure is the same except:
a.) Cover the IR projector with tape/paper
b.) Make sure you are in a low light environment with incandescent or halogen lighting.
Fluorescent lighting interferes with the IR calibration. Also, make sure there is minimal
movement…the IR camera is very finicky.
c.) rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.059
image:=/ir/image_raw ir:=/ir