Frame Rotations and Representations
Euler angles are a method to determine and represent the rotation of a body as expressed in a given coordinate frame. They are defined as three (chained) rotations relative to the three major axes of the coordinate frame. Euler angles are typically representes as phi (φ) for x-axis rotation, theta (θ) for y-axis rotation, and psi (ψ) for z-axis rotation. Any orientation can be described through a combination of these angles. Figure 1 represents the Euler angles for a multirotor aerial robot.
These elemental rotations can take place about the axes of the fixed coordinate frame (extrinsic rotations) or about the axes of a rotating coordinate frame (e.g. one attached on the vehicle), which is initially aligned with the fixed one, and modifies its orientation after each elemental rotation (intrinsic rotations). Without accounting the possibility of using two different conventions for the definition of the rotation axes (intrinsic or extrinsic), there exist twelve possible sequences of rotation axes, divided in two groups:
Figure 1: Euler angles represented for a multirotor aerial robot.
As seen there are many ways to do this set of rotations - with the variations be based on the order of rotations. All would be formally acceptable, but some are much more commonly used than others.
Among them, one that is particuarly widely used is the following: start with the body fixed-frame (attached on the vehicle) (x,y,z) aligned with the inertial frame (X,Y,Z), and then perform 3 rotations to re-orient the body frame.
To learn more about different conventions, please visit:
Figure 2: Representation of the Euler Angles.
We can write the aforementioned set of rotations as:
which combines to give:
To get the angular velocity, we will have to include three terms, namely the time derivative of ψ around Z, the time derivative of θ around y' and the time derivative of φ around x''. These three terms are combined to give the vector of angular velocities ω. The final result takes the form:
And in inverse form:
Note that one has to take care for singularities such as the pitch angle at plus/minus 90 degrees. A typical set of Euler Angles considers the following set of limitations:
Theorem by Euler states that any given sequence of rotations can be represented as a signle rotation about a single fixed axis. The concept of Quaternions provides a convenient parametrization of this effective axis and the rotation angle:
||b¯||=1abd thus there are only 3 degrees of freedom in this formulation, and
b¯represents the rotational transformation from the reference frame ( α) to the frame b, the frame αis aligned with frame bif frame αis rotated by ζabout E¯
This representation is connected with the Euler angles form, according to the following expression:
This representation has the great advantage of being:
- Singularity-free and
- Computationally efficient to do state propagation (typically within an Extended Kalman Filter)
Euler to-and-from Quaternions Python Implementation
Euler to-and-from Quaternions MATLAB Implementation