Eye-on-Hand Calibration Guide
1. Intrinsic Calibration
1.1 Installation and Configuration
1.1.1 Calibration Materials Preparation
Visit the following link to download the chessboard pattern for intrinsic calibration
https://markhedleyjones.com/projects/calibration-checkerboard-collection
After printing the downloaded file, fix it to an appropriately sized panel, measure the size of the squares with a caliper and record the data.
Or display the downloaded PDF on a tablet, fix the file page display interface (as shown in the image below), measure the chess square size and record the data.
1.1.2 Camera Position Fixing
Fix the camera on the robotic arm camera mount, and simultaneously secure the robotic arm to the table.
1.1.3 Camera Driver Installation
1.1.4 Calibration Library and Configuration
Generally, ROS comes with the camera_calibration
library installed by default. You can run the following command to test:
If the output matches the following content, you can skip this step.
Otherwise, install and configure the calibration library according to the following commands.
1.2 Intrinsic Calibration Launch
1.2.1 Camera Launch
After successful execution, you should see the corresponding camera image data.
1.2.2 Robotic Arm Launch (Optional)
Launch the following commands in two separate terminals:
This step can be skipped, it's mainly for adjusting the camera to an appropriate height to collect as much data as possible.
1.2.3 Intrinsic Calibration Code Launch
Modify the corresponding size
and square
to match the chessboard pattern data.
1.3 Calibration Process
1.3.1 Data Collection
After launching the camera calibration code, move the calibration board into the camera's field of view, and you will see the content shown on the right side of the image below.
Rotate and move the calibration board to collect as many image samples as possible until the progress bars for X Y Size Skew
turn green and are nearly full. Then, click the CALIBRATION
button to calculate the calibration results. The calculation time correlates with the size of the calibration dataset.
1.3.2 Calibration Save
After calculating the intrinsic calibration results, click the SAVE
button on the right side of the interface to save the calibration results.
Run the following command to change the calibration result storage location:
After extracting the archive, save the calibration results to the path where usb-cam
can automatically load the intrinsic parameter file:
If the relevant folders don't exist, you need to create them manually.
1.3.3 Calibration Verification
Close the camera program and restart it.
Run the following command to verify if the camera intrinsic parameters have been successfully loaded:
Results obtained:
2. Extrinsic Calibration
2.1 Environment Setup
2.1.1 Prepare Aruco Calibration Code
Visit the following website to generate an Aruco code or print the Aruco code from the PDF in the documentation.
2.1.2 Hardware Environment Setup
Fix the camera on the robotic arm camera mount, secure the robotic arm to the table, and fix the printed Aruco code on the table.
2.1.3 Software Library Installation and Configuration
Refer to section 2.2
of the following document for calibration library installation
Refer to section 3 of the document to modify the configuration parameters in ~/alicia_ws/src/example/logi_eye_on_hand.launch
2.2 Eye-on-Hand Calibration Launch
2.2.1 Robotic Arm Launch
roslaunch alicia_duo_driver serial_server.launch
2.2.2 Calibration Code Launch
cd alicia_ws/src/example
roslaunch logi_eye_on_hand.launch
2.3 Calibration Process
Follow the specific calibration steps in Eye-to-Base Calibration to complete the eye-on-hand extrinsic calibration.
After running the above code, open a new terminal and enter:
Check /aruco_tracker/result
data to ensure the Aruco ID is correctly recognized.
- Click
Take Sample
to record data for each robotic arm pose. The following interface is the calibration data recording window.
- Update robotic arm pose, after single data recording, control the robotic arm movement according to the steps shown in the image below.
Click Check starting pose
to test if the initial pose can be successfully calibrated (requires multiple attempts, try to find the optimal calibration starting point, i.e., a pose that can pass the test and has no planning failures during calibration).
- Repeat steps 1 and 2 to collect 17 calibration data points.
- Calibration Result Calculation.
After collecting the data, switch Calibration algorithm
to OpenCV/Daniilidis
and click the Compute
button.
Finally, calculate the following results and click Save
to save the results.
3. References
https://wiki.ros.org/camera_calibration
https://markhedleyjones.com/projects/calibration-checkerboard-collection