当前位置:网站首页>Rodrigues: vector representation of rotation matrices
Rodrigues: vector representation of rotation matrices
2022-07-30 07:50:00 【sunset stained ramp】
目的:最近看论文,遇到Rodrigues公式,There has never been any derivation.So deduce it yourself.
在理解Rodrigues公式,Before you need to understand how the rotation vector is expressed.
The vector representation of the rotation matrix is derived based on Euler's theorem,它有三个参数.And it can be converted to a rotation matrix.This way of converting to a rotation matrix is calledRodrigues公式.
Rotation Vectors
in common cognition,旋转矩阵是 3 × 3 3\times3 3×3的矩阵.Such matrices have numerous constraints,The specific constraints can be found in the information(Fill up later).It has only three degrees of freedom.Just know those three parameters,剩下的6parameters can be calculated,It's easy to express.in general optimization,使用 Rotation matrix不方便,Calculation of matrices is complex and time-consuming.
定义的来源:
in geometric rotation,Any rotation can be expressed as a rotation around an axis by a certain angle.So the expression can be expressed as :A rotated vector u → \overrightarrow{u} u,and its rotation angle θ \theta θ.因此它可以用4个参数来决定.
假设向量 r → \overrightarrow{r} ris the principal axis vector,It's rotated from vector from vector p → \overrightarrow{p} p,旋转角度为 θ \theta θ.如下图:
因为 o → \overrightarrow{o} o为原点.简化表达 o p → = p → \overrightarrow{op}=\overrightarrow{p} op=p,Others use similar expressions.
从图上可以看到,向量 p → \overrightarrow{p} p绕着轴 u → \overrightarrow{u} u旋转的时候,Only and perpendicular to the vector u → \overrightarrow{u} u有关.So follow the vector u → \overrightarrow{u} u把它拆分为 a → \overrightarrow{a} a, b → \overrightarrow{b} b,They are respectively plane to the vector u → \overrightarrow{u} uand perpendicular to the vector u → \overrightarrow{u} u.Two vectors are split,Two vectors need to be calculated.假设 u → \overrightarrow{u} u和 p → \overrightarrow{p} p的夹角为 σ \sigma σ,因此可以得到
c o s σ = u → ⋅ p → ∣ u → ∣ ∣ p → ∣ ( 1 ) cos\sigma=\cfrac{\overrightarrow{u} \cdot \overrightarrow{p}}{|\overrightarrow{u}||\overrightarrow{p}|} \space \space\space\space (1) cosσ=∣u∣∣p∣u⋅p (1)
因为 u → \overrightarrow{u} u为单位向量.因此可以得到
a → = u → ∣ p → ∣ c o s σ = u → ⋅ p → ∣ u → ∣ ∣ p → ∣ ∣ p → ∣ u → = ( u → ⋅ p → ) u → = u → ( u → ⋅ p → ) ( 2 ) \overrightarrow{a}=\overrightarrow{u}|\overrightarrow{p}|cos\sigma=\cfrac{\overrightarrow{u} \cdot \overrightarrow{p}}{|\overrightarrow{u}||\overrightarrow{p}|}|\overrightarrow{p}|\overrightarrow{u}=(\overrightarrow{u} \cdot \overrightarrow{p})\overrightarrow{u} =\overrightarrow{u}(\overrightarrow{u} \cdot \overrightarrow{p}) \space \space\space\space(2) a=u∣p∣cosσ=∣u∣∣p∣u⋅p∣p∣u=(u⋅p)u=u(u⋅p) (2)
By unpacking and merging ( 2 ) (2) (2)Written in the form of a vector can be obtained:
a → = u → ( u → ⋅ p → ) = u → u → T p → ( 3 ) \overrightarrow{a}=\overrightarrow{u}(\overrightarrow{u} \cdot \overrightarrow{p})=\overrightarrow{u}\overrightarrow{u}^T\overrightarrow{p} \space \space\space\space(3) a=u(u⋅p)=uuTp (3)
for perpendicular to the vector u → \overrightarrow{u} u的分量 b → \overrightarrow{b} b
b → = p → − a → = ( 1 − u → u → T ) p → ( 4 ) \overrightarrow{b}=\overrightarrow{p}-\overrightarrow{a}=(1-\overrightarrow{u}\overrightarrow{u}^T)\overrightarrow{p} \space \space\space\space(4) b=p−a=(1−uuT)p (4)
Because from the vector b → \overrightarrow{b} b旋转到向量 b ′ → \overrightarrow{b'} b′,Another vector is required c → \overrightarrow{c} c,It is perpendicular to the vector u → \overrightarrow{u} u和向量 p → \overrightarrow{p} p所在的平面,and its length and vector b → \overrightarrow{b} b一样.
满足: ∣ b → ∣ = ∣ c → ∣ |\overrightarrow{b}|=|\overrightarrow{c}| ∣b∣=∣c∣
Obtained by the triangle line vertical formula:
∣ b → ∣ = ∣ u → ∣ ∣ p → ∣ s i n σ ( 5 ) |\overrightarrow{b}|=|\overrightarrow{u}||\overrightarrow{p}|sin\sigma \space \space\space\space(5) ∣b∣=∣u∣∣p∣sinσ (5)
通过叉乘,Vector can be designed c → \overrightarrow{c} c:
c → = u → × p → = ( ∣ u → ∣ ∣ p → ∣ s i n σ ) c → ∣ c → ∣ = ( ∣ u → ∣ ∣ p → ∣ s i n σ ) n → ( 6 ) \overrightarrow{c} = \overrightarrow{u} \times \overrightarrow{p} =(|\overrightarrow{u}|| \overrightarrow{p}|sin\sigma) \cfrac{\overrightarrow{c}}{|\overrightarrow{c}|} = (|\overrightarrow{u}|| \overrightarrow{p}|sin\sigma)\overrightarrow{n} \space \space\space\space(6) c=u×p=(∣u∣∣p∣sinσ)∣c∣c=(∣u∣∣p∣sinσ)n (6)
其中 n → = c → ∣ c → ∣ \overrightarrow{n}=\cfrac{\overrightarrow{c}}{|\overrightarrow{c}|} n=∣c∣c单位向量.因此 ∣ c → ∣ = ∣ u → ∣ ∣ p → ∣ s i n σ |\overrightarrow{c}| =|\overrightarrow{u}||\overrightarrow{p}|sin\sigma ∣c∣=∣u∣∣p∣sinσ
by calculating their modulus,found that they were equal.
上面的公式 ( 6 ) (6) (6),将在下一篇blog介绍.Update their links later
因此可以得到 p → \overrightarrow{p} pThe resulting vector after rotation p ′ → \overrightarrow{p'} p′为:
b ′ → = b → c o s θ + c → s i n θ ( 7 ) \overrightarrow{b'}=\overrightarrow{b}cos\theta+\overrightarrow{c}sin\theta \space \space\space\space(7) b′=bcosθ+csinθ (7)
Then by vector addition
p ′ → = a → + b ′ → = a → + b → c o s θ + c → s i n θ = u → u → T p → + ( 1 − u → u → T ) p → c o s θ + ( u → × p → ) s i n θ = [ I c o s θ + ( 1 − c o s θ ) u → u → T + u → × s i n θ ] p → ( 8 ) \overrightarrow{p'}=\overrightarrow{a} + \overrightarrow{b'}= \overrightarrow{a} + \overrightarrow{b}cos\theta+\overrightarrow{c}sin\theta \\ = \overrightarrow{u}\overrightarrow{u}^T\overrightarrow{p}+(1-\overrightarrow{u}\overrightarrow{u}^T)\overrightarrow{p}cos\theta+(\overrightarrow{u} \times \overrightarrow{p})sin\theta \\ = [Icos\theta+(1-cos\theta)\overrightarrow{u}\overrightarrow{u}^T+\overrightarrow{u} \times sin\theta]\overrightarrow{p} \space \space\space\space(8) p′=a+b′=a+bcosθ+csinθ=uuTp+(1−uuT)pcosθ+(u×p)sinθ=[Icosθ+(1−cosθ)uuT+u×sinθ]p (8)
通过公式 ( 8 ) (8) (8)可以得到一个向量 p → \overrightarrow{p} paround the vector u → \overrightarrow{u} u得到旋转 θ \theta θ新的向量 p ′ → \overrightarrow{p'} p′的公式,其中 R = I c o s θ + ( 1 − c o s θ ) u → u → T + u → × s i n θ R=Icos\theta+(1-cos\theta)\overrightarrow{u}\overrightarrow{u}^T+\overrightarrow{u} \times sin\theta R=Icosθ+(1−cosθ)uuT+u×sinθ.它也是Rodrigues公式.
还有一种特殊情况,如果 u → = [ 0 , 0 , 0 ] T \overrightarrow{u}=[0,0,0]^T u=[0,0,0]T,The resulting rotation matrix is I I I
The above formula can also be reversed(因为它不太常用),后面再补上.
参考资料为:
Vector Representation of rotations的论文.
边栏推荐
- Selenium01
- Swagger使用方式,告别postman
- Multithreading basics (concept, create, interrupt)
- Redis6的数据类型
- matlab机器学习_01
- Install MySQL under Linux (centos7)
- 测试开发工程师成长日记008 - 浅谈一些Bug/用例管理平台/协作平台
- Test Development Engineer Growth Diary 001 - Some Introduction to Agile Testing, CI/CD/CT, DecOps
- 阿里一面:多线程顺序运行有多少种方法?
- STL源码剖析:class template explicit specialization代码测试和理解
猜你喜欢
随机推荐
测试开发工程师成长日记002 - 从0开始做接口自动化
numpy 多维数组ndarray的详解
测开基础知识01
Process and Scheduled Task Management
搭建vsftpd服务并实现本地用户访问
向量三重积的等式推导证明
(GGG)JWT
空间平面相交的直线的计算及其源码
Distance calculation from space vertex to straight line and its source code
计算矩阵的逆源码(使用伴随矩阵,3×3的矩阵)
STL源码剖析:迭代器的概念理解,以及代码测试。
Selenium01
MongoDB-介绍,数据类型,基本语句
GadgetInspector principle analysis
阿里一面:多线程顺序运行有多少种方法?
Devops基本概念和原理
Test the basics 02
Alamofire source code analysis - POST request
图解关系数据库设计思想,这也太形象了
B站崩了,如果是你是那晚负责的开发人员你会怎么做?