This repository is based on the Unitree Z1 SDK and extends its functionalities for control within ROS Noetic environment. It includes calibration for both eye-in-hand and eye-to-hand camera setups.
- Compute Platform: Nvidia Jetson Orin NX
- Operating System: Jetpack 5.1.2 (Ubuntu 20.04)
- ROS Distribution: ROS Noetic
- Cameras: Realsense D455/D455f
- Robotic Arm: Unitree Z1
The examples folder contains official sample programs provided by Unitree, as detailed on the official wiki. Our scripts are adaptations of the highcmd_basic example.
To run an example program, first start the controller by opening a terminal and running:
./z1_ctrlThen, execute the program, for example:
rosrun z1_ros highcmd_developmentFor convenience, our launch files include the above steps, allowing you to start with:
roslaunch z1_ros highcmd_development.launchThe src folder contains our ROS programs. highcmd_basic_ros.cpp is our modified script demonstrating moveJ, moveL, and moveC controls. These can also be run using roslaunch.
Calibration is conducted using Apriltag with the 41h12 tag family. Please download and place it in your workspace from Apriltag ROS.
My other repository, my_tf_transformer, can rotate the tag_1 TF frame to align with the Unitree Z1 coordinate frame. While not necessary for the calibration process, it is essential for testing the calibration results.
test.launch includes commands to start the Realsense D455 camera, Apriltag_ros, and my_tf_transformer:
roslaunch z1_ros test.launcheye_in_hand_calibration.cpp and eye_to_hand_calibration.cpp are the programs for eye-in-hand and eye-to-hand camera calibration, respectively, using the cv::calibrateHandEye function.
Calibration involves moving the robotic arm to points specified in ./config/1.csv and 2.csv, with each line containing Euler angles followed by XYZ coordinates.
test_eye_in_hand_calibration.cpp and test_eye_to_hand_calibration.cpp are programs to test the calibration results. Ideally, the 3D printed tip of the robotic arm should touch the center of the Apriltag.
A video of the calibration process can be viewed here.
The 3D printed tip model used for calibration is available on MakerWorld.
Note: The calibration results were suboptimal, with a 6-degree pitch deviation in the eye-in-hand results and approximately 25 cm deviation along the X-axis in the eye-to-hand results.