0

Went through the explanation of quaternion rotations in here.

I try to figure out some starting assumptions and I am not sure how to approach them.

  1. If I have a left-hand coordinate system where rotations are made in the order: yaw (Y - up axis) -> pitch (X - right axis) -> roll (Z - forward axis) and moreover they are defined as follows:
  • yaw axis is defined by the left-hand rule (counter-clockwise along the Up axis)
  • pitch axis is defined by the right-hand rule (clockwise along the Right axis)
  • roll axis is defined by the right-hand rule (clockwise along the Forward axis)

Does this orientation thing have effect on the signs of cosines and sines of quaternions?

  1. Are the order of those i, j, k related to XYZ frame or to the order of rotations? So in my case i would be for yaw (first axis) or pitch (X-axis)?

Thanks in advance!

1 Answers1

1

We can write quaternions $w+xi+yj+zk$ as 4D vectors $[w,x,y,z]^T$.

Unit quaternions $q$ represent rotations (so $\lVert q\rVert_2=1$).

Every unit quaternion can be written as $$ q = \begin{bmatrix}\cos(\theta/2)\\\mathbf{v}\sin(\theta/2)\end{bmatrix},$$ where $\theta$ is the rotation angle and $\mathbf{v}\in\mathbf{R}^3$ with $\lVert\mathbf{v}\rVert_2=1$ is the rotation axis.

This means, if I understood your description correctly:

  • If you have a unit quaternion $[w,x,y,z]^T$ with $y=z=0$, it represents a rotation around the x axis, so it is a pure pitch.
  • If you have a unit quaternion $[w,x,y,z]^T$ with $x=z=0$, it represents a rotation around the y axis, so it is a pure yaw.
  • If you have a unit quaternion $[w,x,y,z]^T$ with $x=y=0$, it represents a rotation around the z axis, so it is a pure roll.

But I have to point out that in a unit quaternion $w+ix+jy+kz = [w,x,y,z]^T$ the $x,y,z$ do not directly correspond to amount pitch, yaw and roll amounts!

Stefan Hante
  • 2,726