Using the OpenCV to execute the Hand-Eye calibraiton is very efficent and comes with good results.
Their method implements the solutions to the **AX = XB** equation. The current implementation uses [[https://docs.opencv.org/4.x/d9/d0c/group__calib3d.html#gaebfc1c9f7434196a374c382abf43439b|calibrateHandEye()]].
There are a couple different methods that can be used to solve the issue, the choices of methods can be found [[https://docs.opencv.org/4.x/d9/d0c/group__calib3d.html#gad10a5ef12ee3499a0774c7904a801b99|here]].
The functions expects the rotation matrices from **R_gripper2base** and the translation part from the homogenous matrix **t_gripper2base**, as well as the corresponding parts for the **target2cam**.
__NOTE:__ Current implementation does not allow fixed camera when doing the hand-eye calibraiton but one could put an ArUco marker in the middle of the gripper and move the gripper around the camera's view frame. This would require an entire new skill or major changes to the current implementation.
----
Input elements:
* **Camera** - Camera to do the calibration for.
* **Arm** - Arm connected with the camera.
* **Object** - Reference Point used when generating poses, also the target.
* **Radius** - Radius of sphere when generating poses.
* **MaxDistance** - Limits the maximum distance of the generated poses from the base of the `Arm`.
* **MinDistance** - Minimum distance from the base for the generated poses.
* **TheesholdPos** - How accurate the //go_to_linear()// functions needs to be before saying that it reached its destination.
* **Number of Poses** - Number of poses for the hand-eye calibration with a minimum of 2.
Required world model relations:
* **Arm** ''skiros:hasA'' **EELink**
* **Camera** ''skiros:hasA'' **View Frame**
The **Arm** need the the following properties set in the world model:
* ''skiros:LinkedToFrameId''