Hello,

I have been trying to generate orientation positions for the flange in respect to a single point.

I chose to calculate the direction of the vector from the tcp position to this point, in which the orientation of X vector from tcp is inversed from this calculated vector, Y vector parallel to the base, and Z vector pointed to the base. The image below shows the original reference frame from the base (Red - X, Green - Y, Blue - Z), the red dot as the point, and the frames with thin lines, the calculated pose.

To obtain the rotation matrix from the unit vectors i simply fit them in each respective column of the matrix:

Rmat =

Xx | Yx | Zx |

Xy | Yy | Zy |

Xz | Yz | Zz |

From this link from this forum, i know that Kukas rotation order is Rz-Ry-Rx which then to obtain the Euler angles (A,B,C as kuka uses) is then:

C = atan2(Yz, Zz)

B = asin(-Xz)

A = atan2(Xy,Xx)

The A,B,C values obtained from this are not however the expected from the image above. The image below is an example using RoboDk to simulate one pose:

Target 2 X vector should have been following the direction of the position of Target 1 to Target 2.

Am i not able to use the unit vectors in such way to calculate the Euler Angles?