Halcon + Mech Viz - Transformation into robot coordinate system

When using Halcon + Mech-Viz how we can use the “extrinsic params.json” to transform the poses into robot coordinates? Do we have a description for the structure of this json-file?

For question2, a typical extri_params.json file contains following contents:

"depthInBase": [ 
    -0.16134834134115633, // x in m
    -0.2621560896981629, // y in m
    0.07800056475379202, // z in m
    0.7095554034519985, // quaternion w
    -0.021477410370260835, // quaternion x
    0.018457606012325992, // quaternion y
    -0.7040803697420861 // quaternion z

This array means a coordinate transformation from camera to robot coordinate if is EyeToHand, or camera to flange if is EyeInHand.
The quaternion can be converted to rotation matrix or euler angles by using some online tools like Orientation/Quaternion Rotation Calculator | Energid or python scripts.
Then the transformation matrix can be used to transform the poses.

In ETH application, this part (‘depthInBase’) is a transformation from robot coordinate to camera. You can think of it as the position of the camera in the robot’s coordinate system.
In EIH application, it means a trans from robot flange to camera. The position of the camera in the flange coordinate system

If you think of the camera as a tool (EIH), this picture may help you understand the transformation。


And Craig’s 《Introduction to robotics mechanics and control》, chapter 2 has detailed explanation.

As the using of Halcon, I am not familiar with it and may can’t help you

1 Like

As you can see as below:


‘depthInBase’: It describe the relative position between camera and base/flange. It can be converted to a 4x4 matrix for calculation. This item is your really need.
‘depthToCloud_offset’: When we convert ‘depth image’ to point cloud, MechMind Vision will use these compensation to against the error cause by optic system. Rarely be changed after leaving the factory.
‘is_eye_in_hand’: eih/eth
‘modify_time’: Update time
‘segment_params’:It means the picture’s dimension
‘version’: Version of MechMind Vision