Kinect

From Healthcare Robotics Wiki
Jump to: navigation, search

This page is to hold information about the use of Microsoft's Kinect in the lab.

PR2

This section describes use of the Kinect mounted to the head of the PR2.

Installed Software

The openni camera drivers are currently installed on the robot at /usr/local/ros/cturtle_ni/. Additionally there is a perception_pcl layover at /usr/local/ros/cturtle_pcl/ if you add the line:

. /usr/local/ros/cturtle_ni/setup.sh

in your .bashrc file, instead of the line

. /opt/ros/cturtle/setup.sh

Your PACKAGE_PATH will be setup to have the openni drivers as well as the perception_pcl stack and everything included in /opt/ros/cturtle.

Launching the Kinect

To launch the kinect run:

roslaunch hrl_pr2_lib openni_kinect.launch

This will publish the following topics:

/kinect_head/depth/camera_info

/kinect_head/depth/disparity

/kinect_head/depth/image

/kinect_head/depth/image/compressed

/kinect_head/depth/image/theora

/kinect_head/depth/points2

/kinect_head/parameter_descriptions

/kinect_head/parameter_updates

/kinect_head/rgb/camera_info

/kinect_head/rgb/image_color

/kinect_head/rgb/image_color/compressed

/kinect_head/rgb/image_color/theora

/kinect_head/rgb/image_mono

/kinect_head/rgb/image_mono/compressed

/kinect_head/rgb/image_mono/theora

Calibration

Full camera and arm pose calibration is easy with Pr2_calibration_launch. Here is a good tutorial for it: http://www.ros.org/wiki/pr2_calibration/Tutorials/Calibrating%20the%20PR2.

Note:

- Intrinsic calibration is not required

- Full Calibration is often done better without Kinect. Kinect introduces more noise to calibration

- Full calibration in Fuerte includes kinect by default


Here are steps to exclude the kinect from calibration

Step 1: Comment out head_mount_kinect_rgb_optical_frame link from URDF (/etc/ros/[distro]/urdf/robot_uncalibrated_[version].xml). Excluding this link automatically excludes kinect from calibration. Note: you will still see kinect_head window amongst other windows for other cameras.

Step 2: Follow the full calibration tutorial - http://www.ros.org/wiki/pr2_calibration/Tutorials/Calibrating%20the%20PR2

Step 3: Uncomment step 1

Step 4: there are several options to calibrate kinect

Option 1: use camera_pose_calibration package to calibrate kinect pose against wide stereo - http://www.ros.org/wiki/camera_pose_calibration

Option 2: use Interactive marker adjustement Tool in Sushi Repository - http://kforge.ros.org/Sushi/trac/wiki/Perception/CalibratingTheKinect

Option 3: By hand (the best!). Looking at RVIZ, see the difference between image and robot model projection on it. Change the URDF accordingly over and over. For GATSBII, camea poses were calibrated fine, but arms were all screwed up. Start from the shoulder_pan down to gripper; small error in shoulder_lift can translate to large error in gripper. Make sure to update robot_description every time by 'robot start' to use the latest URDF.