SLAM基础:旋转矩阵与欧拉角

旋转矩阵

对向量进行旋转

在这里插入图片描述
对向量进行旋转本质上是一个由向量空间V到向量空间V的线性变换 R : V → V \mathscr{R}:V\to V R:VV
由几何关系,向量绕坐标系 z z z轴旋转角度 θ \theta θ,z轴坐标不变,因此可以只关注x-y二维平面,向量 ( 1 , 0 ) (1,0) (1,0)变为 ( cos ⁡ θ , sin ⁡ θ ) (\cos\theta,\sin\theta) (cosθ,sinθ),向量 ( 0 , 1 ) (0,1) (0,1)变为 ( − sin ⁡ θ , cos ⁡ θ ) (-\sin\theta,\cos\theta) (sinθ,cosθ)
( e ⃗ 1 , e ⃗ 2 ) [ cos ⁡ θ sin ⁡ θ ] = ( e ⃗ 1 , e ⃗ 2 ) R [ 1 0 ] ( e ⃗ 1 , e ⃗ 2 ) [ − sin ⁡ θ cos ⁡ θ ] = ( e ⃗ 1 , e ⃗ 2 ) R [ 0 1 ] (\vec{\boldsymbol{e}}_1,\vec{\boldsymbol{e}}_2)\begin{bmatrix} \cos\theta \\ \sin \theta \end{bmatrix}= (\vec{\boldsymbol{e}}_1,\vec{\boldsymbol{e}}_2) \boldsymbol{R}\begin{bmatrix} 1 \\ 0 \end{bmatrix}\\ (\vec{\boldsymbol{e}}_1,\vec{\boldsymbol{e}}_2)\begin{bmatrix} -\sin \theta \\ \cos \theta \end{bmatrix}=(\vec{\boldsymbol{e}}_1,\vec{\boldsymbol{e}}_2) \boldsymbol{R} \begin{bmatrix} 0 \\ 1 \end{bmatrix} (e 1,e 2)[cosθsinθ]=(e 1,e 2)R[10](e 1,e 2)[sinθcosθ]=(e 1,e 2)R[01]
将上式按列合并得
[ cos ⁡ θ − sin ⁡ θ sin ⁡ θ cos ⁡ θ ] = R [ 1 0 0 1 ] = R \begin{bmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{bmatrix}=\boldsymbol{R}\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}=\boldsymbol{R} [cosθsinθsinθcosθ]=R[1001]=R

于是
R z = [ cos ⁡ θ − sin ⁡ θ 0 sin ⁡ θ cos ⁡ θ 0 0 0 1 ] \boldsymbol{R}_{z}=\begin{bmatrix} \cos \theta & -\sin \theta & 0 \\ \sin \theta & \cos \theta & 0 \\ 0 & 0 & 1 \end{bmatrix} Rz= cosθsinθ0sinθcosθ0001
任意向量 v = ( e ⃗ 1 , e ⃗ 2 , e ⃗ 3 ) [ x y z ] = x e ⃗ 1 + y e ⃗ 2 + z e ⃗ 3 \boldsymbol{v}=(\vec{\boldsymbol{e}}_1,\vec{\boldsymbol{e}}_2,\vec{\boldsymbol{e}}_3)\begin{bmatrix}x\\y\\z\end{bmatrix}=x\vec{\boldsymbol{e}}_1+y\vec{\boldsymbol{e}}_2+z\vec{\boldsymbol{e}}_3 v=(e 1,e 2,e 3) xyz =xe 1+ye 2+ze 3
由于旋转是线性变换
R ( v ) = x R ( e ⃗ 1 ) + y R ( e ⃗ 2 ) + z R ( e ⃗ 3 ) = R ( e ⃗ 1 , e ⃗ 2 , e ⃗ 3 ) [ x y z ] = ( e ⃗ 1 , e ⃗ 2 , e ⃗ 3 ) R z [ x y z ] \mathscr{R}(\boldsymbol{v})=x\mathscr{R}(\vec{\boldsymbol{e}}_1)+y\mathscr{R}(\vec{\boldsymbol{e}}_2)+z\mathscr{R}(\vec{\boldsymbol{e}}_3)=\mathscr{R}(\vec{\boldsymbol{e}}_1,\vec{\boldsymbol{e}}_2,\vec{\boldsymbol{e}}_3)\begin{bmatrix}x\\y\\z\end{bmatrix}=(\vec{\boldsymbol{e}}_1,\vec{\boldsymbol{e}}_2,\vec{\boldsymbol{e}}_3)\boldsymbol{R}_z\begin{bmatrix}x\\y\\z\end{bmatrix} R(v)=xR(e 1)+yR(e 2)+zR(e 3)=R(e 1,e 2,e 3) xyz =(e 1,e 2,e 3)Rz xyz
旋转后的向量坐标为
R z [ x y z ] \boldsymbol{R}_z\begin{bmatrix}x\\y\\z\end{bmatrix} Rz xyz
同理可得
R x = [ 1 0 0 0 cos ⁡ θ − sin ⁡ θ 0 sin ⁡ θ cos ⁡ θ ] R y = [ cos ⁡ θ 0 sin ⁡ θ 0 1 0 − sin ⁡ θ 0 cos ⁡ θ ] \boldsymbol{R}_{x}=\begin{bmatrix} 1 & 0 & 0 \\ 0 & \cos \theta & -\sin \theta\\ 0 & \sin \theta & \cos \theta \end{bmatrix} \\ \boldsymbol{R}_{y}=\begin{bmatrix} \cos \theta & 0 & \sin \theta \\ 0 & 1 & 0 \\ -\sin \theta & 0 & \cos \theta \end{bmatrix} Rx= 1000cosθsinθ0sinθcosθ Ry= cosθ0sinθ010sinθ0cosθ
在参考系1下对某一坐标点进行旋转,旋转矩阵为 R \boldsymbol{R} R(相对于参考系1而言), a i j \boldsymbol{a}_i^j aij表示空间点i在坐标系j下的坐标
1 a 2 = R 1 1 a 1 {}^1\boldsymbol{a}_2=\boldsymbol{R}_1 {}^1\boldsymbol{a}_1 1a2=R11a1
由于旋转是相互的,固定坐标系对点的旋转 等同于 固定点 对坐标系施以逆旋转,意思是要通过一个旋转让点到达相应的坐标,可以直接旋转坐标点,也可以对坐标系进行反向旋转。

因此
1 a 2 = 2 a 1    ⟹    2 a 1 = R 1 1 a 1 {}^1\boldsymbol{a}_2={}^2\boldsymbol{a}_1\implies {}^2\boldsymbol{a}_1 =\boldsymbol{R}_1{}^1\boldsymbol{a}_1 1a2=2a12a1=R11a1
矩阵代表着一个代数运算,凡矩阵一定是对坐标进行变换,而提到坐标就一定是在对应的坐标系中去衡量。因此旋转矩阵对于旋转的表示也是相对于某一坐标系的。
设空间某一向量在坐标系A下的坐标表示如下, [ e ⃗ 1 e ⃗ 2 e ⃗ 3 ] \begin{bmatrix} \vec{\boldsymbol{e}}_1 & \vec{\boldsymbol{e}}_2 & \vec{\boldsymbol{e}}_3 \end{bmatrix} [e 1e 2e 3]为坐标系A的基向量。
v = [ e ⃗ 1 e ⃗ 2 e ⃗ 3 ] [ a 1 a 2 a 3 ] v = E ⃗ a \boldsymbol{v}=\begin{bmatrix}\vec{\boldsymbol{e}}_1 & \vec{\boldsymbol{e}}_2 & \vec{\boldsymbol{e}}_3\end{bmatrix}\begin{bmatrix}a_1\\a_2\\a_3\end{bmatrix}\\ \boldsymbol{v}=\vec{\mathcal{E}}\boldsymbol{a} v=[e 1e 2e 3] a1a2a3 v=E a

对坐标系进行旋转

对坐标系进行旋转,即对坐标系的基向量均进行一个相同的旋转(在坐标系A下坐标变换!)

e ⃗ 1 ′ = [ e ⃗ 1 e ⃗ 2 e ⃗ 3 ] R [ 1 0 0 ] e ⃗ 2 ′ = [ e ⃗ 1 e ⃗ 2 e ⃗ 3 ] R [ 0 1 0 ] e ⃗ 3 ′ = [ e ⃗ 1 e ⃗ 2 e ⃗ 3 ] R [ 0 0 1 ]    ⟹    [ e ⃗ 1 ′ e ⃗ 2 ′ e ⃗ 3 ′ ] = [ e ⃗ 1 e ⃗ 2 e ⃗ 3 ] R [ 1 0 0 0 1 0 0 0 1 ] E ⃗ ′ = E ⃗ R \vec{\boldsymbol{e}}_1'=\begin{bmatrix}\vec{\boldsymbol{e}}_1 & \vec{\boldsymbol{e}}_2 & \vec{\boldsymbol{e}}_3\end{bmatrix}\boldsymbol{R}\begin{bmatrix}1\\0\\0\end{bmatrix}\\ \vec{\boldsymbol{e}}_2'=\begin{bmatrix}\vec{\boldsymbol{e}}_1 & \vec{\boldsymbol{e}}_2 & \vec{\boldsymbol{e}}_3\end{bmatrix}\boldsymbol{R}\begin{bmatrix}0\\1\\0\end{bmatrix}\\ \vec{\boldsymbol{e}}_3'=\begin{bmatrix}\vec{\boldsymbol{e}}_1 & \vec{\boldsymbol{e}}_2 & \vec{\boldsymbol{e}}_3\end{bmatrix}\boldsymbol{R}\begin{bmatrix}0\\0\\1\end{bmatrix}\\ \implies \begin{bmatrix}\vec{\boldsymbol{e}}_1' & \vec{\boldsymbol{e}}_2' & \vec{\boldsymbol{e}}_3' \end{bmatrix}=\begin{bmatrix}\vec{\boldsymbol{e}}_1 & \vec{\boldsymbol{e}}_2 & \vec{\boldsymbol{e}}_3\end{bmatrix}\boldsymbol{R}\begin{bmatrix}1&0&0\\0&1&0\\0&0&1\end{bmatrix}\\ \vec{\mathcal{E}}'=\vec{\mathcal{E}}\boldsymbol{R} e 1=[e 1e 2e 3]R 100 e 2=[e 1e 2e 3]R 010 e 3=[e 1e 2e 3]R 001 [e 1e 2e 3]=[e 1e 2e 3]R 100010001 E =E R
则空间中同一向量
v = [ e ⃗ 1 ′ e ⃗ 2 ′ e ⃗ 3 ′ ] [ a 1 ′ a 2 ′ a 3 ′ ] = [ e ⃗ 1 e ⃗ 2 e ⃗ 3 ] R [ 1 0 0 0 1 0 0 0 1 ] [ a 1 ′ a 2 ′ a 3 ′ ] v = E ⃗ ′ a ′ = E ⃗ R a ′ = E ⃗ a \boldsymbol{v}=\begin{bmatrix}\vec{\boldsymbol{e}}_1' & \vec{\boldsymbol{e}}_2' & \vec{\boldsymbol{e}}_3' \end{bmatrix}\begin{bmatrix}a_1'\\a_2'\\a_3'\end{bmatrix}=\begin{bmatrix}\vec{\boldsymbol{e}}_1 & \vec{\boldsymbol{e}}_2 & \vec{\boldsymbol{e}}_3\end{bmatrix}\boldsymbol{R}\begin{bmatrix}1&0&0\\0&1&0\\0&0&1\end{bmatrix}\begin{bmatrix}a_1'\\a_2'\\a_3'\end{bmatrix}\\ \boldsymbol{v}=\vec{\mathcal{E}}'\boldsymbol{a}'=\vec{\mathcal{E}}\boldsymbol{R}\boldsymbol{a}' =\vec{\mathcal{E}}\boldsymbol{a} v=[e 1e 2e 3] a1a2a3 =[e 1e 2e 3]R 100010001 a1a2a3 v=E a=E Ra=E a

R [ 1 0 0 0 1 0 0 0 1 ] [ a 1 ′ a 2 ′ a 3 ′ ] = [ a 1 a 2 a 3 ]    ⟹    R a ′ = a    ⟹    a ′ = R − 1 a = R T a \boldsymbol{R}\begin{bmatrix}1&0&0\\0&1&0\\0&0&1\end{bmatrix}\begin{bmatrix}a_1'\\a_2'\\a_3'\end{bmatrix}=\begin{bmatrix}a_1\\a_2\\a_3\end{bmatrix}\\ \implies \boldsymbol{R}\boldsymbol{a}'=\boldsymbol{a}\\ \implies \boldsymbol{a}'=\boldsymbol{R}^{-1}\boldsymbol{a}=\boldsymbol{R}^T\boldsymbol{a} R 100010001 a1a2a3 = a1a2a3 Ra=aa=R1a=RTa

欧拉角

旋转轴可以选择运动轴(物体自身坐标系),也可以选择固定轴(世界参考系);

运动轴

XYZ顺序欧拉角

  1. 沿着原始坐标系的主轴1旋转 θ 1 \theta_1 θ1度(滚转角)
  2. 沿着新坐标系的主轴2旋转 θ 2 \theta_2 θ2度(俯仰角)
  3. 沿着新坐标系主轴3旋转 θ 3 \theta_3 θ3度(偏航角)

将父坐标系经过上述三步转换到子坐标系。这种序列被广泛运用在航空航天领域,成为1-2-3姿态序列,或是RPY(滚转角-俯仰角-偏航角)表示法或XYZ顺序。

可以得到旋转后坐标系到原始坐标系的旋转矩阵为:
a = R x a ′ a ′ = R y a ′ ′ a ′ ′ = R z a ′ ′ ′ a = R x R y R z a ′ ′ ′ E ⃗ R x = E ⃗ ′ E ⃗ ′ R y = E ⃗ ′ ′ E ⃗ ′ ′ R z = E ⃗ ′ ′ ′ E ⃗ ′ ′ ′ = E ⃗ R x R y R z \begin{array}{l} \boldsymbol{a}=\boldsymbol{R}_x \boldsymbol{a}'\\ \boldsymbol{a}'=\boldsymbol{R}_y\boldsymbol{a}''\\ \boldsymbol{a}''=\boldsymbol{R}_z\boldsymbol{a}'''\\ \boldsymbol{a}=\boldsymbol{R}_x\boldsymbol{R}_y \boldsymbol{R}_z \boldsymbol{a}'''\end{array} \begin{array}{l} \vec{\mathcal{E}} \boldsymbol{R}_{x}=\vec{\mathcal{E}}'\\ \vec{\mathcal{E}}' \boldsymbol{R}_y=\vec{\mathcal{E}}''\\ \vec{\mathcal{E}}'' \boldsymbol{R}_z= \vec{\mathcal{E}}''' \\ \vec{\mathcal{E}}'''=\vec{\mathcal{E}}\boldsymbol{R}_{x}\boldsymbol{R}_{y}\boldsymbol{R}_{z} \end{array} a=Rxaa=Rya′′a′′=Rza′′′a=RxRyRza′′′E Rx=E E Ry=E ′′E ′′Rz=E ′′′E ′′′=E RxRyRz

R x = [ 1 0 0 0 cos ⁡ θ 1 − sin ⁡ θ 1 0 sin ⁡ θ 1 cos ⁡ θ 1 ] R y = [ cos ⁡ θ 2 0 sin ⁡ θ 2 0 1 0 − sin ⁡ θ 2 0 cos ⁡ θ 2 ] R z = [ cos ⁡ θ 3 − sin ⁡ θ 3 0 sin ⁡ θ 3 cos ⁡ θ 3 0 0 0 1 ] R x R y R z = [ c 2 0 s 2 s 1 s 2 c 1 − s 1 c 2 − c 1 s 2 s 1 c 1 c 2 ] [ c 3 − s 3 0 s 3 c 3 0 0 0 1 ] = [ c 2 c 3 − c 2 s 3 s 2 s 1 s 2 c 3 + c 1 s 3 c 1 c 3 − s 1 s 2 s 3 − s 1 c 2 s 1 s 3 − c 1 s 2 c 3 s 1 c 3 + c 1 s 2 s 3 c 1 c 2 ] \boldsymbol{R}_{x}=\begin{bmatrix} 1 & 0 & 0 \\ 0 & \cos \theta _{1} & -\sin \theta_1\\ 0 & \sin \theta _{1} & \cos \theta _{1} \end{bmatrix} \\ \boldsymbol{R}_{y}=\begin{bmatrix} \cos \theta _{2} & 0 & \sin \theta _{2} \\ 0 & 1 & 0 \\ -\sin \theta _{2} & 0 & \cos \theta _{2} \end{bmatrix} \\ \boldsymbol{R}_{z}=\begin{bmatrix} \cos \theta _{3} & -\sin \theta _{3} & 0 \\ \sin \theta _{3} & \cos \theta _{3} & 0 \\ 0 & 0 & 1 \end{bmatrix}\\ \boldsymbol{R}_{x}\boldsymbol{R}_{y}\boldsymbol{R}_{z}=\begin{bmatrix} c_{2} & 0 & s_{2} \\ s_{1}s_{2} & c_{1} & -s_{1}c_{2} \\ -c_{1}s_{2} & s_{1} & c_{1}c_{2} \end{bmatrix}\begin{bmatrix} c_{3} & -s_{3} & 0 \\ s_{3} & c_{3} & 0 \\ 0 & 0 & 1 \end{bmatrix} \\=\begin{bmatrix} c_{2}c_{3} & -c_{2}s_{3} & s_{2} \\ s_{1}s_{2}c_{3}+c_{1}s_{3} & c_{1}c_{3}-s_{1}s_{2}s_{3} & -s_{1}c_{2} \\ s_{1}s_{3}-c_{1}s_{2}c_{3} & s_{1}c_{3}+c_{1}s_{2}s_{3} & c_{1}c_{2} \end{bmatrix} Rx= 1000cosθ1sinθ10sinθ1cosθ1 Ry= cosθ20sinθ2010sinθ20cosθ2 Rz= cosθ3sinθ30sinθ3cosθ30001 RxRyRz= c2s1s2c1s20c1s1s2s1c2c1c2 c3s30s3c30001 = c2c3s1s2c3+c1s3s1s3c1s2c3c2s3c1c3s1s2s3s1c3+c1s2s3s2s1c2c1c2

ZYX顺序欧拉角

3-2-1姿态序列,或是YPR(偏航角-俯仰角-滚转角)表示法或ZYX顺序。
R z R y R x = [ c 2 c 3 − s 3 s 2 c 3 c 2 s 3 c 3 s 2 s 3 − s 2 0 c 2 ] [ 1 0 0 0 c 1 − s 1 0 s 1 c 1 ] = [ c 2 c 3 s 1 s 2 c 3 − c 1 s 3 s 1 s 3 + c 1 s 2 c 3 c 2 s 3 c 1 c 3 + s 1 s 2 s 3 c 1 s 2 s 3 − s 1 c 3 − s 2 s 1 c 2 c 1 c 2 ] \boldsymbol{R}_{z}\boldsymbol{R}_{y}\boldsymbol{R}_{x}=\begin{bmatrix} c_{2}c_{3} & -s_{3} & s_{2}c_{3} \\ c_{2}s_{3} & c_{3} & s_{2}s_{3} \\ -s_{2} & 0 & c_{2} \end{bmatrix}\begin{bmatrix} 1 & 0 & 0 \\ 0 & c_{1} & -s_{1} \\ 0 & s_{1} & c_{1} \end{bmatrix} \\ =\begin{bmatrix} c_{2}c_{3} & s_{1}s_{2}c_{3}-c_{1}s_{3} & s_{1}s_{3}+c_{1}s_{2}c_{3} \\ c_{2}s_{3} & c_{1}c_{3}+s_{1}s_{2}s_{3} & c_{1}s_{2}s_{3}-s_{1}c_{3} \\ -s_{2} & s_{1}c_{2} & c_{1}c_{2} \end{bmatrix} RzRyRx= c2c3c2s3s2s3c30s2c3s2s3c2 1000c1s10s1c1 = c2c3c2s3s2s1s2c3c1s3c1c3+s1s2s3s1c2s1s3+c1s2c3c1s2s3s1c3c1c2

旋转矩阵转欧拉角

由旋转矩阵的特点, sin ⁡ θ 2 \sin\theta_2 sinθ2的数值已经确定,第一列和第三行的其他数值是 cos ⁡ θ 2 \cos\theta_2 cosθ2 sin ⁡ θ 1 , cos ⁡ θ 1 , sin ⁡ θ 3 , cos ⁡ θ 3 \sin\theta_1,\cos\theta_1,\sin\theta_3,\cos\theta_3 sinθ1,cosθ1,sinθ3,cosθ3的乘积。矩阵的其他位置的三次项均含一项确定数值的 sin ⁡ θ 2 \sin\theta_2 sinθ2,二次项中均不含 sin ⁡ θ 2 \sin\theta_2 sinθ2
可以得出 cos ⁡ θ 2 \cos\theta_2 cosθ2 sin ⁡ θ 1 , cos ⁡ θ 1 , sin ⁡ θ 3 , cos ⁡ θ 3 \sin\theta_1,\cos\theta_1,\sin\theta_3,\cos\theta_3 sinθ1,cosθ1,sinθ3,cosθ3有两套不同正负号的结果,但对于两种结果的旋转矩阵相同。物理意义为:有两套不同的欧拉角对应相同的旋转。我们总是可以假设 cos ⁡ θ 2 \cos\theta_2 cosθ2为正,得到唯一的结果。
θ 1 = a t a n 2 ( r 32 , r 33 ) θ 2 = a t a n 2 ( − r 31 , r 32 2 , r 33 2 ) θ 3 = a t a n 2 ( r 21 , r 11 ) \begin{aligned} \theta_1&={\rm atan2}(r_{32},r_{33})\\ \theta_2&={\rm atan2}\left(-r_{31},\sqrt{r_{32}^2,r_{33}^2}\right)\\ \theta_3&={\rm atan2}(r_{21},r_{11}) \end{aligned} θ1θ2θ3=atan2(r32,r33)=atan2(r31,r322,r332 )=atan2(r21,r11)
对于其他欧拉角也是类似的。

固定轴

E ⃗ \vec{\mathcal{E}} E 是固定参考坐标系, 0 E ⃗ {}^{0}\vec{\mathcal{E}} 0E 是原始坐标系,经过三次绕固定轴的旋转变为变换后的坐标系 3 E ⃗ {}^{3}\vec{\mathcal{E}} 3E

  1. 沿着固定参考坐标系的主轴1旋转 θ 1 \theta_1 θ1度(滚转角)
  2. 沿着固定参考坐标系的主轴2旋转 θ 2 \theta_2 θ2度(俯仰角)
  3. 沿着固定参考坐标系的主轴3旋转 θ 3 \theta_3 θ3度(偏航角)

假设原始坐标系相对与固定参考坐标系的旋转是
[ 0 e ⃗ 1 0 e ⃗ 2 0 e ⃗ 3 ] = 0 E ⃗ = E ⃗ R 0 = [ e ⃗ 1 e ⃗ 2 e ⃗ 3 ] [ r 01 r 02 r 03 ] \begin{bmatrix}{}^{0}\vec{\boldsymbol{e}}_1 & {}^{0}\vec{\boldsymbol{e}}_2 & {}^{0}\vec{\boldsymbol{e}}_3\end{bmatrix}={}^{0}\vec{\mathcal{E}} =\vec{\mathcal{E}} \boldsymbol{R}_{0}= \begin{bmatrix}\vec{\boldsymbol{e}}_1 & \vec{\boldsymbol{e}}_2 & \vec{\boldsymbol{e}}_3\end{bmatrix}\begin{bmatrix}\boldsymbol{r}_{01}&\boldsymbol{r}_{02}&\boldsymbol{r}_{03}\end{bmatrix} [0e 10e 20e 3]=0E =E R0=[e 1e 2e 3][r01r02r03]
执行第一步: 0 E ⃗ {}^{0}\vec{\mathcal{E}} 0E 沿着固定参考坐标系的主轴1旋转,即对 0 E ⃗ {}^{0}\vec{\mathcal{E}} 0E 的每个基向量做相同的旋转
1 e ⃗ 1 = [ e ⃗ 1 e ⃗ 2 e ⃗ 3 ] R x r 01 1 e ⃗ 2 = [ e ⃗ 1 e ⃗ 2 e ⃗ 3 ] R x r 02 1 e ⃗ 3 = [ e ⃗ 1 e ⃗ 2 e ⃗ 3 ] R x r 03 \begin{aligned} {}^{1}\vec{\boldsymbol{e}}_1&=\begin{bmatrix}\vec{\boldsymbol{e}}_1 & \vec{\boldsymbol{e}}_2 & \vec{\boldsymbol{e}}_3\end{bmatrix}\boldsymbol{R}_x\boldsymbol{r}_{01} \\ {}^{1}\vec{\boldsymbol{e}}_2&=\begin{bmatrix}\vec{\boldsymbol{e}}_1 & \vec{\boldsymbol{e}}_2 & \vec{\boldsymbol{e}}_3\end{bmatrix}\boldsymbol{R}_x\boldsymbol{r}_{02} \\ {}^{1}\vec{\boldsymbol{e}}_3&=\begin{bmatrix}\vec{\boldsymbol{e}}_1 & \vec{\boldsymbol{e}}_2 & \vec{\boldsymbol{e}}_3\end{bmatrix}\boldsymbol{R}_x\boldsymbol{r}_{03} \end{aligned} 1e 11e 21e 3=[e 1e 2e 3]Rxr01=[e 1e 2e 3]Rxr02=[e 1e 2e 3]Rxr03
写成更紧凑的形式:
[ 1 e ⃗ 1 1 e ⃗ 2 1 e ⃗ 3 ] = 1 E ⃗ = E ⃗ R x R 0 = [ e ⃗ 1 e ⃗ 2 e ⃗ 3 ] R x [ r 01 r 02 r 03 ] \begin{bmatrix}{}^{1}\vec{\boldsymbol{e}}_1 & {}^{1}\vec{\boldsymbol{e}}_2 & {}^{1}\vec{\boldsymbol{e}}_3\end{bmatrix}={}^{1}\vec{\mathcal{E}} =\vec{\mathcal{E}} \boldsymbol{R}_{x}\boldsymbol{R}_{0} =\begin{bmatrix}\vec{\boldsymbol{e}}_1 & \vec{\boldsymbol{e}}_2 & \vec{\boldsymbol{e}}_3\end{bmatrix} \boldsymbol{R}_x \begin{bmatrix}\boldsymbol{r}_{01}&\boldsymbol{r}_{02}&\boldsymbol{r}_{03}\end{bmatrix} [1e 11e 21e 3]=1E =E RxR0=[e 1e 2e 3]Rx[r01r02r03]
之后沿主轴2和3的旋转同理可得
2 E ⃗ = E ⃗ R y ( R x R 0 ) 3 E ⃗ = E ⃗ R z ( R y R x R 0 ) \begin{aligned} {}^{2}\vec{\mathcal{E}} &=\vec{\mathcal{E}} \boldsymbol{R}_{y}\left(\boldsymbol{R}_{x}\boldsymbol{R}_{0}\right)\\ {}^{3}\vec{\mathcal{E}} &=\vec{\mathcal{E}} \boldsymbol{R}_{z}\left(\boldsymbol{R}_{y}\boldsymbol{R}_{x}\boldsymbol{R}_{0}\right) \end{aligned} 2E 3E =E Ry(RxR0)=E Rz(RyRxR0)
更简洁的列出递推过程:
0 E ⃗ = E ⃗ R 0 1 E ⃗ = E ⃗ R x R 0 2 E ⃗ = E ⃗ R y R x R 0 3 E ⃗ = E ⃗ R z R y R x R 0 \begin{aligned} {}^{0}\vec{\mathcal{E}}&=\vec{\mathcal{E}} \boldsymbol{R}_{0}\\ {}^{1}\vec{\mathcal{E}}&=\vec{\mathcal{E}} \boldsymbol{R}_{x}\boldsymbol{R}_{0}\\ {}^{2}\vec{\mathcal{E}}&=\vec{\mathcal{E}} \boldsymbol{R}_{y}\boldsymbol{R}_{x}\boldsymbol{R}_{0}\\ {}^{3}\vec{\mathcal{E}}&=\vec{\mathcal{E}} \boldsymbol{R}_{z}\boldsymbol{R}_{y}\boldsymbol{R}_{x}\boldsymbol{R}_{0} \end{aligned} 0E 1E 2E 3E =E R0=E RxR0=E RyRxR0=E RzRyRxR0
因为向量在空间中本身没有改变
0 E ⃗ a 0 = 3 E ⃗ a 3 E ⃗ R 0 a 0 = E ⃗ R z R y R x R 0 a 3 R 0 a 0 = R z R y R x R 0 a 3 \begin{aligned} {}^{0}\vec{\mathcal{E}}\boldsymbol{a}_{0}&= {}^{3}\vec{\mathcal{E}}\boldsymbol{a}_{3}\\ \vec{\mathcal{E}} \boldsymbol{R}_{0}\boldsymbol{a}_{0}&=\vec{\mathcal{E}} \boldsymbol{R}_{z}\boldsymbol{R}_{y}\boldsymbol{R}_{x}\boldsymbol{R}_{0}\boldsymbol{a}_{3}\\ \boldsymbol{R}_{0}\boldsymbol{a}_{0}&=\boldsymbol{R}_{z}\boldsymbol{R}_{y}\boldsymbol{R}_{x}\boldsymbol{R}_{0}\boldsymbol{a}_{3} \end{aligned} 0E a0E R0a0R0a0=3E a3=E RzRyRxR0a3=RzRyRxR0a3
如果固定坐标系就是原始坐标系,即 R 0 = I \boldsymbol{R}_0=\bf{I} R0=I a 0 = R z R y R x a 3 \boldsymbol{a}_{0}=\boldsymbol{R}_{z}\boldsymbol{R}_{y}\boldsymbol{R}_{x}\boldsymbol{a}_{3} a0=RzRyRxa3

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Shilong Wang

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值