Skip to content

Calibrate your robot

This tutorial provides a step-by-step guide on how to calibrate your robot using an eye-hand calibration method. This ensures that the robot can interact with objects in its surrounding with precision.

Warning

If you suspect that your robot is uncalibrated, it is then feasible that motions that are safe in simulation lead to self-collision or even with collisions with the floor and its surroundings. Please make sure that the robot is far from any object and be close to the robot with the emergency button on hand when performing the calibration motions in case any of this happened.

Step 0: Calibration setup

Perform the home_right motion for the right arm and the calibration_safety_position_left motion for the left arm.

Attach the calibration tool to the right end effector with the checkerboard pattern oriented in the direction of the robot's camera field of view.

Set the calibration_tool parameter to True by doing

pal robot_info set calibration_tool True

This will add the calibration tool in both robot arms.

Reset the current offsets to ensure a clean state for the procedure before it starts by doing

ros2 launch pal_robot_calibration reset_calibration.launch.py 

This command automatically creates a backup of your current offset values before resetting them.

Restart the robot to apply the changes

pal module_manager restart

This will make the camera be configured for the task, and the URDF displays the calibration tool. Check in RViz that the model of the robot is correct. See Figure 1.

Calibration tool in RViz
Figure 1: Calibration tool in RViz.

Check whether the robot is calibrated

To check the calibration status, open RViz2 and add the head_front_camera/color/image_raw topic. Select camera and change the reliability policy to Best effort. See Figure 2.

Add camera by topic and change Reliability Policy
Figure 2: Add camera by topic and change Reliability Policy.

The camera images would show the URDF model overlapped with the camera image. After the process this overlap will be almost complete, starting from the left image in Figure 3 and finishing as in the right image of Figure 3.

Before and after calibration
Figure 3: Before and after calibration.

Step 1: Calibration process

Note

The following will trigger arm motions that have been planned assuming a clear space. Make sure there are no objects nor people close to the robot.

Step 1.1: Right arm and head calibration

Calibrate the right arm and head chain by doing ssh into the robot and then

ros2 launch tiago_pro_calibration calibrate.launch.py

Wait for the poses to be completed and for the data to be processed. The process may take approximately 30 minutes.

At the end of the process, a quality check is performed on the optimisation.

  • If the values are considered satisfactory, you will be asked to insert the password to save the computed offsets. Restart the robot to apply the changes to the URDF. Proceed to Step 1.2.
  • Otherwise, you will need to repeat the right arm and head calibration.

Step 1.2: Left arm and head calibration

Perform the home_left motion for the left arm and the calibration_safety_position_right motion for the right arm.

Attach the calibration tool to the right end effector with the checkerboard pattern oriented in the direction of the robot's camera field of view.

Calibrate the left arm chain by doing ssh into the robot and then

ros2 launch tiago_pro_calibration calibrate.launch.py side:=left

Wait for the poses to be completed and for the data to be processed. The process may take approximately 30 minutes.

At the end of the process, a quality check is performed on the optimisation.

  • If the values are considered satisfactory, you will be asked to insert the password to save the computed offsets. Restart the robot to apply the changes to the URDF. Proceed to Step 2.
  • Otherwise, you will need to repeat the left arm calibration.

Step 2: After the calibration process:

Check whether the calibration procedure led to a better ovelapping in the images following the steps above.

Set the calibration_tool parameter to False by doing

pal robot_info set calibration_tool False

Restart the robot to apply the changes.

Otherwise restore the previous status by doing

  ros2 launch pal_robot_calibration restore_calibration.launch.py

Restart the robot to apply the changes and repeat the procedure.