This repository contains some sources to calibrate the homogeneous transformation from robot flange to a stereo pair of cameras, which is also known as eye in hand.
- Eigen
% brew install eigen
Compile all the files using the following commands.
% mkdir cmake-build-debug
% cd cmake-build-debug
% cmake ..
% make
Make sure you are in the cmake-build-debug
folder to run the exeutables.
% ./handeye-calibration
File name | Description |
---|---|
base2flange_rpy.txt | Flange pose recorded w.r.t robot base coordinate in roll pitch yaw (mm and deg). |
T_B_hT.txt | Relative transformation of checkerboard from previous pose to current pose( w.r.t camera coordinate). |
T_A_hT.txt | Relative transformation of robot flange from previous pose to current pose( w.r.t robot base coordinate). |
flange2cam.txt | Homogeneous transformation from robot flange to camera. |
error_metrics.txt | Error analysis both in translation and rotation. |
Hightlighted .txt file is generated after executables.
Type 0 to implement transformation from base2flange_rpy.txt to T_A_hT.txt
Type 1 to implement Tsai Lenz's Calibration
Type 2 to implement Park and Martin's Calibration
When implementing 0 and 2,
void pose_rpy2T_L(){
calculateEIH calculateEih;
std::string filepath;
int dataPtsNum;
dataPtsNum = 28;
filepath = "../calib_dataset/";
...
}
void Calibrate_Park_Martin(){
calculateEIH calculateEih;
std::string filepath;
int dataPtsNum2;
dataPtsNum2 = 28;
filepath = "../calib_dataset/";
...
}
dataPtsNum
, dataPtsNum2
and filepath
should be modified before executables.
Make sure the numbers of base2flange_rpy.txt and T_B_hT.txt in calib_dataset match dataPtsNum -1
and dataPtsNum2 -1
,respectively.
When implementing 1,
choose two adjacent matrices either in T_A_hT.txt or T_B_hT.txt.
[1] Park, F.; Martin, B. Robot sensor calibration: Solving AX=XB on the Euclidean group. IEEE Trans. Robot. Autom. 1994, 10, 717–721, doi: 10.1109/70.326576.
[2] Tsai, R.; Lenz, R. A new technique for fully autonomous and efficient 3D robotics hand/eye calibration. IEEE Trans. Robot. Autom. 1989, 5, 345–358, doi: 10.1109/70.34770.
[3] Ali I, Suominen O, Gotchev A, Morales ER. Methods for simultaneous robot-world-hand–eye calibration: A comparative study. Sensors. 2019 Jan;19(12):2837.