Universal Robots pose format

The pose format that is used by Universal Robots consists of a position XYZ in millimeters and an orientation in angle-axis format V=(RXRYRZ)T. The rotation angle θ in radians is the length of the rotation axis U.

V=(RXRYRZ)=(θuxθuyθuz)

V is called a rotation vector.

Conversion from angle-axis format to quaternion

The conversion from a rotation vector V to a quaternion q=(xyzw)T can be done as follows.

We first recover the angle θ in radians from the rotation vector V by

θ=RX2+RY2+RZ2.

If θ=0, then the quaternion is q=(0001)T, otherwise it is

x=RXsin(θ/2)θ,y=RYsin(θ/2)θ,z=RZsin(θ/2)θ,w=cos(θ/2).

Conversion from quaternion to angle-axis format

The conversion from a quaternion q=(xyzw)T with ||q||=1 to a rotation vector in angle-axis form can be done as follows.

We first recover the angle θ in radians from the quaternion by

θ=2acos(w).

If θ=0, then the rotation vector is V=(000)T, otherwise it is

RX=θx1w2,RY=θy1w2,RZ=θz1w2.