しろねこらぼ(旧)

しろねこの気まぐれ技術日記

オイラー角を用いた回転表現

空間に置かれた剛体の回転について考える。今、剛体の姿勢を\boldsymbol{η}を用いて


\begin{align} \boldsymbol{η} = \begin{pmatrix} \phi \\ \theta \\ \psi \end{pmatrix} \end{align}
と定義する。ここで\phi, \theta,  \psi はRoll、Pitch、Yawそれぞれの角度を示している。

剛体の回転は独立した各軸の回転の組み合わせによって表される。3次元ユークリッド空間内に剛体がある場合3軸の組み合わせになる。このような回転の表し方をオイラー角という。
はじめにx軸における回転


\begin{align} \textbf{C}_{x}(\boldsymbol{η}) =
\begin{pmatrix}
1 & 0 & 0\\ 0 & \cos \phi &
- \sin \phi \\ 0 & \sin \phi &
\cos \phi \end{pmatrix}
\end{align}

その他の軸回りの回転も同様に


\begin{align}
\textbf{C}_{y}(\boldsymbol{η}) =
\begin{pmatrix}
\cos \theta & 0 & \sin \theta \\
0 & 1 & 0\\
-\sin \theta & 0 & \cos \theta
\end{pmatrix} \hspace{10mm} \textbf{C}_{z}(\boldsymbol{η}) =
\begin{pmatrix}
\cos \psi & -\sin \psi & 0 \\
\sin \psi & \cos \psi & 0 \\
0 & 0 & 1
\end{pmatrix}
\end{align}

で表される。このとき\textbf{C}は特殊直行群\mathrm{SO}(3)である。
\textbf{C}が特殊直交群であるとは
\begin{align}
\mathrm{SO}(3)=\left \{ \textbf{R} \in \mathbb{R}^{3 \times 3} | \det \textbf{R}=1 , {}^{t} \textbf{R} \textbf{R} = \textbf{E} \right \}
\end{align}
で示される。回転行列\textbf{C} \in \mathrm{SO}(3)より
\begin{align}
\textbf{C} {}^{t} \textbf{C}={}^{t} \textbf{C} \textbf{C}=\textbf{I} \hspace{10mm} \det \textbf{C}=1
\end{align}
\textbf{C}は対角行列でもあるので
\begin{align}
\textbf{C}^{-1} = {}^{t} \textbf{C}
\end{align}
を満足する。
オイラー角は回転の順序に制限がないため、3次元空間内の剛体の回転に関して12通りの表示が得られる。ここでは
\begin{align}
\textbf{R} \left ( \boldsymbol{η} \right ) = \textbf{C}_{z}(\boldsymbol{η}) \textbf{C}_{y}(\boldsymbol{η}) \textbf{C}_{x}(\boldsymbol{η}) \in \mathbb{R}^{3 \times 3}
\end{align}
とする。これを計算すれば


\begin{align} \textbf{R} \left ( \boldsymbol{η} \right ) =
\begin{pmatrix} \cos \psi \cos \theta & \cos \psi \sin \phi \sin \theta - \cos \phi \sin \psi & \sin \phi \sin \psi + \cos \phi \cos \psi \sin \theta \\ \cos \theta \sin \psi & \cos \phi \cos \psi + \sin \phi \sin \psi \sin \theta & \cos \phi \sin \psi \sin \theta - \cos \psi \sin \phi \\ -\sin \theta & \cos \theta \sin \phi & \cos \phi \cos \theta \end{pmatrix} \end{align}
を得る。逆行列は転地行列で与えられるから

\begin{align} \textbf{R}^{-1} \left ( \boldsymbol{η} \right ) \begin{pmatrix} \cos \theta \cos \psi & \cos \theta \sin \psi & -\sin \theta \\ \sin \phi \sin \theta \cos \psi - \cos \phi \sin \psi & \sin \phi \sin \theta \sin \psi + \cos \phi \cos \psi & \sin \phi \cos \theta \\ \cos \phi \sin \theta \cos \psi + \sin \phi \sin \psi & \cos \phi \sin \theta \sin \psi - \sin \phi \cos \psi & \cos \phi \cos \theta \end{pmatrix} \end{align}
となる。