前言
最近阅读了高翔老师的视觉SLAM十四讲, 也算是了解了当下机器人领域最炙热的机器人领域前沿研究问题大概是怎么样的数学问题. 不得不说视频与书籍真的是深入浅出.
所有第三库无痛安装教程: 知乎链接
SLAM 主要解决的偏颇地说就是在求解一个非线性系统状态方程, 相应的后端, 回环检测等等技术则为了在某个方面比如长期环境下该方程的求解正确而提出.
因为本人与李群李代的关联更深, 因此本文主要记录从SLAM中学习到的李群李代知识. 最大的收获应该是BCH公式及其带来的相关泰勒展开公式.
Modern Robotics中关于部分关于李群李代数的内容
正文
机器人学中运动描述的两类群: 特殊正交群(SO(3)) 与 特殊欧氏群 (SE(3))
SO(3)={R∈R3×3∣RR⊤=I,det(R)=1}.SO(3) =\{ {\mathbf{R}\in \mathbb{R}^{3\times3} | \mathbf{R}\mathbf{R}^{\top}=\mathbf{I}, det({\mathbf{R}}) =1}\}. SO(3)={R∈R3×3∣RR⊤=I,det(R)=1}.
SE(3)={T=[Rt0⊤1]∈R4×4∣R∈SO(3),t∈R3}SE(3) = \{\mathbf{T} = \begin{bmatrix}\mathbf{R} && \mathbf{t} \\ \mathbf{0}^{\top} && 1\end{bmatrix} \in \mathbb{R}^{4\times 4}| \mathbf{R} \in SO(3), \mathbf{t}\in \mathbb{R}^3\} SE(3)={T=[R0⊤t1]∈R4×4∣R∈SO(3),t∈R3}
作为群而言, 很大的一个特征是加法不封闭: 即 R1+R2∉SO(3)\mathbf{R}_1 + \mathbf{R}_2 \notin SO(3)R1+R2∈/SO(3); 仅有乘法成立:
R1R2∈SO(3);T1T2∈SE(3)\mathbf{R}_1\mathbf{R}_2 \in SO(3); \mathbf{T}_1\mathbf{T}_2\in SE(3) R1R2∈SO(3);T1T2∈SE(3)
SLAM十四讲中写有: 对于这种只有一种运算的集合,称之为群.
群是一种集合加上一种运算的代数结构 G(A,⋅)G(A,\cdot)G(A,⋅), A为集合. 这一种运算需要满足:
- 封闭性: ∀a1,a2∈A,a1a2∈A\forall{a}_1,a_2\in A, a_1a_2\in A∀a1,a2∈A,a1a2∈A;
- 结合律: ∀a1,a2,a3∈A,(a1a2)a3=a1(a2a3)\forall{a}_1,a_2,a_3 \in A, (a_1a_2)a_3 = a_1(a_2a_3)∀a1,a2,a3∈A,(a1a2)a3=a1(a2a3)
- 单位元: ∃a0∈A,s.t.∀a∈A,a0⋅a=a⋅a0=a\exists a_0 \in A, s.t. \forall{a} \in A, a_0\cdot a= a\cdot a_0 = a∃a0∈A,s.t.∀a∈A,a0⋅a=a⋅a0=a
- 逆: ∀a∈A,∃a−1∈A,s.t.a⋅a−1=a0\forall{a}\in A, \exists a^{-1}\in A, s.t.\ a\cdot a^{-1}=a_0∀a∈A,∃a−1∈A,s.t. a⋅a−1=a0
一个对于群的补充例子: 一般线性群GL(n)GL(n)GL(n), 指n×nn\times nn×n的可逆矩阵, 对矩阵乘法成群.
李代数的引出:
KaTeX parse error: Expected '}', got 'EOF' at end of input: …p} \end{align}
即: R˙(t)R(t)⊤\dot{\mathbf{R}}(t)\mathbf{R}(t)^{\top}R˙(t)R(t)⊤是反对称矩阵.
a×b=∣ijka1a2a3b1b2b3∣=[a2b3−a3b2a3b1−a1b3a1b2−a2b1]=[0−a3a2a30−a1−a2a10]b=a∧b\mathbf{a}\times \mathbf{b}= \left | \begin{matrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \end{matrix} \right | = \begin{bmatrix} a_2b_3-a_3b_2\\ a_3b_1-a_1b_3\\ a_1b_2-a_2b_1 \end{bmatrix} = \begin{bmatrix} 0 & -a_3 & a_2\\ a_3 & 0 & -a_1\\ -a_2 & a_1 & 0 \end{bmatrix}\mathbf{b} = \mathbf{a}^{\wedge}\mathbf{b} a×b=ia1b1ja2b2ka3b3=a2b3−a3b2a3b1−a1b3a1b2−a2b1=0a3−a2−a30a1a2−a10b=a∧b
a∧\mathbf{a}^{\wedge}a∧是反对称矩阵. 即R˙(t)R(t)⊤\dot{\mathbf{R}}(t)\mathbf{R}(t)^{\top}R˙(t)R(t)⊤可以看作是某一个三维向量 ϕ(t)∈R3\boldsymbol{\phi}(t) \in \mathbb{R}^3ϕ(t)∈R3的展开.
R˙(t)R(t)⊤=ϕ(t)∧\dot{\mathbf{R}}(t)\mathbf{R}(t)^{\top} = \boldsymbol{\phi}(t)^{\wedge} R˙(t)R(t)⊤=ϕ(t)∧
由于R\mathbf{R}R为正交矩阵: R⊤=R−1\mathbf{R}^{\top}=\mathbf{R}^{-1}R⊤=R−1
R˙(t)=ϕ(t)∧R(t)=[0−ϕ3ϕ2ϕ30−ϕ1−ϕ2ϕ10]R(t)\dot{\mathbf{R}}(t) = \boldsymbol{\phi}(t)^{\wedge}\mathbf{R}(t) = \begin{bmatrix} 0 & -\phi_3 & \phi_2\\ \phi_3 & 0 & -\phi_1\\ -\phi_2 & \phi_1 & 0\\ \end{bmatrix} \mathbf{R}(t) R˙(t)=ϕ(t)∧R(t)=0ϕ3−ϕ2−ϕ30ϕ1ϕ2−ϕ10R(t)
上式的含义是: 每对旋转矩阵求一次导数, 只需左乘一个ϕ(t)\boldsymbol{\phi}(t)ϕ(t)矩阵即可, 设t0=0t_0=0t0=0, 并设此时旋转矩阵为R(t)=I\mathbf{R}(t)= \mathbf{I}R(t)=I. 我们可以把R(t)\mathbf{R}(t)R(t)在0附近进行一阶泰勒展开:
R(t)≈R(t0)+R˙(t0)(t−t0)=I+ϕ(t0)∧(t)\begin{align} \mathbf{R}(t) &\approx \mathbf{R}(t_0) +\dot{\mathbf{R}}(t_0)(t-t_0)\\ &= \mathbf{I} + \boldsymbol{\phi}(t_0)^{\wedge}(t) \end{align} R(t)≈R(t0)+R˙(t0)(t−t0)=I+ϕ(t0)∧(t)
ϕ\boldsymbol{\phi}ϕ 反映了 R\mathbf{R}R的导数性质, 故称它在SO(3)SO(3)SO(3)原点附近的正切空间. 在t0t_0t0附近, SLAM十四讲中设ϕ\boldsymbol{\phi}ϕ保持为常数ϕ(t0)=ϕ0\boldsymbol{\phi}(t_0)=\boldsymbol{\phi}_0ϕ(t0)=ϕ0. 而如果用流形的观点来看的话, 我认为应该是指切向基 (tangent base) 保持不变.
R˙(t)=ϕ(t0)∧R(t)=ϕ0∧R(t)\dot{\mathbf{R}}(t)=\boldsymbol{\phi}(t_0)^{\wedge}\mathbf{R}(t)={\boldsymbol{\phi}_0}^{\wedge} \mathbf{R}(t) R˙(t)=ϕ(t0)∧R(t)=ϕ0∧R(t)
利用矩阵微分方程有:
R(t)=exp(ϕ0∧t)\mathbf{R}(t) = \rm{exp}({\boldsymbol{\phi}_0}^{\wedge}t) R(t)=exp(ϕ0∧t)
(此即为指数映射)
李代数的定义: 李代数由一个集合V\mathbb{V}V, 一个数域F\mathbb{F}F和一个二元运算符[,]组成. 它们需要满足以下性质, 则称(V,F,[,]\mathbb{V}, \mathbb{F}, [,]V,F,[,])为一个李代数, 记为g\mathfrak{g}g.
- 封闭性: ∀X,Y∈V,[X,Y]∈V\forall X,Y \in \mathbb{V}, [X,Y] \in \mathbb{V}∀X,Y∈V,[X,Y]∈V;
- 双线性: ∀X,Y,Z∈V,a,b∈F\forall X,Y, Z \in \mathbb{V}, a,b \in \mathbb{F}∀X,Y,Z∈V,a,b∈F;
[aX+bY,Z]=a[X,Z]+b[Y,Z],[Z,aX+bY]=a[Z,X]+b[Z,Y];[aX+bY,Z] = a[X,Z] + b[Y,Z] , [Z, aX+bY] = a[Z,X] + b[Z,Y]; [aX+bY,Z]=a[X,Z]+b[Y,Z],[Z,aX+bY]=a[Z,X]+b[Z,Y]; - 自反性: ∀X∈V,[X,X]=0\forall X \in \mathbb{V}, [X,X] = 0∀X∈V,[X,X]=0;
- 雅可比等价: ∀X,Y,Z∈V,[X,[Y,Z]]+[Z,[X,Y]]+[Y,[Z,X]]=0\forall X, Y, Z \in \mathbb{V}, [X,[Y,Z]]+[Z,[X,Y]]+[Y,[Z,X]]=0∀X,Y,Z∈V,[X,[Y,Z]]+[Z,[X,Y]]+[Y,[Z,X]]=0.
此处的二元运算符为李括号 (Lie bracket).
李括号: [w1×w2]=[w1][w2]−[w2][w1][w_1\times w_2] = [w_1][w_2] - [w_2][w_1][w1×w2]=[w1][w2]−[w2][w1]
[V1][V2]−[V2][V1]=[[w1]v100][[w2]v200]−[[w2]v200][[w1]v100]=[[w1][w2]−[w2][w1][w1]v2−[w2]v100]=[[w′]v′00]\begin{align} [\mathcal{V}_1][\mathcal{V}_2] - [\mathcal{V}_2][\mathcal{V}_1] &= \begin{bmatrix}[w_1]& v_1\\ 0 & 0\end{bmatrix} \begin{bmatrix}[w_2] & v_2 \\ 0 & 0\end{bmatrix} - \begin{bmatrix}[w_2] &v_2 \\ 0 & 0\end{bmatrix}\begin{bmatrix}[w_1] & v_1 \\ 0 & 0\end{bmatrix}\\ &= \begin{bmatrix}[w_1][w_2]-[w_2][w_1] & [w_1]v_2-[w_2]v_1 \\ 0 & 0\end{bmatrix}\\ &= \begin{bmatrix} [w'] & v'\\ 0 & 0 \end{bmatrix} \end{align} [V1][V2]−[V2][V1]=[[w1]0v10][[w2]0v20]−[[w2]0v20][[w1]0v10]=[[w1][w2]−[w2][w1]0[w1]v2−[w2]v10]=[[w′]0v′0]
[w′v′]=[[w1]0[v1][w1]][w2v2]\begin{bmatrix} w' \\ v' \end{bmatrix} = \begin{bmatrix} [w_1] & 0 \\ [v_1] & [w_1] \end{bmatrix}\begin{bmatrix} w_2\\v_2 \end{bmatrix} [w′v′]=[[w1][v1]0[w1]][w2v2]
需要注意的是: 这里摘抄自 Modern Robotics , 这份教材里对于角速度与线速度的放置与移动机器人领域中的设定是相反的.
Lie bracket的定义: 给定两个twist V1=(w1,v1)\mathcal{V}_1 = (w_1,v_1)V1=(w1,v1) 以及 V2=(w2,v2)\mathcal{V}_2 = (w_2, v_2)V2=(w2,v2), V1\mathcal{V}_1V1以及V2\mathcal{V}_2V2的Lie bracket可以写作 [adV1]V2[\rm{ad}_{\mathcal{V}_1}]\mathcal{V}_2[adV1]V2 或者 adV1(V2)\rm{ad}_{\mathcal{V}_1}(\mathcal{V}_2)adV1(V2) 被定义为如下形式:
[[w1]0[v1][w1]][w2v2]=[adV1]V2=adV1(V2)∈R6\begin{bmatrix} [w_1] & 0 \\ [v_1] & [w_1]\\ \end{bmatrix}\begin{bmatrix} w_2\\ v_2 \end{bmatrix} = [\rm{ad}_{\mathcal{V}_1}]\mathcal{V}_2=\rm{ad}_{\mathcal{V}_1}(\mathcal{V}_2) \in \mathbb{R}^{6} [[w1][v1]0[w1]][w2v2]=[adV1]V2=adV1(V2)∈R6
李代数so(3)\mathfrak{so}(3)so(3)
Φ=ϕ∧=[0−ϕ3ϕ2ϕ30−ϕ1−ϕ2ϕ10]∈R3×3\boldsymbol{\mathcal{\Phi}} = \phi^{\wedge} = \begin{bmatrix} 0 & - \phi_3 & \phi_2\\ \phi_3 & 0 & -\phi_1\\ -\phi_2 & \phi_1 & 0 \end{bmatrix} \in \mathbb{R}^{3\times 3} Φ=ϕ∧=0ϕ3−ϕ2−ϕ30ϕ1ϕ2−ϕ10∈R3×3
两个向量ϕ1\phi_1ϕ1与ϕ2\phi_2ϕ2的李括号为:
[ϕ1,ϕ2]=(ϕ1ϕ2−ϕ2ϕ1)∨[\phi_1,\phi_2] = (\boldsymbol{\phi}_1\boldsymbol{\phi}_2-\boldsymbol{\phi}_2\boldsymbol{\phi}_1)^{\vee} [ϕ1,ϕ2]=(ϕ1ϕ2−ϕ2ϕ1)∨
so(3)={ϕ∈R3×3,ϕ=ϕ∧∈R3×3}\mathfrak{so}(3)=\{\boldsymbol{\phi}\in\mathbb{R}^{3\times3},\boldsymbol{\phi}=\phi^{\wedge}\in\mathbb{R}^{3\times3}\}so(3)={ϕ∈R3×3,ϕ=ϕ∧∈R3×3}
so(3)\mathfrak{so}(3)so(3)通过指数映射与SO(3)SO(3)SO(3)进行联系:
R=exp(ϕ∧).\mathbf{R} = \rm{exp}(\phi^{\wedge}). R=exp(ϕ∧).
李代数se(3)\mathfrak{se}(3)se(3)
se(3)={ξ=[ρϕ]∈R6,ρ∈R3,ϕ∈so(3),ξ∧=[ϕ∧ρ0⊤0]∈R4×4}\mathfrak{se}(3) = \{\xi=\begin{bmatrix}\rho \\ \boldsymbol{\phi} \end{bmatrix} \in \mathbb{R}^{6}, \rho\in \mathbb{R}^3, \boldsymbol{\phi}\in \mathfrak{so}(3), \xi^{\wedge} = \begin{bmatrix} \phi^{\wedge} & \rho \\ 0^{\top} & 0\end{bmatrix}\in \mathbb{R}^{4\times4} \} se(3)={ξ=[ρϕ]∈R6,ρ∈R3,ϕ∈so(3),ξ∧=[ϕ∧0⊤ρ0]∈R4×4}
se(3)\mathfrak{se}(3)se(3)的李括号:
[ξ1,ξ2]=(ξ1∧ξ2∧−ξ2∧ξ1∧)∨[\xi_1,\xi_2] = (\xi_1^{\wedge}\xi_2^{\wedge}-\xi_2^{\wedge}\xi_1^{\wedge})^{\vee} [ξ1,ξ2]=(ξ1∧ξ2∧−ξ2∧ξ1∧)∨
其验证过程可见上面从Modern Robotics中摘抄的部分, 只是角速度与线速度的位置上下需要颠倒.
指数与对数映射
任意矩阵的指数映射可以写成一个泰勒展开, 但是只有在收敛(矩阵中每个元素都收敛)的情况下才会有结果, 其结果仍是一个矩阵:
exp(A)=∑n=0∞1n!An\rm{exp}(A) = \sum^{\infin}_{n=0}\frac{1}{n!}A^{n} exp(A)=n=0∑∞n!1An
同样地,对so(3)\mathfrak{so}(3)so(3)中的任意元素ϕ\boldsymbol{\phi}ϕ, 我们也可按此方式定义它的指数映射
exp(ϕ∧)=∑n=0∞1n!(ϕ∧)n\rm{exp}(\boldsymbol{\phi}^{\wedge})=\sum^{\infin}_{n=0}\frac{1}{n!}(\boldsymbol{\phi}^{\wedge})^n exp(ϕ∧)=n=0∑∞n!1(ϕ∧)n
ϕ\boldsymbol{\phi}ϕ是一个三维向量,可以定义出它的长度θ\thetaθ 与方向向量 a\mathbf{a}a, ϕ=θa\boldsymbol{\phi}=\theta\mathbf{a}ϕ=θa.
a∧a∧=aa⊤−I\mathbf{a}^{\wedge}\mathbf{a}^{\wedge} = \mathbf{a}\mathbf{a}^{\top}-\mathbf{I} a∧a∧=aa⊤−I
a∧a∧a∧=−a∧\mathbf{a}^{\wedge}\mathbf{a}^{\wedge}\mathbf{a}^{\wedge} = -\mathbf{a}^{\wedge} a∧a∧a∧=−a∧
exp(ϕ∧)=exp(θa∧)=∑n=0∞1n!(θa∧)n=I+θa∧+12!θ2a∧a∧+13!θ3a∧a∧a∧+14!θ4(a∧)4+...=aa⊤−a∧a∧+θa∧+12!θ2a∧a∧−13!θ3a∧−14!θ4(a∧)4+...=aa⊤+(θ−13!θ3+15!θ5−...)a∧−(1−12!θ2+14!θ4−...)a∧a∧=a∧a∧+I+sinθa∧−cosθa∧a∧=(1−cosθ)a∧a∧+sinθa∧=cosθI+(1−cosθ)aa⊤+sinθa∧\begin{align} \rm{exp}(\phi^{\wedge})&= exp(\theta\mathbf{a}^{\wedge})= \sum^{\infin}_{n=0}\frac{1}{n!}(\theta\mathbf{a}^{\wedge})^{n}\\ &=I + \theta\mathbf{a}^{\wedge}+\frac{1}{2!}\theta^2\mathbf{a}^{\wedge}\mathbf{a}^{\wedge}+\frac{1}{3!}\theta^3\mathbf{a}^{\wedge}\mathbf{a}^{\wedge}\mathbf{a}^{\wedge}+\frac{1}{4!}\theta^4(\mathbf{a}^{\wedge})^4+...\\ &=\mathbf{a}\mathbf{a}^{\top}-\mathbf{a}^{\wedge}\mathbf{a}^{\wedge}+\theta\mathbf{a}^{\wedge}+\frac{1}{2!}\theta^2\mathbf{a}^{\wedge}\mathbf{a}^{\wedge}-\frac{1}{3!}\theta^3\mathbf{a}^{\wedge}-\frac{1}{4!}\theta^4(\mathbf{a}^{\wedge})^4+...\\ &=\mathbf{a}\mathbf{a}^{\top}+(\theta-\frac{1}{3!}\theta^3+\frac{1}{5!}\theta^5-...)\mathbf{a}^{\wedge}-(1-\frac{1}{2!}\theta^2+\frac{1}{4!}\theta^4-...)\mathbf{a}^{\wedge}\mathbf{a}^{\wedge}\\ &=\mathbf{a}^{\wedge}\mathbf{a}^{\wedge}+I+sin\theta\mathbf{a}^{\wedge}-cos\theta\mathbf{a}^{\wedge}\mathbf{a}^{\wedge}\\ &=(1-cos\theta)\mathbf{a}^{\wedge}\mathbf{a}^{\wedge}+sin\theta\mathbf{a}^{\wedge}\\ &=cos\theta I+(1-cos\theta)\mathbf{a}\mathbf{a}^{\top}+sin\theta\mathbf{a}^{\wedge} \end{align} exp(ϕ∧)=exp(θa∧)=n=0∑∞n!1(θa∧)n=I+θa∧+2!1θ2a∧a∧+3!1θ3a∧a∧a∧+4!1θ4(a∧)4+...=aa⊤−a∧a∧+θa∧+2!1θ2a∧a∧−3!1θ3a∧−4!1θ4(a∧)4+...=aa⊤+(θ−3!1θ3+5!1θ5−...)a∧−(1−2!1θ2+4!1θ4−...)a∧a∧=a∧a∧+I+sinθa∧−cosθa∧a∧=(1−cosθ)a∧a∧+sinθa∧=cosθI+(1−cosθ)aa⊤+sinθa∧
此即为罗德里格斯公式, 也称为指数映射
对数映射:
ϕ=ln(R)∨=(∑n=0∞−1nn+1(R−I)n+1)∨.\boldsymbol{\phi}=ln(R)^{\vee}=(\sum^{\infin}_{n=0}\frac{-1^{n}}{n+1}(R-I)^{n+1})^{\vee}. ϕ=ln(R)∨=(n=0∑∞n+1−1n(R−I)n+1)∨.
然而实际上, 更多的情况下是采用下面的方式进行转换
R=cosθI+(1−cosθ)aa⊤+sinθa∧R = cos\theta I+(1-cos\theta)\mathbf{a}\mathbf{a}^{\top}+sin\theta \mathbf{a}^{\wedge} R=cosθI+(1−cosθ)aa⊤+sinθa∧
tr(R)=cosθtr(I)+(1−cosθ)tr(aa⊤)+sinθtr(a∧)=3cosθ+(1−cosθ)=1+2cosθ\begin{align} tr(R) &= cos\theta\ tr(I)+ (1-cos\theta)tr(\mathbf{a}\mathbf{a}^{\top})+sin\theta\ tr(\mathbf{a}^{\wedge})\\ &=3cos\theta + (1-cos\theta)\\ &= 1+ 2cos\theta \end{align} tr(R)=cosθ tr(I)+(1−cosθ)tr(aa⊤)+sinθ tr(a∧)=3cosθ+(1−cosθ)=1+2cosθ
即
θ=arccos(tr(R)−12)\theta = arccos(\frac{tr(R)-1}{2}) θ=arccos(2tr(R)−1)
SE(3)上的指数映射:
参考链接
exp(ξ∧)=[∑n=0∞1n!(ϕ∧)n∑n=0∞1(n+1)!(ϕ∧)nρ0⊤1]=[RJρ0⊤1]=T\rm{exp}(\xi^{\wedge})= \begin{bmatrix} \sum^{\infin}_{n=0}\frac{1}{n!}(\phi^{\wedge})^n& \sum^{\infin}_{n=0}\frac{1}{(n+1)!}(\phi^{\wedge})^n\rho\\ 0^{\top} & 1\\ \end{bmatrix} = \begin{bmatrix}R & J\rho \\ 0^{\top} & 1\\ \end{bmatrix} = T exp(ξ∧)=[∑n=0∞n!1(ϕ∧)n0⊤∑n=0∞(n+1)!1(ϕ∧)nρ1]=[R0⊤Jρ1]=T
此处的J矩阵: J=sinθθI+(1−sinθθ)aa⊤+1−cosθθa∧J=\frac{sin\theta}{\theta}I+(1-\frac{sin\theta}{\theta})\mathbf{a}\mathbf{a}^{\top}+\frac{1-cos\theta}{\theta}\mathbf{a}^{\wedge}J=θsinθI+(1−θsinθ)aa⊤+θ1−cosθa∧
起初这里的J矩阵我认为是Modern Robotics中的G(θ)G(\theta)G(θ), 但这样却导不出SLAM十四讲中的相似结果, 主要是J比G(θ)G(\theta)G(θ)多除了一项θ\thetaθ, 后来经过对比发现, MR中是旋量Sθ\mathcal{S}\thetaSθ转换为SE(3)SE(3)SE(3)而此处是se(3)se(3)se(3)转换为SE(3)SE(3)SE(3).
J矩阵的引出过程:
exp(ξ∧)=∑n=0∞1n![ϕ∧ρ0⊤0]n=I+∑n=1∞1n![θa∧ρ0⊤0]n=[∑n=0∞1n!(θa∧)n∑n=1∞1n!(θa∧)n−1ρ0⊤1]\begin{split} \rm{exp}(\xi^{\wedge}) &= \sum^{\infin}_{n=0}\frac{1}{n!}\begin{bmatrix}\boldsymbol{\phi}^{\wedge} & \rho\\ 0^{\top} & 0\end{bmatrix}^n \\ &=I + \sum^{\infin}_{n=1}\frac{1}{n!} \begin{bmatrix}\theta\mathbf{a}^{\wedge} & \rho \\ 0^{\top} & 0\end{bmatrix}^n\\ &= \begin{bmatrix} \sum^{\infin}_{n=0}\frac{1}{n!}(\theta\mathbf{a}^{\wedge})^n & \sum^{\infin}_{n=1}\frac{1}{n!}(\theta\mathbf{a}^{\wedge})^{n-1}\rho\\ 0^{\top} & 1 \end{bmatrix} \end{split} exp(ξ∧)=n=0∑∞n!1[ϕ∧0⊤ρ0]n=I+n=1∑∞n!1[θa∧0⊤ρ0]n=[∑n=0∞n!1(θa∧)n0⊤∑n=1∞n!1(θa∧)n−1ρ1]
令n=n−1n=n-1n=n−1, 从而n=n+1n= n+ 1n=n+1, 带入上式右上角的一项有:
exp(ξ∧)=[∑n=0∞1n!(θa∧)n∑n=0∞1(n+1)!(θa∧)nρ0⊤1]\rm{exp}(\xi^{\wedge} ) = \begin{bmatrix}\sum^{\infin}_{n=0}\frac{1}{n!}(\theta\mathbf{a}^{\wedge})^n & \sum^{\infin}_{n=0}\frac{1}{(n+1)!}(\theta\mathbf{a}^{\wedge})^{n}\rho \\ 0^{\top} & 1\\ \end{bmatrix} exp(ξ∧)=[∑n=0∞n!1(θa∧)n0⊤∑n=0∞(n+1)!1(θa∧)nρ1]
J=∑n=0∞1(n+1)!(θa∧)n=I+12!(θa∧)+13!(θa∧)2+⋯+1(n+1)!(θa∧)n=I+12!(θa∧)+13!(θa∧)2−14!θ3a∧−15!θ4(a∧)2+16!θ5(a∧)+17!θ7(a∧)2+⋯=1θ(12!θ2−14!θ4+⋯)a∧+1θ(13!θ3−15!θ5+⋯)(a∧)2+I\begin{split} J &= \sum^{\infin}_{n=0}\frac{1}{(n+1)!}(\theta\mathbf{a}^{\wedge})^n\\ &= I + \frac{1}{2!}(\theta\mathbf{a}^{\wedge})+ \frac{1}{3!}(\theta\mathbf{a}^{\wedge})^2+\cdots+ \frac{1}{(n+1)!}(\theta\mathbf{a}^{\wedge})^{n}\\ &=I + \frac{1}{2!}(\theta\mathbf{a}^{\wedge})+ \frac{1}{3!}(\theta\mathbf{a}^{\wedge})^2 - \frac{1}{4!}\theta^3\mathbf{a}^{\wedge}-\frac{1}{5!}\theta^4(\mathbf{a}^{\wedge})^2+\frac{1}{6!}\theta^5(\mathbf{a}^{\wedge})+\frac{1}{7!}\theta^7(\mathbf{a}^{\wedge})^2+\cdots\\ &=\frac{1}{\theta}(\frac{1}{2!}\theta^2-\frac{1}{4!}\theta^4+\cdots)\mathbf{a}^{\wedge}+\frac{1}{\theta}(\frac{1}{3!}\theta^3-\frac{1}{5!}\theta^5+\cdots)(\mathbf{a}^{\wedge})^2+I \end{split} J=n=0∑∞(n+1)!1(θa∧)n=I+2!1(θa∧)+3!1(θa∧)2+⋯+(n+1)!1(θa∧)n=I+2!1(θa∧)+3!1(θa∧)2−4!1θ3a∧−5!1θ4(a∧)2+6!1θ5(a∧)+7!1θ7(a∧)2+⋯=θ1(2!1θ2−4!1θ4+⋯)a∧+θ1(3!1θ3−5!1θ5+⋯)(a∧)2+I
借由sinθsin\thetasinθ与cosθcos\thetacosθ的展开以及a∧a∧=aa⊤−I\mathbf{a}^{\wedge}\mathbf{a}^{\wedge} =\mathbf{a}\mathbf{a}^{\top}-Ia∧a∧=aa⊤−I可以有:
sinθ=θ−13!θ3+15!θ5−17!θ7+⋯cosθ=1−12!θ2+14!θ4−16!θ6+⋯\begin{split} sin\theta & = \theta - \frac{1}{3!}\theta^3+\frac{1}{5!}\theta^5-\frac{1}{7!}\theta^7+\cdots\\ cos\theta &= 1 - \frac{1}{2!}\theta^2 + \frac{1}{4!}\theta^4 -\frac{1}{6!}\theta^6+\cdots\\ \end{split} sinθcosθ=θ−3!1θ3+5!1θ5−7!1θ7+⋯=1−2!1θ2+4!1θ4−6!1θ6+⋯
J=1θ(1−cosθ)(a∧)+θ−sinθθ(aa⊤−I)+I=sinθθI+(1−sinθθ)aa⊤+1−cosθθa∧\begin{split} J &= \frac{1}{\theta}(1-cos\theta)(\mathbf{a}^{\wedge})+ \frac{\theta-sin\theta}{\theta}(\mathbf{a}{\mathbf{a}^{\top}}-I)+I\\ &= \frac{sin{\theta}}{\theta}I+(1-\frac{sin\theta}{\theta})\mathbf{a}\mathbf{a}^{\top}+\frac{1-cos\theta}{\theta}\mathbf{a}^{\wedge} \end{split} J=θ1(1−cosθ)(a∧)+θθ−sinθ(aa⊤−I)+I=θsinθI+(1−θsinθ)aa⊤+θ1−cosθa∧
Baker-Campbell-Hausdoff公式: BCH公式的引入是为了指出exp(ϕ1∧)exp(ϕ2∧)≠exp((ϕ1+ϕ2)∧).exp(\phi^{\wedge}_1)exp(\phi^{\wedge}_2) \neq exp((\phi_1+\phi_2)^{\wedge}).exp(ϕ1∧)exp(ϕ2∧)=exp((ϕ1+ϕ2)∧). 即ln(exp(ϕ1∧)exp(ϕ2∧))≠ϕ1∧+ϕ2∧ln(exp(\phi^{\wedge}_1)exp(\phi^{\wedge}_2))\neq\phi^{\wedge}_1+\phi^{\wedge}_2ln(exp(ϕ1∧)exp(ϕ2∧))=ϕ1∧+ϕ2∧ 同时给出可以用于描述增量的截断公式: ln(exp(A)exp(B))=A+B+12[A,B]+112[A,[A,B]]−112[B,[A,B]]+⋯ln(exp(A)exp(B))= A+B+\frac{1}{2}[A,B]+\frac{1}{12}[A,[A,B]]-\frac{1}{12}[B,[A,B]]+\cdotsln(exp(A)exp(B))=A+B+21[A,B]+121[A,[A,B]]−121[B,[A,B]]+⋯
BCH公式告诉我们, 当处理两个矩阵指数之积时, 它们会产生一些由李括号组成的余项. 特别地, 考虑SO(3)SO(3)SO(3)上的李代数ln(exp(ϕ1∧)exp(ϕ2∧))∨ln(exp(\phi^{\wedge}_1)exp(\phi^{\wedge}_2))^{\vee}ln(exp(ϕ1∧)exp(ϕ2∧))∨, 当ϕ1\phi_1ϕ1或ϕ2\phi_2ϕ2为小量, 小量二次以上的项都可以被忽略掉, 此时BCH公式:
ln(exp(ϕ1∧)exp(ϕ2∧))∨≈{Jl(ϕ2)−1ϕ1+ϕ2当ϕ1为小量Jr(ϕ1)−1ϕ2+ϕ1当ϕ2为小量ln(exp(\phi^{\wedge}_1)exp(\phi^{\wedge}_2))^{\vee} \approx \left\{\begin{matrix} J_l(\phi_2)^{-1}\phi_1+\phi_2 & 当\phi_1为小量 \\ J_r(\phi_1)^{-1}\phi_2+\phi_1 & 当\phi_2为小量 \end{matrix}\right. ln(exp(ϕ1∧)exp(ϕ2∧))∨≈{Jl(ϕ2)−1ϕ1+ϕ2Jr(ϕ1)−1ϕ2+ϕ1当ϕ1为小量当ϕ2为小量
BCH公式的含义是: 当对一个旋转矩阵R2\mathbf{R}_2R2(李代数为ϕ2\boldsymbol{\phi}_2ϕ2)左乘一个微小旋转矩阵R1\mathbf{R}_1R1(李代数为ϕ1)\boldsymbol{\phi}_1)ϕ1)时,可以近似地看作,在原有的李代数ϕ2\boldsymbol{\phi}_2ϕ2上加上一项Jl(ϕ2)−1ϕ1J_l(\phi_2)^{-1}\phi_1Jl(ϕ2)−1ϕ1, 同理, 第二个近似描述了右乘一个微小位移的情况. 于是, 李代数在BCH近似下,分为了左乘近似与右乘近似两种. 在使用时, 我们必须注意是使用的是左乘模型还是右乘模型.
JlJ_lJl实际上就是前面提到的JJJ
Jl=J=sinθθI+(1−sinθθ)aa⊤+1−cosθθa∧J_l = J = \frac{sin\theta}{\theta}I +(1-\frac{sin\theta}{\theta})\mathbf{a}\mathbf{a}^{\top}+\frac{1-cos\theta}{\theta}\mathbf{a}^{\wedge} Jl=J=θsinθI+(1−θsinθ)aa⊤+θ1−cosθa∧
它的逆为:
Jl−1=θ2cotθ2I+(1−θ2cotθ2)aa⊤−θ2a∧\mathbf{J}^{-1}_l = \frac{\theta}{2}cot\frac{\theta}{2}I+(1-\frac{\theta}{2}cot\frac{\theta}{2})\mathbf{a}\mathbf{a}^{\top}-\frac{\theta}{2}\mathbf{a}^{\wedge} Jl−1=2θcot2θI+(1−2θcot2θ)aa⊤−2θa∧
右乘Jacobian仅需要对自变量取负号即可:
Jr(ϕ)=Jl(−ϕ)\mathbf{J}_r(\boldsymbol{\phi})=\mathbf{J}_l(-\boldsymbol{\phi}) Jr(ϕ)=Jl(−ϕ)
假定对某个旋转R\mathbf{R}R, 对应的李代数为ϕ\boldsymbol{\phi}ϕ, 左乘一个微小旋转, 记作△R\bigtriangleup\mathbf{R}△R, 对应的李代数为△ϕ\bigtriangleup\mathbf{\phi}△ϕ. 在李群上,得到的结果是△R⋅R\bigtriangleup\mathbf{R}\cdot\mathbf{R}△R⋅R, 而在李代数上, 根据BCH近似, 为Jl−1(ϕ)△ϕ+ϕ\mathbf{J}^{-1}_l(\phi)\bigtriangleup\phi+\phiJl−1(ϕ)△ϕ+ϕ
exp(△ϕ∧)exp(ϕ∧)=exp((ϕ+Jl−1(ϕ)△ϕ)∧)exp(\bigtriangleup\phi^{\wedge})exp(\phi^{\wedge}) = exp((\phi+\mathbf{J}^{-1}_l(\phi)\bigtriangleup\phi)^{\wedge}) exp(△ϕ∧)exp(ϕ∧)=exp((ϕ+Jl−1(ϕ)△ϕ)∧)
反之, 如果在李代数上进行加法, 让一个ϕ\phiϕ加上△ϕ\bigtriangleup\phi△ϕ, 可以近似为李群上带左右雅可比的乘法:
exp((ϕ+△ϕ)∧)=exp((Jl△ϕ)∧)exp(ϕ∧)=exp(ϕ∧)exp((Jr△ϕ∧)exp((\phi+\bigtriangleup\phi)^{\wedge}) = exp((\mathbf{J}_l\bigtriangleup\phi)^{\wedge})exp(\phi^{\wedge})=exp(\phi^{\wedge})exp((\mathbf{J}_r\bigtriangleup \phi^{\wedge}) exp((ϕ+△ϕ)∧)=exp((Jl△ϕ)∧)exp(ϕ∧)=exp(ϕ∧)exp((Jr△ϕ∧)
对于SE(3)亦有类似的BCH近似公式:
exp(△ξ∧)exp(ξ∧)≈exp((Jl−1△ξ+ξ)∧)exp(ξ∧)exp(△ξ∧)≈exp((Jr−1△ξ+ξ)∧)\begin{split} exp(\bigtriangleup\xi^{\wedge})exp(\xi^{\wedge}) &\approx exp((\mathcal{J}^{-1}_{l}\bigtriangleup\xi+\xi)^{\wedge})\\ exp(\xi^{\wedge})exp(\bigtriangleup\xi^{\wedge}) &\approx exp((\mathcal{J}^{-1}_{r}\bigtriangleup\xi+\xi)^{\wedge})\\ \end{split} exp(△ξ∧)exp(ξ∧)exp(ξ∧)exp(△ξ∧)≈exp((Jl−1△ξ+ξ)∧)≈exp((Jr−1△ξ+ξ)∧)
误差与扰动模型
在SLAM问题中, 相机的位置与姿态是需要去估计的量, 位姿由SO(3)上的旋转矩阵或SE(3)上的变换矩阵进行描述. 设相机的位姿为TTT, 它观察到一个世界坐标位于ppp的点, 产生一个观测数据zzz, z=Tp+wz=Tp+wz=Tp+w, 由于观测噪声w的存在, z往往不可能精确地满足z=Tp的关系,所以, 计算理想的观测与实际数据的误差:
e=z−Tpe = z- Tp e=z−Tp
假设一共有N个这样的路标点与观测, 于是就有N个上式. 对相机的位姿进行估计, 相当于寻找一个最优的T, 使得整体误差最小化:
minTJ(T)=∑i=1N∣∣zi−Tpi∣∣22\underset{T}{min}J(T) = \sum^{N}_{i=1}||z_i-Tp_i||^2_2 TminJ(T)=i=1∑N∣∣zi−Tpi∣∣22
构建与位姿相关的函数, 然后讨论该函数关于位姿的导数, 以调整当前的估计值.
SLAM十四讲中提到了两种解决方法:
- 用李代数表示姿态, 然后根据李代数加法来对李代数进行求导 ( A Micro Lie Theory论文里的那一套)
- 对李群左乘或右乘微小扰动, 然后对该扰动求导, 称为左/右扰动模型
李代数求导:
对一个空间点p进行旋转, 得到RpRpRp, 要计算旋转之后的坐标相对于旋转的导数, 不严谨地记为:
∂(Rp)∂R\frac{\partial (Rp)}{\partial R} ∂R∂(Rp)
由于SO(3)SO(3)SO(3)没有加法,所以该导数无法按照导数的定义进行计算.设R对应的李代数为ϕ\phiϕ, 转而计算:
∂(exp(ϕ∧)p)∂ϕ=lim∂ϕ→0exp((ϕ+δϕ)∧)p−exp(ϕ∧)pδϕ=lim∂ϕ→0exp((Jlδϕ)∧)p−exp(ϕ∧)pδϕ≈lim∂ϕ→0(I+(Jlδϕ)∧)exp(ϕ∧)p−exp(ϕ∧)pδϕ=lim∂ϕ→0(Jlδϕ)∧exp(ϕ∧)pδϕ=lim∂ϕ→0−(exp(ϕ∧)p)∧Jlδϕδϕ=−(Rp)∧Jl\begin{split} \frac{\partial (exp(\phi^{\wedge})p)}{\partial \phi} &= \underset{\partial\phi \rightarrow0}{lim} \frac{exp((\phi+\delta\phi)^{\wedge})p-exp(\phi^{\wedge})p}{\delta \phi}\\ &=\underset{\partial\phi \rightarrow0}{lim} \frac{exp((J_l\delta\phi)^{\wedge})p-exp(\phi^{\wedge})p}{\delta \phi}\\ &\approx \underset{\partial\phi \rightarrow0}{lim} \frac{(I+(J_l\delta \phi)^{\wedge})exp(\phi^{\wedge})p-exp(\phi^{\wedge})p}{\delta \phi}\\ &= \underset{\partial\phi \rightarrow0}{lim} \frac{(J_l\delta \phi)^{\wedge}exp(\phi^{\wedge})p}{\delta \phi}\\ &= \underset{\partial\phi \rightarrow0}{lim} \frac{-(exp(\phi^{\wedge})p)^{\wedge}J_l\delta\phi}{\delta \phi}\\ &= -(Rp)^{\wedge}J_l \end{split} ∂ϕ∂(exp(ϕ∧)p)=∂ϕ→0limδϕexp((ϕ+δϕ)∧)p−exp(ϕ∧)p=∂ϕ→0limδϕexp((Jlδϕ)∧)p−exp(ϕ∧)p≈∂ϕ→0limδϕ(I+(Jlδϕ)∧)exp(ϕ∧)p−exp(ϕ∧)p=∂ϕ→0limδϕ(Jlδϕ)∧exp(ϕ∧)p=∂ϕ→0limδϕ−(exp(ϕ∧)p)∧Jlδϕ=−(Rp)∧Jl
第二行为BCH线性近似, 第三行为泰勒展开, 第五行为向量叉乘前后掉转后添加负号. 故
∂(Rp)∂ϕ=−(Rp)∧Jl\frac{\partial (Rp)}{\partial \phi} = -(Rp)^{\wedge}J_l ∂ϕ∂(Rp)=−(Rp)∧Jl
扰动模型:
对R进行一次△R\bigtriangleup R△R, 这个扰动可以乘在左边也可以乘在右边. 以左扰动为例, 左扰动△R\bigtriangleup R△R对应的李代数为φ\varphiφ.
∂(Rp)∂φ=limφ→0exp(φ∧)exp(ϕ∧)p−exp(ϕ∧)pφ\frac{\partial (Rp)}{\partial \varphi} = \underset{\varphi\rightarrow 0}{lim} \frac{exp(\varphi^{\wedge})exp(\phi^{\wedge})p-exp(\phi^{\wedge})p}{\varphi} ∂φ∂(Rp)=φ→0limφexp(φ∧)exp(ϕ∧)p−exp(ϕ∧)p
∂(Rp)∂φ=limφ→0exp(φ∧)exp(ϕ∧)p−exp(ϕ∧)pφ≈limφ→0(I+φ∧)exp(ϕ∧)p−exp(ϕ∧)pφ=limφ→0φ∧Rpφ=limφ→0−(Rp)∧φφ=−(Rp)∧\begin{split} \frac{\partial (Rp)}{\partial \varphi} &= \underset{\varphi\rightarrow 0}{lim} \frac{exp(\varphi^{\wedge})exp(\phi^{\wedge})p-exp(\phi^{\wedge})p}{\varphi}\\ &\approx \underset{\varphi\rightarrow 0}{lim} \frac{(I+\varphi^{\wedge})exp(\phi^{\wedge})p-exp(\phi^{\wedge})p}{\varphi}\\ &= \underset{\varphi\rightarrow 0}{lim} \frac{\varphi^{\wedge}Rp}{\varphi}\\ &= \underset{\varphi\rightarrow 0}{lim} \frac{-(Rp)^{\wedge}\varphi}{\varphi} = -(Rp)^{\wedge} \end{split} ∂φ∂(Rp)=φ→0limφexp(φ∧)exp(ϕ∧)p−exp(ϕ∧)p≈φ→0limφ(I+φ∧)exp(ϕ∧)p−exp(ϕ∧)p=φ→0limφφ∧Rp=φ→0limφ−(Rp)∧φ=−(Rp)∧
SE(3)SE(3)SE(3)上的李代数求导
假设某空间点p经过一次变换T(对应的李代数为ξ\xiξ), 得到TpTpTp. 现在,给T左乘一个扰动△T=exp(δξ∧)\bigtriangleup T= exp(\delta \xi^{\wedge})△T=exp(δξ∧). 扰动项的李代数为δξ=[δρ,δϕ]⊤\delta \xi=[\delta \rho,\delta\phi]^{\top}δξ=[δρ,δϕ]⊤.
∂(Tp)∂δξ=limδξ→0exp(δξ)∧exp(ξ∧)p−exp(ξ∧)pδξ=limδξ→0(I+δξ∧)exp(ξ∧)p−exp(ξ∧)pδξ=limδξ→0δξ∧exp(ξ∧)pδξ=limδξ→0[δϕ∧δρ0⊤0][Rp+t1]δξ=limδξ→0[δϕ∧(Rp+t)+δρ0]δξ=[I−(Rp+t)∧0⊤0⊤]△=(Tp)⊙\begin{split} \frac{\partial (Tp)}{\partial \delta\xi} &= \underset{\delta\xi\rightarrow 0}{lim} \frac{exp(\delta\xi)^{\wedge}exp(\xi^{\wedge})p-exp(\xi^{\wedge})p}{\delta \xi}\\ &=\underset{\delta\xi\rightarrow 0}{lim} \frac{(I+\delta \xi^{\wedge})exp(\xi^{\wedge})p-exp(\xi^{\wedge})p}{\delta \xi}\\ &=\underset{\delta\xi\rightarrow 0}{lim} \frac{\delta\xi^{\wedge}exp(\xi^{\wedge})p}{\delta \xi}\\ &=\underset{\delta\xi\rightarrow 0}{lim} \frac{\begin{bmatrix}\delta \phi^{\wedge} & \delta\rho\\ 0^{\top}& 0\end{bmatrix}\begin{bmatrix}Rp+t\\1\end{bmatrix}}{\delta \xi}\\ &=\underset{\delta\xi\rightarrow 0}{lim} \frac{\begin{bmatrix}\delta\phi^{\wedge}(Rp+t)+\delta\rho\\0\end{bmatrix}}{\delta \xi}\\ &= \begin{bmatrix}I& -(Rp+t)^{\wedge}\\0^{\top} & 0 ^{\top}\end{bmatrix} \underset{\boldsymbol{=}}{\triangle}(Tp)^{\odot} \end{split} ∂δξ∂(Tp)=δξ→0limδξexp(δξ)∧exp(ξ∧)p−exp(ξ∧)p=δξ→0limδξ(I+δξ∧)exp(ξ∧)p−exp(ξ∧)p=δξ→0limδξδξ∧exp(ξ∧)p=δξ→0limδξ[δϕ∧0⊤δρ0][Rp+t1]=δξ→0limδξ[δϕ∧(Rp+t)+δρ0]=[I0⊤−(Rp+t)∧0⊤]=△(Tp)⊙
SO(3)与SE(3)的伴随性质可见于链接
相似变换群与相应李代数
单目相机具有尺度不确定性.
p′=[sRt0⊤1]=sRp+tp'=\begin{bmatrix}sR& t\\ 0^{\top} & 1\end{bmatrix} = sRp+t p′=[sR0⊤t1]=sRp+t
同时作用于p的3个坐标上, 对p进行了一次放缩. 与SO(3),SE(3)相似, 相似变换亦对矩阵乘法构成群, 称为相似变换群Sim(3):
Sim(3)={S=[sRt0⊤1]∈R4×4}Sim(3) = \left\{S=\begin{bmatrix}sR& t\\ 0^{\top} & 1\end{bmatrix}\in \mathbb{R}^{4\times 4} \right\} Sim(3)={S=[sR0⊤t1]∈R4×4}
李代数sim(3)\mathfrak{sim}(3)sim(3)元素为7维向量. 前6维与se(3)\mathfrak{se}(3)se(3)相同, 最后多了一项σ\sigmaσ.
sim(3)={ζ∣ζ=[ρϕσ]∈R7,ζ∧=[σI+ϕ∧ρ0⊤0]∈R4×4}\mathfrak{sim}(3) = \left\{ \zeta | \zeta= \begin{bmatrix}\rho\\ \phi\\ \sigma \end{bmatrix} \in \mathbb{R}^7, \zeta^{\wedge} = \begin{bmatrix}\sigma I+\phi^{\wedge} & \rho \\ 0^{\top} & 0\end{bmatrix}\in \mathbb{R}^{4\times 4} \right\} sim(3)=⎩⎨⎧ζ∣ζ=ρϕσ∈R7,ζ∧=[σI+ϕ∧0⊤ρ0]∈R4×4⎭⎬⎫
ζ\zetaζ的指数映射为
exp(ζ∧)=[eσexp(ϕ∧)Jsρ0⊤1]exp(\zeta^{\wedge}) = \begin{bmatrix}e^{\sigma}exp(\phi^{\wedge})& J_s\rho\\ 0^{\top} & 1\\ \end{bmatrix} exp(ζ∧)=[eσexp(ϕ∧)0⊤Jsρ1]
其中JsJ_sJs的形式为:
Js=eσ−1σI+σeσsinθ+(1−eσcosθ)θa∧σ2+θ2+(eσ−1σ−(eσcosθ−1)σ+(eσsinθ)θσ2+θ2)a∧a∧J_s = \frac{e^{\sigma}-1}{\sigma}I+ \frac{\sigma e^{\sigma}sin\theta+(1-e^{\sigma}cos\theta)\theta \mathbf{a}^{\wedge}}{\sigma^2+\theta^2}+(\frac{e^{\sigma}-1}{\sigma}-\frac{(e^{\sigma}cos\theta-1)\sigma+(e^{\sigma}sin\theta)\theta}{\sigma^2+\theta^2})\mathbf{a}^{\wedge}\mathbf{a}^{\wedge} Js=σeσ−1I+σ2+θ2σeσsinθ+(1−eσcosθ)θa∧+(σeσ−1−σ2+θ2(eσcosθ−1)σ+(eσsinθ)θ)a∧a∧
旋转部分与SO(3)一致, 平移部分在se(3)\mathfrak{se}(3)se(3)中需要乘以一个雅可比J\mathcal{J}J, 而相似变换的雅可比更加复杂一些. 对于尺度因子, 可以看到李群中的s即为李代数中的σ\sigmaσ的指数函数.
Sim(3)Sim(3)Sim(3)的扰动模型:
给予Sp左侧一个小扰动exp(ζ∧)exp(\zeta^{\wedge})exp(ζ∧),并求Sp对于扰动的导数, 因为Sp是4维的齐次坐标,ζ\zetaζ是7维向量.该导数可以为4×74\times74×7的Jacobian.
∂Sp∂ζ=[I−q∧q0⊤0⊤0]\frac{\partial Sp}{\partial \zeta} = \begin{bmatrix}I & -q^{\wedge} & q\\ 0^{\top} & 0 ^{\top} & 0\\ \end{bmatrix} ∂ζ∂Sp=[I0⊤−q∧0⊤q0]