Welcome to DOFBOT-Ultra repository
3. Calibration offset(Depth Camera)
Calibration Offset (Depth Camera)
Please confirm that the currently selected camera is DABAI_DCW2.
Make sure the calibration board is flat. Even slight unevenness may cause a calibration error of more than 10 mm.
1. Preparation Before Calibration
- Ensure the robotic arm and depth camera are properly connected.
- Place the AprilTag calibration board on the table.
- Prepare a 30 mm high wood block with an AprilTag (used for the second stage: plane/height calibration).
- Do not move the robotic arm body during calibration; only move the Tag or the Tag on the spacer block.
Placeholder image:

2. Start the Calibration Wizard
Run the following command in the terminal:
ros2 run dofbot_ultra_driver calibration_wizardThe program will display a menu:
- Vision & Plane Calibration
- Mechanical Bias & Height Comp Tuning
- Run Grasp Test Q. Quit
This tutorial covers depth camera offset calibration. Please select 1.

3. Step 1: Center Point Offset Calibration (X/Y)
After entering vision calibration, the calibration window (Rotation Calibration) will open.

Follow the on-screen instructions:
- Place the Tag flat on the table reference position (the interface will show
Place Tag flat on table at X=18.1cm). - Ensure the Tag is stably recognized in the frame.
- Press the SPACEBAR (or ENTER) to start sampling.
After this step, x_offset and y_offset in offset_value.yaml will be written or updated.
4. Step 2: Plane and Height Calibration (Slope/Z)
This calibration addresses the issue of inconsistent height readings when the block moves across different positions on the screen.
Continue following the on-screen instructions:
Place the Tag on a 30 mm spacer block, or use a 30 mm high block with an AprilTag on its surface. Place the block at different positions on the table.
- (It is recommended to place the first point at the AprilTag position on the calibration paper.) Press SPACEBAR to complete one sample.
- Ensure there is only one AprilTag in the frame during each sample.
Collect points at different positions on the table. Press SPACE at each new position.
After collecting at least 3 points, press ENTER (or C) to calculate and save the result.

This step will update the following configurations:
planar_correction.yaml(slope correction)offset_value.yaml(updatesz_offset, and may recalculatex_offset)arm_bias.yaml(updatesz_comp_x,z_comp_z)
After calibration, the window will display completion and exit automatically.

5. Configuration File Locations
The program will automatically search and save configurations in the following directories (in order of existence):
Raspberry Pi paths:
xxxxxxxxxx/home/yahboom/dofbot_ultra/src/core/dofbot_ultra_driver/config/home/yahboom/dofbot_ultra/core/dofbot_ultra_driver/config/home/yahboom/dofbot_ultra_ws/src/dofbot_ultra_driver/configRDK X5 paths:
xxxxxxxxxx/home/sunrise/dofbot_ultra_ws/src/core/dofbot_ultra_driver/configCommon file example:
xxxxxxxxxxx_offset0.0y_offset0.0z_offset0.06. Important Notes
- Press
ESCin the calibration window to exit the current calibration. - If the Tag is not recognized or the depth data is invalid during sampling, a failure prompt will appear. Adjust and retry.
- Important: After calibration is complete, return to the main menu and select option 3 to test grasping. If there is still an offset, this offset is a fixed mechanical error and can be adjusted through option 2 in the main menu.
7. Grasp Test
Close the calibration program and run the grasp test to verify whether the calibration was successful.
Restart the calibration wizard program and select option 3 from the menu to enter the grasp test:
xxxxxxxxxxros2 run dofbot_ultra_driver calibration_wizard


Press the SPACEBAR to grasp. If the gripper can grasp the middle-lower part of the block, the calibration is successful.
You can also move the block to different positions and press SPACEBAR to test grasping.