Skip to content

Commit 49a0ceb

Browse files
authored
Merge pull request #850 from thomassedlmayer/docs/rotation-quat
Add Tait-Bryan convention and quaternion formula to documentation
2 parents 050885d + b993800 commit 49a0ceb

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

doc/usecases/transforming_coordinate_systems.adoc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ Get Tait–Bryan angles from rotation matrix cite:[wiki_euler_angles]:
7171
\phi = \arctan2(R_{23}/\cos(\theta),R_{33}/\cos(\theta))
7272
++++
7373

74+
Note that OSI uses the following convention on choosing rotation axes for Tait-Bryan angles: **z-y'-x''** intrinsic rotations (equivalent to **x-y-z** extrinsic rotations); see cite:[tait_bryan_convention].
75+
7476
**Relative orientation**:
7577

7678
Object rotation Matrix: latexmath:[\boldsymbol{R}_{object}^{src}] +
@@ -80,6 +82,19 @@ Resulting rotation matrix between object and host: latexmath:[\boldsymbol{R}_{ob
8082
To transform from world coordinates into host vehicle coordinates and back use the formulas from above with the world coordinates frame latexmath:[w] as source system latexmath:[src] and host vehicle coordinates frame latexmath:[v] as target system latexmath:[trg].
8183
To transform from host vehicle coordinates into sensor coordinates and back use the formulas from above with the host vehicle coordinates frame latexmath:[v] as source system latexmath:[src] and sensor coordinates frame latexmath:[s] as target system latexmath:[trg].
8284

85+
**Converting orientation to quaternions**:
86+
87+
To convert OSI's orientation representation from Tait-Bryan angles to quaternions use the following formula cite:[euler_to_quaternion]. The resulting quaternion is equivalent to yaw (ψ), pitch (θ) and roll (ϕ) angles (**x-y-z** extrinsic rotations) or intrinsic Tait-Bryan angles following the **z-y'-x''** convention.
88+
89+
[latexmath]
90+
++++
91+
\begin{align}
92+
q_i &= \sin \frac{\phi}{2} \cos \frac{\theta}{2} \cos \frac{\psi}{2} - \cos \frac{\phi}{2} \sin \frac{\theta}{2} \sin \frac{\psi}{2}\\
93+
q_j &= \cos \frac{\phi}{2} \sin \frac{\theta}{2} \cos \frac{\psi}{2} + \sin \frac{\phi}{2} \cos \frac{\theta}{2} \sin \frac{\psi}{2}\\
94+
q_k &= \cos \frac{\phi}{2} \cos \frac{\theta}{2} \sin \frac{\psi}{2} - \sin \frac{\phi}{2} \sin \frac{\theta}{2} \cos \frac{\psi}{2}\\
95+
q_r &= \cos \frac{\phi}{2} \cos \frac{\theta}{2} \cos \frac{\psi}{2} + \sin \frac{\phi}{2} \sin \frac{\theta}{2} \sin \frac{\psi}{2}
96+
\end{align}
97+
++++
8398

8499
**Corresponding messages**
85100

0 commit comments

Comments
 (0)