1
$\begingroup$

Given two frames, is it possible to compute any rotation of the form

$R = R_xR_yR_z $

that would tranform the frame $A$ into the frame $B$? the rotation will be described by Euler angles as I need to quantify the rotation on each axis.

  • 0
    Yes, this might be relevant for you: http://math.stackexchange.com/questions/66649/3-rotations-to-unit-vector-3d/67162#671622011-12-02

2 Answers 2

1

Suppose we have the coordinates of a point in space with respect to a NED ("North, East, Down") coordinate system, and we want to find the coordinates of that point with respect to a "vehicle" coordinate system, and we know the vehicle's roll, pitch, and yaw.

This vehicle coordinate system has its positive x axis coming out the front of the vehicle, positive y axis coming out the right side of the vehicle, and positive z axis coming out the bottom of the vehicle. The vehicle's orientation is specified by its roll $R$, its pitch $P$, and its yaw $Y$. For simplicity we'll assume the origin of the vehicle coordinate system is located at the origin of the NED coordinate system. If the roll, pitch, and yaw were all $0$, then the vehicle coordinate frame would be perfectly aligned with the NED coordinate frame.

Conceptually, we will imagine that the vehicle frame at first is perfectly aligned with the NED frame, and that the vehicle first yaws by $Y$, then pitches by $P$, then rolls by $R$. We will compute the vehicle coordinates of our point after each of these three rotations.

To start with, the vehicle coordinates of our point are the same as the NED coordinates, let us say $[x,y,z]^T$.

To update the vehicle coordinates after the first rotation (the yaw) you should multiply by this matrix: $ \begin{bmatrix} \cos(Y) & \sin(Y) & 0 \\ -\sin(Y) & \cos(Y) & 0 \\ 0 & 0 & 1 \end{bmatrix}$.

To update the vehicle coordinates after the next rotation (the pitch), you multiply by this matrix: $ \begin{bmatrix} \cos(P) & 0 & -\sin(P) \\ 0 & 1 & 0 \\ \sin(P) & 0 & \cos(P) \end{bmatrix}$.

To update the vehicle coordinates after the third rotation (the roll), you multiply by this matrix: $ \begin{bmatrix} 1 & 0 & 0 \\ 0 & \cos(R) & \sin(R) \\ 0 & -\sin(R) & \cos(R) \end{bmatrix}$.

If you apply all three updates one after another, it's the same as multiplying by this matrix: \begin{equation} \begin{bmatrix} 1 & 0 & 0 \\ 0 & \cos(R) & \sin(R) \\ 0 & -\sin(R) & \cos(R) \end{bmatrix} \begin{bmatrix} \cos(P) & 0 & -\sin(P) \\ 0 & 1 & 0 \\ \sin(P) & 0 & \cos(P) \end{bmatrix} \begin{bmatrix} \cos(Y) & \sin(Y) & 0 \\ -\sin(Y) & \cos(Y) & 0 \\ 0 & 0 & 1 \end{bmatrix} \end{equation} which is equal to \begin{equation} \begin{bmatrix} \cos(P) \cos(Y) & \cos(P) \sin(Y) & -\sin(P) \\ \cos(Y) \sin(P) \sin(R) - \cos(R) \sin(Y) & \cos(R) \cos(Y) + \sin(P) \sin(R) \sin(Y) & \cos(P) \sin(R) \\ \cos(R) \cos(Y) \sin(P) + \sin(R) \sin(Y) & \cos(R) \sin(P) \sin(Y) - \cos(Y) \sin(R) & \cos(P) \cos(R) \end{bmatrix} . \end{equation}

This matrix multiplication is performed on Wolfram Alpha here. The answer agrees with equation (2.31) in Farrell and Barth.

0

yes, this is possible, although it might not be unique. Because the map of SO(3) formed by the Euler angles have singularities, e.g. at $\theta = \pi$. This is known as gimbal lock.

  • 0
    No, $x \pm \pi$ etc.. is not in the domain of the respective angle. e.g. $\theta \in [0,\pi)$ ... the singularity is only at one boundary, depending on the definition.2012-02-01