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
θ=2⋅acos(w).
If θ=0, then the rotation vector is V=(000)T, otherwise it is
RX=θx√1−w2,RY=θy√1−w2,RZ=θz√1−w2.