ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

姿态矩阵推导简记

2022-01-09 22:03:30  阅读:196  来源: 互联网

标签:欧拉角 推导 矩阵 旋转 简记 三维空间 方向 theta 坐标系


(大部分属于个人理解)

  1. 欧拉角法

首先明确的是三个欧拉角,对于任意右手三维空间笛卡尔坐标系定义:

  • 绕 轴 正方向 旋转,为 航向/摇头角 \psi /psi
  • 绕 轴 正方向 旋转,为 俯仰/点头角 \theta /theta
  • 轴 正方向 旋转,为 横滚/侧滚角 \phi /phi

并且,必须按上述顺序进行旋转!

对于一个二维平面,一个点在旋转前后坐标系下的投影变换推导如下:

 \begin{cases} x_0=rcos\alpha\\ y_0=rsin\alpha \end{cases}   

\begin{cases} x_1=rcos(\alpha-\theta)=r(cos\alpha cos\theta + sin\alpha sin\theta) =x_0cos\theta + y_0sin\theta\\ y_1=rsin(\alpha - \theta) = r (sin\alpha cos\theta - cos\alpha sin\theta) =-x_0sin\theta+y_0cos\theta \end{}

写成矩阵形式有

\begin{bmatrix} x_1\\ y_1 \end{bmatrix} = \begin{bmatrix} cos\theta&sin\theta \\ -sin\theta& cos\theta \end{bmatrix} \begin{bmatrix} x_0\\ y_0 \end{bmatrix}

 

接下来推广到三维空间坐标系旋转中有,

 \begin{bmatrix} x_1\\ y_1\\ z_1 \end{bmatrix} =\begin{bmatrix} cos\psi & sin\psi & 0 \\ -sin\psi & cos\psi & 0\\ 0&0 &1 \end{bmatrix} \begin{bmatrix} x_0\\ y_0\\ z_0 \end{bmatrix}

 

 \begin{bmatrix} x_2\\ y_2\\ z_2 \end{bmatrix} = \begin{bmatrix} cos\theta & 0 & -sin\theta\\ 0 & 1 & 0\\ sin\theta & 0 & cos\theta \end{bmatrix} \begin{bmatrix} x_1\\ y_1\\ z_1 \end{bmatrix}

 注意沿y轴正方向旋转时,\theta的方向

 \begin{bmatrix} x_3\\ y_3\\ z_3 \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0\\ 0 & cos\phi & sin\phi\\ 0& -sin\phi & cos\phi \end{bmatrix} \begin{bmatrix} x_2\\ y_2\\ z_2 \end{bmatrix}

 将上述三次旋转连起来有

\begin{bmatrix} x_3\\ y_3\\ z_3 \end{bmatrix} = \begin{bmatrix} 1 &0 &0 \\ 0& cos\phi &sin\phi \\ 0 &-sin\phi & cos\phi \end{bmatrix} \begin{bmatrix} cos\theta &0 &-sin\theta \\ 0 &1 &0 \\ sin\theta & 0 & cos\theta \end{bmatrix} \begin{bmatrix} cos\psi &sin\psi &0 \\ -sin\psi & cos\psi & 0\\ 0&0 &1 \end{bmatrix} \begin{bmatrix} x_0\\ y_0\\ z_0 \end{bmatrix}

 合并有

\begin{bmatrix} x_3\\ y_3\\ z_3 \end{bmatrix} = \begin{bmatrix} cos\theta &0 &-sin\theta \\ sin\phi sin\theta & cos\phi & sin\phi cos\theta\\ cos\phi sin\theta & -sin\phi & cos\phi cos\theta \end{bmatrix} \begin{bmatrix} cos\psi &sin\psi&0\\ -sin\psi &cos\psi&0\\ 0&0&1 \end{bmatrix} \begin{bmatrix} x_0\\ y_0\\ z_0 \end{bmatrix}

=\begin{bmatrix} 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{bmatrix} \begin{bmatrix} x_0\\ y_0\\ z_0 \end{bmatrix}

标签:欧拉角,推导,矩阵,旋转,简记,三维空间,方向,theta,坐标系
来源: https://blog.csdn.net/weixin_44835176/article/details/122397925

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有