Note: Currently this tutorial assumes you are using cob3-3. This tutorial assumes that you have completed the previous tutorials: Prepare Care-O-bot 3 for calibration. |
Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags. |
Automatic Camera and Robot Calibration of Care-O-bot 3
Description: This tutorial guides you through the automatic calibration of the cameras and kinematic components of the Care-O-bot 3.Tutorial Level: ADVANCED
Contents
Overview
This tutorial guides you through the automatic calibration of the cameras and kinematic components of the Care-O-bot 3. The calibration procedure is divided into two automated steps:
Camera calibration: The stereo camera system of Care-O-bot is calibrated intrinsically.
Kinematic robot calibration: This step performs extrinsic camera calibration (hand-eye calibration of the stereo camera and kinect) and estimates various kinematic parameters of the robot (position and orientation of arm and torso on the base of Care-O-bot).
Prerequisites
- roscore is running
- Care-O-bot bringup software is running.
- Cameras, head-axis, arm and torso are initialized and working.
- Calibration pattern is attached to arm.
You created a temporary overlay of cob_calibration_data. The calibration results are stored in this unary stack. The overlay should be deleted again after the calibration process.
Running calibration
Collect data
start the data collection by calling
roslaunch cob_calibration_executive collect_robot_calibration_data.launch
This will start all needed nodes and services. The robot now moves to the sample positions calculated in step 6 of the configuration.
The progress can be seen by rostopic echo /calibration/data_collection/progress.
Wait until capture is finished (about 15 minutes) and stop it with CTRL-C. The bagfile with the measurement and the images for the camera calibration are stored in "/tmp/cal/".
Calibrate cameras
Stop bringup to speed up computation before starting the calibration.
Then execute to start the stereo camera calibration:
roslaunch cob_camera_calibration calibrate_stereo.launch
The results will be stored in the calibration file specified in the "cameras.yaml" configuration file.
This step should take approximately 10 minutes.
For robots with only one calibrated camera this step is not required.
Calibrate robot
To calibrate the robot run:
roslaunch cob_robot_calibration run_robot_calibration.launch
The calculation takes about 15 minutes.
Update urdf
The following command updates the calibration offsets in the urdf:
roslaunch cob_robot_calibration update_calibration_urdf.launch
Verification of calibration result
- Restart bringup in order to use the new calibration result.
Verify the calibration result with rviz by checking the kinect pointcloud while the arm with checkerboard is in front of the cameras. The point cloud should align with the simulated arm. You can also verify the position of the stereo cameras using rviz's Camera plugin to overlay RobotModel with camera image from both left and right camera.
- Remove the checkerboard from the arm and reattach the hand. (activate the emergency stop before attaching the schunk hand).
Commiting your results
- If the calibration result is satisfying commit the new calibration to git (cob_calibration_data) and push it to github. Create a pull request for ipa320/cob_calibration_data and ask your robot administrator to pull the new calibration to the robot for everybody.
- Once the pull request has been accepted and the calibration has been updated on the robot, you can remove your local overlay of cob_calibration_data.