旋转矩阵自身是带有约束的,作为优化变量时,会引入额外的约束,使优化变得困难,通过李群-李代数之间的转换,将位姿估计变为无约束的优化问题,简化求解方式。
(1)三维旋转矩阵构成了特殊正交群,三维变换矩阵构成了特殊欧式群。
(2)群是一种集合加上一种运算的代数结构。
(3)当集合 A A A 满足以下性质时,即称 ( A , ⋅ ) (A, \cdot) (A,⋅) 成群(记运算为 ⋅ \cdot ⋅):
封闭性
结合律
幺元
逆
显然旋转矩阵集合和变换矩阵集合与矩阵乘法都成群。
李群是具有连续(光滑)性质的群(相机是连续运动的,非离散的)。
对任意旋转矩阵 R \boldsymbol{R} R,满足
R R T = I (3-1) \boldsymbol{RR^T=I} \tag{3-1} RRT=I(3-1)
矩阵 R \boldsymbol{R} R 随时间变化,是时间 t t t 的函数,因此
R ( t ) R ( t ) T = I \boldsymbol{R}(t)\boldsymbol{R}(t)^T=\boldsymbol{I} R(t)R(t)T=I
两侧对时间求导(复合函数求导)
R ˙ ( t ) R ( t ) T + R ( t ) R ˙ ( t ) T = 0 \dot{\boldsymbol{R}}(t)\boldsymbol{R}(t)^T+\boldsymbol{R}(t)\dot{\boldsymbol{R}}(t)^T=0 R˙(t)R(t)T+R(t)R˙(t)T=0
移项,得
R ˙ ( t ) R ( t ) T = − ( R ˙ ( t ) R ( t ) T ) T (3-2) \dot{\boldsymbol{R}}(t)\boldsymbol{R}(t)^T=-(\dot{\boldsymbol{R}}(t)\boldsymbol{R}(t)^T)^T \tag{3-2} R˙(t)R(t)T=−(R˙(t)R(t)T)T(3-2)
这是一个反对称矩阵(满足 A T = − A \boldsymbol{A^T=-A} AT=−A)。
在此之前,我们约定反对称符号:
a ∧ = A = [ 0 − a 3 a 2 a 3 0 − a 1 − a 2 a 1 0 ] , A ∨ = a \boldsymbol{a}^{\wedge}=\boldsymbol{A}=\left[\begin{array}{ccc} 0 & -a_{3} & a_{2} \\ a_{3} & 0 & -a_{1} \\ -a_{2} & a_{1} & 0 \end{array}\right],A^{\vee}=\boldsymbol{a} a∧=A= 0a3−a2−a30a1a2−a10 ,A∨=a
那么存在 ϕ ( t ) ∧ \phi(t)^{\wedge} ϕ(t)∧,使得
ϕ ( t ) ∧ = R ˙ ( t ) R ( t ) T \phi(t)^{\wedge}=\dot{\boldsymbol{R}}(t)\boldsymbol{R}(t)^T ϕ(t)∧=R˙(t)R(t)T
两端同时右乘 R ( t ) \boldsymbol{R}(t) R(t),得
ϕ ( t ) ∧ R ( t ) = R ˙ ( t ) (3-3) \phi(t)^{\wedge}\boldsymbol{R}(t)=\dot{\boldsymbol{R}}(t) \tag{3-3} ϕ(t)∧R(t)=R˙(t)(3-3)
可以看成,对 R ( t ) \boldsymbol{R}(t) R(t) 求导,相当于左乘 ϕ ( t ) ∧ \phi(t)^{\wedge} ϕ(t)∧。
当 t 0 = 0 t_0=0 t0=0 时,假设此时旋转矩阵 R ( t 0 ) = I \boldsymbol{R}(t_0)=\boldsymbol{I} R(t0)=I,在此处泰勒展开,即
R ( t ) = R ( t 0 ) + R ˙ ( t 0 ) ( t − t 0 ) + . . . ≈ I + ϕ ( t ) ∧ R ( t ) \boldsymbol{R}(t)=\boldsymbol{R}(t_0)+\dot{\boldsymbol{R}}(t_0)(t-t_0)+... \approx \boldsymbol{I}+\phi(t)^{\wedge}\boldsymbol{R}(t) R(t)=R(t0)+R˙(t0)(t−t0)+...≈I+ϕ(t)∧R(t)
假设在 t 0 t_0 t0 附近, ϕ \phi ϕ 不变,则有微分方程
R ˙ ( t ) = ϕ ( t 0 ) ∧ R ( t ) = ϕ 0 ∧ R ( t ) \dot{\boldsymbol{R}}(t)=\phi(t_0)^{\wedge}\boldsymbol{R}(t)=\phi^{\wedge}_0 \boldsymbol{R}(t) R˙(t)=ϕ(t0)∧R(t)=ϕ0∧R(t)
且初值 R ( 0 ) = I \boldsymbol{R}(0)=\boldsymbol{I} R(0)=I 解之得
R ( t ) = e ϕ 0 ∧ t (3-4) \boldsymbol{R}(t)=e^{\phi^{\wedge}_0t} \tag{3-4} R(t)=eϕ0∧t(3-4)
(1)每个李群都有与之对应的李代数。李代数描述了李群单位元附近的正切空间性质。
(2)李代数由一个集合 V \mathbb{V} V,一个数域 F \mathbb{F} F,和一个二元运算 [ , ] (称为李括号)组成。满足以下性质:
封闭性
双线性
自反性
雅克比等价
例如,三维向量 R 3 \mathbb{R}^3 R3 上定义的叉乘 × \times × 是一种李括号,因此 g = ( R 3 , R 3 , × ) \mathfrak{g}=(\mathbb{R}^3, \mathbb{R}^3, \times) g=(R3,R3,×) 构成了李代数。
SO(3) 对应的李代数是定义在 R 3 \mathbb{R}^3 R3 上的向量,记
Φ = ϕ ∧ = [ 0 − ϕ 3 ϕ 2 ϕ 3 0 − ϕ 1 − ϕ 2 ϕ 1 0 ] (3-5) \boldsymbol{\Phi}=\phi^{\wedge}=\left[\begin{array}{ccc} 0 & -\phi_{3} & \phi_{2} \\ \phi_{3} & 0 & -\phi_{1} \\ -\phi_{2} & \phi_{1} & 0 \end{array}\right] \tag{3-5} Φ=ϕ∧= 0ϕ3−ϕ2−ϕ30ϕ1ϕ2−ϕ10 (3-5)
s o ( 3 ) \mathfrak{so}(3) so(3) 的元素是一个三维向量或三维反对称矩阵,即
s o ( 3 ) = { ϕ ∈ R 3 , Φ = ϕ ∧ ∈ R 3 × 3 } (3-6) \mathfrak{so}(3)=\left\{ \phi \in \mathbb{R}^{3},\boldsymbol{\Phi}=\phi^{\wedge}\in \mathbb{R}^{3\times3} \right\} \tag{3-6} so(3)={ϕ∈R3,Φ=ϕ∧∈R3×3}(3-6)
s o ( 3 ) \mathfrak{so}(3) so(3) 和 SO(3) 的关系由指数映射给定,即
R = exp ( ϕ ∧ ) (3-7) \boldsymbol{R}=\exp(\phi^{\wedge}) \tag{3-7} R=exp(ϕ∧)(3-7)
对于变换矩阵,亦有李代数 s e ( 3 ) \mathfrak{se}(3) se(3),即
s e ( 3 ) = { ξ = [ ρ ϕ ] ∈ R 6 , ρ ∈ R 3 , ϕ ∈ s o ( 3 ) , ξ ∧ = [ ϕ ∧ ρ 0 T 0 ] ∈ R 4 × 4 } (3-8) \mathfrak{se}(3)=\left\{\boldsymbol{\xi}=\left[\begin{array}{ll} \boldsymbol{\rho} \\ \boldsymbol{\phi} \end{array}\right] \in \mathbb{R}^{6} , \boldsymbol{\rho} \in \mathbb{R}^{3}, \phi \in \mathfrak{so}(3), \boldsymbol{\xi}^{\wedge}=\left[\begin{array}{ll} \phi^{\wedge} & \boldsymbol{\rho} \\ \mathbf{0}^{\mathrm{T}} & 0 \end{array}\right] \in \mathbb{R}^{4\times4} \right\} \tag{3-8} se(3)={ξ=[ρϕ]∈R6,ρ∈R3,ϕ∈so(3),ξ∧=[ϕ∧0Tρ0]∈R4×4}(3-8)
这里的 ∧ \wedge ∧ 不表示对称矩阵,仅表示从向量到矩阵的关系。
(1)将 s o ( 3 ) \mathfrak{so}(3) so(3) 中的三维向量映射到 SO(3) 中的旋转矩阵。
将式(3-7)泰勒展开
exp ( ϕ ∧ ) = ∑ n = 0 ∞ 1 n ! ( ϕ ∧ ) n (3-9) \exp(\phi^{\wedge})=\sum_{n=0}^{\infty} \frac{1}{n!}(\phi^{\wedge})^n \tag{3-9} exp(ϕ∧)=n=0∑∞n!1(ϕ∧)n(3-9)
显然,很难直接计算矩阵的无穷次幂,下面推导一种计算指数映射的简便方法。由于 ϕ \phi ϕ 是三维向量,定义它的模长和方向,分别记为 θ \theta θ 和 a \boldsymbol{a} a。则有 ϕ = θ a \phi=\theta\boldsymbol{a} ϕ=θa( θ \theta θ 为模长, a \boldsymbol{a} a 为单位方向向量)。
可推导出
a ∧ a ∧ = [ − a 2 2 − a 3 2 a 1 a 2 a 1 a 3 a 1 a 2 − a 1 2 − a 3 2 a 2 a 3 a 1 a 3 a 2 a 3 − a 1 2 − a 2 2 ] = a a T − I (3-10) \boldsymbol{a}^{\wedge}\boldsymbol{a}^{\wedge}=\left[\begin{array}{ccc} -a_2^2-a_3^2 & a_1a_2 & a_1a_3 \\ a_1a_2 & -a_1^2-a_3^2 & a_2a_3 \\ a_1a_3 & a_2a_3 & -a_1^2-a_2^2 \end{array}\right]=\boldsymbol{a}\boldsymbol{a}^T-\boldsymbol{I} \tag{3-10} a∧a∧= −a22−a32a1a2a1a3a1a2−a12−a32a2a3a1a3a2a3−a12−a22 =aaT−I(3-10)
以及
a ∧ a ∧ a ∧ = a ∧ ( a a T − I ) = − a ∧ (3-11) \boldsymbol{a}^{\wedge}\boldsymbol{a}^{\wedge}\boldsymbol{a}^{\wedge}=\boldsymbol{a}^{\wedge}(\boldsymbol{a}\boldsymbol{a}^T-\boldsymbol{I})=-\boldsymbol{a}^{\wedge} \tag{3-11} a∧a∧a∧=a∧(aaT−I)=−a∧(3-11)
那么,式(3-9)可推导为
R = exp ( ϕ ∧ ) = exp ( θ a ∧ ) = ∑ n = 0 ∞ 1 n ! ( θ a ∧ ) n = . . . = cos θ I + ( 1 − cos θ ) a a T + sin θ a ∧ (3-12) \begin{aligned} \boldsymbol{R}=\exp(\phi^{\wedge})=&\exp(\theta\boldsymbol{a}^{\wedge})=\sum_{n=0}^{\infty} \frac{1}{n!}(\theta\boldsymbol{a}^{\wedge})^n \\ =&... \\ =& \cos\theta\boldsymbol{I}+(1-\cos\theta)\boldsymbol{a}\boldsymbol{a}^T+\sin\theta\boldsymbol{a}^{\wedge} \end{aligned} \tag{3-12} R=exp(ϕ∧)===exp(θa∧)=n=0∑∞n!1(θa∧)n...cosθI+(1−cosθ)aaT+sinθa∧(3-12)
很容易看出,它和罗德里格斯公式很相似。实际上, s o ( 3 ) \mathfrak{so}(3) so(3) 就是旋转向量组成的空间,而指数映射即罗德里格斯公式。
(2)相反地,定义对数映射,将旋转矩阵 SO(3) 映射到 s o ( 3 ) \mathfrak{so}(3) so(3) 中。
ϕ = ln ( R ) ∨ = ( ∑ n = 0 ∞ ( − 1 ) n n + 1 ( R − I ) n + 1 ) ∨ (3-13) \phi=\ln(\boldsymbol{R})^{\vee}=(\sum_{n=0}^{\infty} \frac{(-1)^n}{n+1}(\boldsymbol{R}-\boldsymbol{I})^{n+1})^{\vee} \tag{3-13} ϕ=ln(R)∨=(n=0∑∞n+1(−1)n(R−I)n+1)∨(3-13)
但实际上,不需要这么麻烦。在旋转向量部分,我们已经得到了矩阵到向量的转换关系,即
θ = arccos ( t r ( R ) − 1 2 ) R n = n (3-14) \theta=\arccos(\frac{tr(\boldsymbol{R})-1}{2}) \\ \boldsymbol{Rn=n} \tag{3-14} θ=arccos(2tr(R)−1)Rn=n(3-14)
(1)将 s e ( 3 ) \mathfrak{se}(3) se(3) 中的向量映射到 SE(3) 中的变换矩阵。
exp ( ξ ∧ ) = [ ∑ n = 0 ∞ 1 n ! ( ϕ ∧ ) n ∑ n = 0 ∞ 1 ( n + 1 ) ! ( ϕ ∧ ) n ρ 0 T 1 ] = △ [ R J ρ 0 T 1 ] = [ R t 0 T 1 ] = T (3-15) \begin{aligned} \exp(\xi^{\wedge})=&\left[\begin{array}{cc} \sum_{n=0}^{\infty} \frac{1}{n!}(\phi^{\wedge})^n & \sum_{n=0}^{\infty} \frac{1}{(n+1)!}(\phi^{\wedge})^n\boldsymbol{\rho} \\ \boldsymbol{0}^T & 1 \end{array}\right] \\ \stackrel{\bigtriangleup}=&\left[\begin{array}{cc} \boldsymbol{R} & \boldsymbol{J\rho}\\ \boldsymbol{0}^T & 1 \end{array}\right]=\left[\begin{array}{cc} \boldsymbol{R} & \boldsymbol{t}\\ \boldsymbol{0}^T & 1 \end{array}\right]=\boldsymbol{T} \end{aligned} \tag{3-15} exp(ξ∧)==△[∑n=0∞n!1(ϕ∧)n0T∑n=0∞(n+1)!1(ϕ∧)nρ1][R0TJρ1]=[R0Tt1]=T(3-15)
其中, J \boldsymbol{J} J 为雅克比矩阵,
J = sin θ θ I + ( 1 − sin θ θ ) a a T + 1 − cos θ θ a ∧ (3-16) \boldsymbol{J}=\frac {\sin\theta}{\theta}\boldsymbol{I}+(1-\frac {\sin\theta}{\theta})\boldsymbol{aa^T}+\frac {1-\cos\theta}{\theta}\boldsymbol{a}^{\wedge} \tag{3-16} J=θsinθI+(1−θsinθ)aaT+θ1−cosθa∧(3-16)
(2)相反地,通过对数映射,将变换矩阵 SE(3) 映射到 s e ( 3 ) \mathfrak{se}(3) se(3) 中。
根据对应关系,旋转向量可由矩阵左上角 R \boldsymbol{R} R 计算得到,而平移向量 ρ \boldsymbol{\rho} ρ 可由 t = J ρ \boldsymbol{t=J\rho} t=Jρ 解出。
至此,我们得到了李群、李代数的相互转换关系。
(1)李代数中的加法不等价于李群中的乘法,即
exp ( ( ϕ 1 + ϕ 2 ) ∧ ) ≠ exp ( ϕ 1 ∧ ) exp ( ϕ 2 ∧ ) \exp((\phi_1+\phi_2)^{\wedge})\neq \exp(\phi_1^{\wedge})\exp(\phi_2^{\wedge}) exp((ϕ1+ϕ2)∧)=exp(ϕ1∧)exp(ϕ2∧)
也即
ln ( exp ( ϕ 1 ∧ ) exp ( ϕ 2 ∧ ) ) ≠ ( ϕ 1 + ϕ 2 ) ∧ \ln(\exp(\phi_1^{\wedge})\exp(\phi_2^{\wedge}))\neq (\phi_1+\phi_2)^{\wedge} ln(exp(ϕ1∧)exp(ϕ2∧))=(ϕ1+ϕ2)∧
(2)BCH 公式
ln ( exp ( A ) exp ( B ) ) = A + B + 1 2 [ A , B ] + 1 12 [ A , [ A , B ] ] − 1 12 [ B , [ A , B ] ] + . . . (3-17) \ln(\exp(\boldsymbol{A})\exp(\boldsymbol{B}))=\boldsymbol{A}+\boldsymbol{B}+\frac {1}{2}[\boldsymbol{A},\boldsymbol{B}]+\frac {1}{12}[\boldsymbol{A},[\boldsymbol{A},\boldsymbol{B}]]-\frac {1}{12}[\boldsymbol{B},[\boldsymbol{A},\boldsymbol{B}]]+... \tag{3-17} ln(exp(A)exp(B))=A+B+21[A,B]+121[A,[A,B]]−121[B,[A,B]]+...(3-17)
针对上式,当 ϕ 1 \phi_1 ϕ1 或 ϕ 2 \phi_2 ϕ2 为小量时,忽略二次以上的项,近似为:
ln ( exp ( ϕ 1 ∧ ) exp ( ϕ 2 ∧ ) ) ∨ ≈ { J l ( ϕ 2 ) − 1 ϕ 1 + ϕ 2 if ϕ 1 is small J r ( ϕ 1 ) − 1 ϕ 2 + ϕ 1 if ϕ 2 is small (3-18) \ln(\exp(\phi_1^{\wedge})\exp(\phi_2^{\wedge}))^{\vee} \approx \left\{ \begin{matrix} \boldsymbol{J}_l(\phi_2)^{-1} \phi_1+\phi_2 \text{ if $\phi_1$ is small } \\ \boldsymbol{J}_r(\phi_1)^{-1} \phi_2+\phi_1 \text{ if $\phi_2$ is small } \end{matrix} \right. \tag{3-18} ln(exp(ϕ1∧)exp(ϕ2∧))∨≈{Jl(ϕ2)−1ϕ1+ϕ2 if ϕ1 is small Jr(ϕ1)−1ϕ2+ϕ1 if ϕ2 is small (3-18)
其中
J l = J = sin θ θ I + ( 1 − sin θ θ ) a a T + 1 − cos θ θ a ∧ \boldsymbol{J}_l=\boldsymbol{J}=\frac {\sin\theta}{\theta}\boldsymbol{I}+(1-\frac {\sin\theta}{\theta})\boldsymbol{aa^T}+\frac {1-\cos\theta}{\theta}\boldsymbol{a}^{\wedge} \\ Jl=J=θsinθI+(1−θsinθ)aaT+θ1−cosθa∧
J l − 1 = θ 2 cot θ 2 I + ( 1 − θ 2 cot θ 2 ) a a T − θ 2 a ∧ (3-19) \boldsymbol{J}_l^{-1}=\frac {\theta}{2}\cot\frac {\theta}{2}\boldsymbol{I}+(1-\frac {\theta}{2}\cot\frac {\theta}{2})\boldsymbol{aa^T}-\frac{\theta}{2}\boldsymbol{a}^{\wedge} \tag{3-19} Jl−1=2θcot2θI+(1−2θcot2θ)aaT−2θa∧(3-19)
且
J r ( ϕ ) = J l ( − ϕ ) (3-20) \boldsymbol{J}_r(\phi)=\boldsymbol{J}_l(-\phi) \tag{3-20} Jr(ϕ)=Jl(−ϕ)(3-20)
(3)假设某个旋转矩阵 R \boldsymbol{R} R 对应李代数 ϕ \phi ϕ ,将其左乘一个微小旋转矩阵 Δ R \Delta \boldsymbol{R} ΔR,对应的李代数为 Δ ϕ \Delta \phi Δϕ,那么,根据式(3-18),有
Δ R R = exp ( Δ ϕ ∧ ) exp ( ϕ ∧ ) = exp ( ( J l − 1 ( ϕ ) Δ ϕ + ϕ ) ∧ ) (3-21) \Delta \boldsymbol{RR}=\exp(\Delta \phi^{\wedge})\exp(\phi^{\wedge})=\exp((\boldsymbol{J}_l^{-1}(\phi)\Delta \phi+\phi)^{\wedge}) \tag{3-21} ΔRR=exp(Δϕ∧)exp(ϕ∧)=exp((Jl−1(ϕ)Δϕ+ϕ)∧)(3-21)
反之,在李代数上进行微小量加法时,相当于在李群上左乘或右乘一个带左(右)雅克比的量,即
exp ( ( ϕ + Δ ϕ ) ∧ ) = exp ( ( J l Δ ϕ ) ∧ ) exp ( ϕ ∧ ) = exp ( ϕ ∧ ) exp ( ( J r Δ ϕ ) ∧ ) (3-22) \exp((\phi+\Delta \phi)^{\wedge})=\exp((\boldsymbol{J}_l\Delta \phi)^{\wedge})\exp(\phi^{\wedge})=\exp(\phi^{\wedge})\exp((\boldsymbol{J}_r\Delta \phi)^{\wedge}) \tag{3-22} exp((ϕ+Δϕ)∧)=exp((JlΔϕ)∧)exp(ϕ∧)=exp(ϕ∧)exp((JrΔϕ)∧)(3-22)
(4)同样的,对于 SE(3),也有
exp ( Δ ξ ∧ ) e x p ( ξ ∧ ) ≈ exp ( ( J l − 1 Δ ξ + ξ ) ∧ ) \exp(\Delta \boldsymbol{\xi}^{\wedge})exp(\xi^{\wedge})\approx \exp((\boldsymbol{\mathcal{J}}_l^{-1}\Delta \boldsymbol{\xi}+\boldsymbol{\xi})^{\wedge})\\ exp(Δξ∧)exp(ξ∧)≈exp((Jl−1Δξ+ξ)∧)
exp ( ξ ∧ ) e x p ( Δ ξ ∧ ) ≈ exp ( ( J r − 1 Δ ξ + ξ ) ∧ ) (3-23) \exp(\xi^{\wedge})exp(\Delta \boldsymbol{\xi}^{\wedge})\approx \exp((\boldsymbol{\mathcal{J}}_r^{-1}\Delta \boldsymbol{\xi}+\boldsymbol{\xi})^{\wedge}) \tag{3-23} exp(ξ∧)exp(Δξ∧)≈exp((Jr−1Δξ+ξ)∧)(3-23)
其中, J l \mathcal{J}_l Jl 是一个 6 × 6 6 \times6 6×6 的矩阵。
(1)假设我们对空间中某点 p \boldsymbol{p} p 进行了旋转,得到了 R p \boldsymbol{Rp} Rp。现在要计算旋转后的点的坐标相对于旋转矩阵的导数,将其非正式地记为
∂ R p ∂ R \frac{ \partial \boldsymbol{Rp}}{ \partial \boldsymbol{R}} ∂R∂Rp
由于SO(3) 没有加法,故无法按照导数的定义进行计算。假设旋转矩阵 R \boldsymbol{R} R 对应的李代数为 ϕ \phi ϕ,我们转而计算
∂ ( exp ( ϕ ∧ ) p ) ∂ ϕ \frac{ \partial (\exp(\phi^{\wedge})\boldsymbol{p})}{ \partial \phi} ∂ϕ∂(exp(ϕ∧)p)
按照导数定义,有
∂ ( R p ) ∂ ϕ = ∂ ( exp ( ϕ ∧ ) p ) ∂ ϕ = lim δ ϕ → 0 exp ( ( ϕ + δ ϕ ) ∧ ) p − exp ( ϕ ∧ ) p δ ϕ = lim δ ϕ → 0 exp ( ( J l δ ϕ ) ∧ ) exp ( ϕ ∧ ) p − exp ( ϕ ∧ ) p δ ϕ = lim δ ϕ → 0 ( I + ( J l δ ϕ ) ∧ ) exp ( ϕ ∧ ) p − exp ( ϕ ∧ ) p δ ϕ = lim δ ϕ → 0 ( J l δ ϕ ) ∧ exp ( ϕ ∧ ) p δ ϕ = lim δ ϕ → 0 − ( exp ( ϕ ∧ ) p ) ∧ J l δ ϕ δ ϕ = − ( R p ) ∧ J l (3-24) \begin{aligned} \frac{\partial(\boldsymbol{R} \boldsymbol{p})}{\partial \boldsymbol{\phi}}=\frac{\partial\left(\exp \left(\boldsymbol{\phi}^{\wedge}\right) \boldsymbol{p}\right)}{\partial \boldsymbol{\phi}} &=\lim _{\delta \boldsymbol{\phi} \rightarrow 0} \frac{\exp \left((\boldsymbol{\phi}+\delta \boldsymbol{\phi})^{\wedge}\right) \boldsymbol{p}-\exp \left(\boldsymbol{\phi}^{\wedge}\right) \boldsymbol{p}}{\delta \boldsymbol{\phi}} \\ &=\lim _{\delta \boldsymbol{\phi} \rightarrow 0} \frac{\exp \left(\left(\boldsymbol{J}_{l} \delta \boldsymbol{\phi}\right)^{\wedge}\right) \exp \left(\boldsymbol{\phi}^{\wedge}\right) \boldsymbol{p}-\exp \left(\boldsymbol{\phi}^{\wedge}\right) \boldsymbol{p}}{\delta \boldsymbol{\phi}} \\ &=\lim _{\delta \boldsymbol{\phi} \rightarrow 0} \frac{\left(\boldsymbol{I}+\left(\boldsymbol{J}_{l} \delta \boldsymbol{\phi}\right)^{\wedge}\right) \exp \left(\boldsymbol{\phi}^{\wedge}\right) \boldsymbol{p}-\exp \left(\boldsymbol{\phi}^{\wedge}\right) \boldsymbol{p}}{\delta \boldsymbol{\phi}} \\ &=\lim _{\delta \boldsymbol{\phi} \rightarrow \mathbf{0}} \frac{\left(\boldsymbol{J}_{l} \delta \boldsymbol{\phi}\right)^{\wedge} \exp \left(\boldsymbol{\phi}^{\wedge}\right) \boldsymbol{p}}{\delta \boldsymbol{\phi}} \\ &=\lim _{\delta \boldsymbol{\phi} \rightarrow \mathbf{0}} \frac{-\left(\exp \left(\boldsymbol{\phi}^{\wedge}\right) \boldsymbol{p}\right)^{\wedge} \boldsymbol{J}_{l} \delta \boldsymbol{\phi}}{\delta \boldsymbol{\phi}}=-(\boldsymbol{R} \boldsymbol{p})^{\wedge} \boldsymbol{J}_{l} \end{aligned} \tag{3-24} ∂ϕ∂(Rp)=∂ϕ∂(exp(ϕ∧)p)=δϕ→0limδϕexp((ϕ+δϕ)∧)p−exp(ϕ∧)p=δϕ→0limδϕexp((Jlδϕ)∧)exp(ϕ∧)p−exp(ϕ∧)p=δϕ→0limδϕ(I+(Jlδϕ)∧)exp(ϕ∧)p−exp(ϕ∧)p=δϕ→0limδϕ(Jlδϕ)∧exp(ϕ∧)p=δϕ→0limδϕ−(exp(ϕ∧)p)∧Jlδϕ=−(Rp)∧Jl(3-24)
第 2 行为 BCH 近似;第 3 行为泰勒展开去掉高阶项的结果;第 4 行和第 5 行将反对称符号看做叉积,交换后变号。
但 J l \boldsymbol{J}_{l} Jl 形式复杂,计算困难。
另一种求导方式是对 R \boldsymbol{R} R 进行一次扰动,看结果相对于扰动的变化率。假设微小扰动 Δ R \Delta \boldsymbol{R} ΔR 对应的李代数为 φ \varphi φ,对其求导,即
∂ ( R p ) ∂ φ = Δ R R p − R p ∂ φ = lim φ → 0 exp ( φ ∧ ) exp ( ϕ ∧ ) p − exp ( ϕ ∧ ) p φ = lim φ → 0 ( I + φ ∧ ) exp ( ϕ ∧ ) p − exp ( ϕ ∧ ) p φ = lim φ → 0 φ ∧ R p φ = lim φ → 0 − ( R p ) ∧ φ φ = − ( R p ) ∧ (3-25) \begin{aligned} \frac{\partial(\boldsymbol{R} \boldsymbol{p})}{\partial \boldsymbol{\varphi}} &=\frac {\Delta \boldsymbol{R}\boldsymbol{Rp}-\boldsymbol{Rp}} {\partial \boldsymbol{\varphi}}\\ &=\lim _{\boldsymbol{\varphi} \rightarrow 0} \frac{\exp \left(\boldsymbol{\varphi}^{\wedge}\right) \exp \left(\boldsymbol{\phi}^{\wedge}\right) \boldsymbol{p}-\exp \left(\boldsymbol{\phi}^{\wedge}\right) \boldsymbol{p}}{\boldsymbol{\varphi}} \\ &=\lim _{\boldsymbol{\varphi} \rightarrow 0} \frac{\left(\boldsymbol{I}+\boldsymbol{\varphi}^{\wedge}\right) \exp \left(\boldsymbol{\phi}^{\wedge}\right) \boldsymbol{p}-\exp \left(\boldsymbol{\phi}^{\wedge}\right) \boldsymbol{p}}{\boldsymbol{\varphi}} \\ &=\lim _{\boldsymbol{\varphi} \rightarrow 0} \frac{\boldsymbol{\varphi}^{\wedge} \boldsymbol{R} \boldsymbol{p}}{\boldsymbol{\varphi}}=\lim _{\boldsymbol{\varphi} \rightarrow 0} \frac{-(\boldsymbol{R} \boldsymbol{p})^{\wedge} \boldsymbol{\varphi}}{\boldsymbol{\varphi}}=-(\boldsymbol{R} \boldsymbol{p})^{\wedge} \end{aligned} \tag{3-25} ∂φ∂(Rp)=∂φΔRRp−Rp=φ→0limφexp(φ∧)exp(ϕ∧)p−exp(ϕ∧)p=φ→0limφ(I+φ∧)exp(ϕ∧)p−exp(ϕ∧)p=φ→0limφφ∧Rp=φ→0limφ−(Rp)∧φ=−(Rp)∧(3-25)
假设空间中某点 p \boldsymbol{p} p 经过一次变换 T \boldsymbol{T} T(对应的李代数为 ξ \boldsymbol{\xi} ξ),得到 T p \boldsymbol{Tp} Tp,对其左乘一个扰动 Δ T = exp ( δ ξ ∧ ) \Delta\boldsymbol{T}=\exp(\delta \boldsymbol{\xi}^{\wedge}) ΔT=exp(δξ∧),对应的李代数为 δ ξ = [ δ ρ , δ ϕ ] T \delta \boldsymbol{\xi}=[\delta \boldsymbol{\rho}, \delta \boldsymbol{\phi}]^T δξ=[δρ,δϕ]T,则
∂ ( T p ) ∂ δ ξ = lim δ ξ → 0 Δ T T p − T p δ ξ = lim δ ξ → 0 exp ( δ ξ ∧ ) exp ( ξ ∧ ) p − exp ( ξ ∧ ) p δ ξ = lim δ ξ → 0 ( I + δ ξ ∧ ) exp ( ξ ∧ ) p − exp ( ξ ∧ ) p δ ξ = lim δ ξ → 0 δ ξ ∧ exp ( ξ ∧ ) p δ ξ = lim δ ξ → 0 [ δ ϕ ∧ δ ρ 0 T 0 ] [ R p + t 1 ] δ ξ = lim δ ξ → 0 [ δ ϕ ∧ ( R p + t ) + δ ρ 0 T ] [ δ ρ , δ ϕ ] T = [ I − ( R p + t ) ∧ 0 T 0 T ] = def ( T p ) ⊙ (3-26) \begin{aligned} \frac{\partial(\boldsymbol{T} \boldsymbol{p})}{\partial \delta \boldsymbol{\xi}} &=\lim _{\boldsymbol{\delta \boldsymbol{\xi}} \rightarrow 0} \frac {\Delta \boldsymbol{T}\boldsymbol{Tp}-\boldsymbol{Tp}} { \delta \boldsymbol{\xi}}\\ &=\lim _{\boldsymbol{\delta \boldsymbol{\xi}} \rightarrow 0} \frac{\exp \left(\delta \boldsymbol{\xi}^{\wedge}\right) \exp \left(\boldsymbol{\xi}^{\wedge}\right) \boldsymbol{p}-\exp \left(\boldsymbol{\xi}^{\wedge}\right) \boldsymbol{p}}{\boldsymbol{\delta \boldsymbol{\xi}}} \\ &=\lim _{\delta \boldsymbol{\xi} \rightarrow \mathbf{0}} \frac{(\boldsymbol{I}+\delta \boldsymbol{\xi} \wedge) \exp \left(\boldsymbol{\xi}^{\wedge}\right) \boldsymbol{p}-\exp \left(\boldsymbol{\xi}^{\wedge}\right) \boldsymbol{p}}{\delta \boldsymbol{\xi}} \\ &=\lim _{\delta \boldsymbol{\xi} \rightarrow 0} \frac{\delta \boldsymbol{\xi}^{\wedge} \exp \left(\boldsymbol{\xi}^{\wedge}\right) \boldsymbol{p}}{\delta \boldsymbol{\xi}} \\ &=\lim _{\delta \boldsymbol{\xi} \rightarrow 0} \frac{\left[\begin{array}{cc} \delta \boldsymbol{\phi}^{\wedge} & \delta \boldsymbol{\rho} \\ \mathbf{0}^{\mathrm{T}} & 0 \end{array}\right]\left[\begin{array}{c} \boldsymbol{R} \boldsymbol{p}+\boldsymbol{t} \\ 1 \end{array}\right]}{\delta \boldsymbol{\xi}} \\ &=\lim _{\delta \boldsymbol{\xi} \rightarrow 0} \frac{\left[\begin{array}{c} \delta \boldsymbol{\phi}^{\wedge}(\boldsymbol{R} \boldsymbol{p}+\boldsymbol{t})+\delta \boldsymbol{\rho} \\ \mathbf{0}^{\mathrm{T}} \end{array}\right]}{[\delta \boldsymbol{\rho}, \delta \boldsymbol{\phi}]^{\mathrm{T}}}=\left[\begin{array}{cc} \boldsymbol{I} & -(\boldsymbol{R} \boldsymbol{p}+\boldsymbol{t})^{\wedge} \\ \mathbf{0}^{\mathrm{T}} & \mathbf{0}^{\mathrm{T}} \end{array}\right] \stackrel{\text { def }}{=}(\boldsymbol{T} \boldsymbol{p})^{\odot} \end{aligned} \tag{3-26} ∂δξ∂(Tp)=δξ→0limδξΔTTp−Tp=δξ→0limδξexp(δξ∧)exp(ξ∧)p−exp(ξ∧)p=δξ→0limδξ(I+δξ∧)exp(ξ∧)p−exp(ξ∧)p=δξ→0limδξδξ∧exp(ξ∧)p=δξ→0limδξ[δϕ∧0Tδρ0][Rp+t1]=δξ→0lim[δρ,δϕ]T[δϕ∧(Rp+t)+δρ0T]=[I0T−(Rp+t)∧0T]= def (Tp)⊙(3-26)
以上两种方法的区别在于,直接法是对旋转矩阵对应的李代数求导,即 ∂ ( R p ) ∂ ϕ \frac{\partial(\boldsymbol{R} \boldsymbol{p})}{\partial \boldsymbol{\phi}} ∂ϕ∂(Rp),而扰动模型是对扰动矩阵对应的李代数求导,即 ∂ ( T p ) ∂ δ ξ \frac{\partial(\boldsymbol{T} \boldsymbol{p})}{\partial \delta \boldsymbol{\xi}} ∂δξ∂(Tp)。
对于空间中某点 p \boldsymbol{p} p,经过相似变换,得
p ′ = [ s R t 0 T 1 ] p = s R p + t (3-27) \boldsymbol{p'}=\left[\begin{array}{ll} s\boldsymbol{R} & \boldsymbol{t} \\ \mathbf{0}^{\mathrm{T}} & 1 \end{array}\right] \boldsymbol{p} = s\boldsymbol{Rp}+\boldsymbol{t} \tag{3-27} p′=[sR0Tt1]p=sRp+t(3-27)
与 SO(3)、SE(3) 类似,相似变换也对矩阵乘法构成群,称为相似变换群 Sim(3):
S i m ( 3 ) = { S = [ s R t 0 T 1 ] ∈ R 4 × 4 } (3-28) \mathrm{Sim}(3)=\left\{\boldsymbol{S}=\left[\begin{array}{ll} s\boldsymbol{R} & \boldsymbol{t} \\ \mathbf{0}^{\mathrm{T}} & 1 \end{array}\right] \in \mathbb{R}^{4 \times 4} \right\} \tag{3-28} Sim(3)={S=[sR0Tt1]∈R4×4}(3-28)
对应的李代数为 s i m ( 3 ) \mathfrak{sim}(3) sim(3),其前六维与 s e ( 3 ) \mathfrak{se}(3) se(3) 相同,最后多了一项 σ \sigma σ,即
s i m ( 3 ) = { ζ = [ ρ ϕ σ ] ∈ R 7 , ζ ∧ = [ σ I + ϕ ∧ ρ 0 T 0 ] ∈ R 4 × 4 } (3-29) \mathfrak{sim}(3)=\left\{\boldsymbol{\zeta}=\left[\begin{array}{ll} \boldsymbol{\rho} \\ \boldsymbol{\phi} \\ \sigma \end{array}\right] \in \mathbb{R}^{7} , \boldsymbol{\zeta}^{\wedge}=\left[\begin{array}{ll} \sigma\boldsymbol{I}+\phi^{\wedge} & \boldsymbol{\rho} \\ \mathbf{0}^{\mathrm{T}} & 0 \end{array}\right] \in \mathbb{R}^{4\times4} \right\} \tag{3-29} sim(3)=⎩ ⎨ ⎧ζ= ρϕσ ∈R7,ζ∧=[σI+ϕ∧0Tρ0]∈R4×4⎭ ⎬ ⎫(3-29)
指数映射为
exp ( ζ ∧ ) = [ e σ exp ( ϕ ∧ ) J s ρ 0 T 1 ] (3-30) \exp(\zeta^{\wedge})=\left[\begin{array}{cc} e^{\sigma}\exp({\phi^{\wedge}}) & \boldsymbol{J}_s\boldsymbol{\rho}\\ \boldsymbol{0}^T & 1 \end{array}\right] \tag{3-30} exp(ζ∧)=[eσexp(ϕ∧)0TJsρ1](3-30)
它和李群的对应的关系为
s = e σ , R = exp ( ϕ ∧ ) , t = J s ρ s=e^{\sigma}, \boldsymbol{R}=\exp({\phi^{\wedge}}), \boldsymbol{t}=\boldsymbol{J}_s\boldsymbol{\rho} s=eσ,R=exp(ϕ∧),t=Jsρ
其中 J s \boldsymbol{J}_s Js 为
J s = e σ − 1 σ I + σ e σ sin θ + ( 1 − e σ cos θ ) θ σ 2 + θ 2 a ∧ + ( e σ − 1 σ − ( e σ cos θ − 1 ) σ + ( e σ sin θ ) θ σ 2 + θ 2 ) a ∧ a ∧ (3-31) \begin{aligned} \boldsymbol{J}_{s}=& \frac{\mathrm{e}^{\sigma}-1}{\sigma} \boldsymbol{I}+\frac{\sigma \mathrm{e}^{\sigma} \sin \theta+\left(1-\mathrm{e}^{\sigma} \cos \theta\right) \theta}{\sigma^{2}+\theta^{2}} \boldsymbol{a}^{\wedge} \\ &+\left(\frac{\mathrm{e}^{\sigma}-1}{\sigma}-\frac{\left(\mathrm{e}^{\sigma} \cos \theta-1\right) \sigma+\left(\mathrm{e}^{\sigma} \sin \theta\right) \theta}{\sigma^{2}+\theta^{2}}\right) \boldsymbol{a}^{\wedge} \boldsymbol{a}^{\wedge} \end{aligned} \tag{3-31} Js=σeσ−1I+σ2+θ2σeσsinθ+(1−eσcosθ)θa∧+(σeσ−1−σ2+θ2(eσcosθ−1)σ+(eσsinθ)θ)a∧a∧(3-31)
类似地,给予 S p \boldsymbol{Sp} Sp 左侧一个扰动量 Δ S \Delta \boldsymbol{S} ΔS(对应的李代数为 ζ \boldsymbol{\zeta} ζ),并求它对该扰动量的导数,即
∂ S p ∂ ζ = [ I − q ∧ q 0 T 0 T 0 ] (3-32) \frac{\partial \boldsymbol{S} \boldsymbol{p}}{\partial \boldsymbol{\zeta}}=\left[\begin{array}{ccc} \boldsymbol{I} & -\boldsymbol{q}^{\wedge} & \boldsymbol{q} \\ \mathbf{0}^{\mathrm{T}} & \mathbf{0}^{\mathrm{T}} & 0 \end{array}\right] \tag{3-32} ∂ζ∂Sp=[I0T−q∧0Tq0](3-32)
需要注意的是, S p \boldsymbol{Sp} Sp 是四维的齐次坐标, ζ \boldsymbol{\zeta} ζ 是七维向量,所以该导数是 4 × 7 4\times7 4×7 维向量,这里记 S p \boldsymbol{Sp} Sp 前三维组成的向量为 q \boldsymbol{q} q。