怎么制作軟件app教程網(wǎng)絡(luò)優(yōu)化工程師需要學(xué)什么
P71
文章目錄
- 4.1 李群與李代數(shù)基礎(chǔ)
- 4.1.3 李代數(shù)的定義
- 4.1.4 李代數(shù) so(3)
- 4.1.5 李代數(shù) se(3)
- 4.2 指數(shù)與對(duì)數(shù)映射
- 4.2.1 SO(3)上的指數(shù)映射
- 羅德里格斯公式推導(dǎo)
- 4.2.2 SE(3) 上的指數(shù)映射
- SO(3),SE(3),so(3),se(3)的對(duì)應(yīng)關(guān)系
- 4.3 李代數(shù)求導(dǎo)與擾動(dòng)模型
- 4.3.2 SO(3)上的李代數(shù)求導(dǎo)
- 4.3.3 李代數(shù)求導(dǎo)
- 4.3.4 擾動(dòng)模型(左乘)【更簡(jiǎn)單 的導(dǎo)數(shù)計(jì)算模型】
- 4.3.5 SE(3)上的李代數(shù)求導(dǎo)
- 4.4 Sophus應(yīng)用 【Code】
- 4.4.2 評(píng)估軌跡的誤差 【Code】
- 4.5 相似變換群 與 李代數(shù)
- 習(xí)題
- 題1
- 題2
- 題4
- √ 題5
- √ 題6
- 6.2 SE(3)伴隨性質(zhì)
- √ 題7
- √ 題8
- LaTex

什么樣的相機(jī)位姿 最符合 當(dāng)前觀測(cè)數(shù)據(jù)。
求解最優(yōu)的 R , t \bm{R, t} R,t, 使得誤差最小化。
4.1 李群與李代數(shù)基礎(chǔ)
群
: 只有一個(gè)(良好的)運(yùn)算的集合。
封結(jié)幺逆 、 豐儉由你
李群
: 具有連續(xù)(光滑)性質(zhì)的群。
在 t = 0 附近,旋轉(zhuǎn)矩陣可以由 e x p ( ? 0 ? t ) exp(\phi_0\^{}t) exp(?0??t)計(jì)算得到
4.1.3 李代數(shù)的定義
李代數(shù) 描述了李群的局部性質(zhì)
- 單位元 附近的正切空間。
g = ( R 3 , R , × ) \mathfrak{g}=(\mathbb{R}^3, \mathbb{R}, \times) g=(R3,R,×)構(gòu)成了一個(gè)李代數(shù)
4.1.4 李代數(shù) so(3)
s o ( 3 ) \mathfrak{so}(3) so(3): 一個(gè)由三維向量組成的集合,每個(gè)向量對(duì)應(yīng)一個(gè)反對(duì)稱矩陣,可以用于表達(dá)旋轉(zhuǎn)矩陣的導(dǎo)數(shù)。
s o ( 3 ) = { ? ∈ R 3 , Φ = ? ? ∈ R 3 × 3 } \mathfrak{so}(3)=\{\phi\in\mathbb{R}^3,\bm{\Phi}=\phi\^{}\in\mathbb{R}^{3\times3}\} so(3)={?∈R3,Φ=??∈R3×3}
4.1.5 李代數(shù) se(3)
李群 S E ( 3 ) SE(3) SE(3) 對(duì)應(yīng)的李代數(shù) s e ( 3 ) \mathfrak{se}(3) se(3)
4.2 指數(shù)與對(duì)數(shù)映射
4.2.1 SO(3)上的指數(shù)映射
s o ( 3 ) \mathfrak{so}(3) so(3): 旋轉(zhuǎn)向量 組成的空間
指數(shù)映射
: 羅德里格斯公式
R = e x p ( ? ∧ ) = e x p ( θ a ∧ ) = c o s θ I + ( 1 ? c o s θ ) a a T + s i n θ a ∧ \bm{R}=exp(\phi^{\land})=exp(\theta\bm{a}^{\land})=cos\theta\bm{I} + (1-cos\theta)\bm{a}\bm{a}^T+sin\theta\bm{a}^{\land} R=exp(?∧)=exp(θa∧)=cosθI+(1?cosθ)aaT+sinθa∧
對(duì)數(shù)映射
: 李群 S O ( 3 ) SO(3) SO(3) 中的元素 ——> 李代數(shù) s o ( 3 ) \mathfrak{so}(3) so(3)
把旋轉(zhuǎn)角固定在 ± π ±\pi ±π 之間,則李群和李代數(shù) 元素 一一對(duì)應(yīng)。
————————————————
羅德里格斯公式推導(dǎo)
e x p ( ? ∧ ) = e x p ( θ a ∧ ) = ∑ n = 0 ∞ 1 n ! ( θ a ∧ ) n n = 0 , 1 , 2 , 3 , . . . 原式 = I + θ a ∧ + 1 2 ! θ 2 a ∧ a ∧ + 1 3 ! θ 3 a ∧ a ∧ a ∧ + 1 4 ! θ 4 ( a ∧ ) 4 + ? ? ? 將 a ∧ a ∧ = a a T ? I ; a ∧ a ∧ a ∧ = ( a ∧ ) 3 = ? a ∧ 代入 原式 = a a T ? a ∧ a ∧ + θ a ∧ + 1 2 ! θ 2 a ∧ a ∧ ? 1 3 ! θ 3 a ∧ ? 1 4 ! θ 4 ( a ∧ ) 2 + ? ? ? = a a T + ( θ ? 1 3 ! θ 3 + 1 5 ! θ 5 ? ? ? ? ) a ∧ ? ( 1 ? 1 2 ! θ 2 + 1 4 ! θ 4 ? ? ? ? ) a ∧ a ∧ = a ∧ a ∧ + I + s i n θ a ∧ ? c o s θ a ∧ a ∧ = ( 1 ? c o s θ ) a ∧ a ∧ + I + s i n θ a ∧ = ( 1 ? c o s θ ) ( a a T ? I ) + I + s i n θ a ∧ = c o s θ I + ( 1 ? c o s θ ) a a T + s i n θ a ∧ \begin{align*}exp(\phi^{\land}) &=exp(\theta\bm{a}^{\land})=\sum\limits_{n=0}^{\infty}\frac{1}{n!} (\theta\bm{a}^{\land})^n \\ & n = 0, 1, 2, 3, ... \\ 原式 & = \bm{I} + \theta\bm{a}^{\land} + \frac{1}{2!}\theta^2\bm{a}^{\land}\bm{a}^{\land} + \frac{1}{3!}\theta^3\bm{a}^{\land}\bm{a}^{\land}\bm{a}^{\land} +\frac{1}{4!}\theta^4(\bm{a}^{\land})^4+···\\ & 將\bm{a}^{\land}\bm{a}^{\land} = \bm{a}\bm{a}^T - \bm{I}; \bm{a}^{\land}\bm{a}^{\land}\bm{a}^{\land} = (\bm{a}^{\land})^3 =-\bm{a}^{\land} 代入 \\ 原式& = \bm{a}\bm{a}^T - \bm{a}^{\land}\bm{a}^{\land} + \theta\bm{a}^{\land} + \frac{1}{2!}\theta^2\bm{a}^{\land}\bm{a}^{\land}-\frac{1}{3!}\theta^3\bm{a}^{\land}-\frac{1}{4!}\theta^4(\bm{a}^{\land})^2+···\\ & = \bm{a}\bm{a}^T + (\theta - \frac{1}{3!}\theta^3+\frac{1}{5!}\theta^5-···)\bm{a}^{\land}-(1-\frac{1}{2!}\theta^2+\frac{1}{4!}\theta^4-···)\bm{a}^{\land}\bm{a}^{\land}\\ & = \bm{a}^{\land}\bm{a}^{\land} + \bm{I}+sin\theta \bm{a}^{\land}-cos\theta\bm{a}^{\land}\bm{a}^{\land}\\ &=(1-cos\theta)\bm{a}^{\land}\bm{a}^{\land}+\bm{I} + sin\theta\bm{a}^{\land}\\ &= (1-cos\theta)(\bm{a}\bm{a}^T-\bm{I})+\bm{I} + sin\theta\bm{a}^{\land}\\ & = cos\theta\bm{I}+ (1-cos\theta)\bm{a}\bm{a}^T + sin\theta\bm{a}^{\land} \end{align*} exp(?∧)原式原式?=exp(θa∧)=n=0∑∞?n!1?(θa∧)nn=0,1,2,3,...=I+θa∧+2!1?θ2a∧a∧+3!1?θ3a∧a∧a∧+4!1?θ4(a∧)4+???將a∧a∧=aaT?I;a∧a∧a∧=(a∧)3=?a∧代入=aaT?a∧a∧+θa∧+2!1?θ2a∧a∧?3!1?θ3a∧?4!1?θ4(a∧)2+???=aaT+(θ?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∧+I+sinθa∧=(1?cosθ)(aaT?I)+I+sinθa∧=cosθI+(1?cosθ)aaT+sinθa∧?
e x p ( θ a ∧ ) = c o s θ I + ( 1 ? c o s θ ) a a T + s i n θ a ∧ exp(\theta\bm{a}^{\land})=cos\theta\bm{I} + (1-cos\theta)\bm{a}\bm{a}^T+sin\theta\bm{a}^{\land} exp(θa∧)=cosθI+(1?cosθ)aaT+sinθa∧
—————
$\bm{a}^{\land}$
a ∧ \bm{a}^{\land} a∧
————————————————
4.2.2 SE(3) 上的指數(shù)映射
——————
推導(dǎo):
∑ n = 0 ∞ 1 ( n + 1 ) ! ( ? ∧ ) n = ∑ n = 0 ∞ 1 ( n + 1 ) ! ( θ a ∧ ) n = I + 1 2 ! θ a ∧ + 1 3 ! θ 2 ( a ∧ ) 2 + 1 4 ! θ 3 ( a ∧ ) 3 + 1 5 ! θ 4 ( a ∧ ) 4 + ? ? ? = 1 θ ( 1 2 ! θ 2 ? 1 4 ! θ 4 + ? ? ? ) a ∧ + 1 θ ( 1 3 ! θ 3 ? 1 5 ! θ 5 + ? ? ? ) ( a ∧ ) 2 + I = 1 θ ( 1 ? c o s θ ) a ∧ + 1 θ ( θ ? s i n θ ) ( a a T ? I ) + I = s i n θ θ I + ( 1 ? s i n θ θ ) a a T + 1 ? c o s θ θ a ∧ = d e f J \begin{align*} \sum\limits_{n=0}^{\infty}\frac{1}{(n+1)!}(\phi^{\land})^n &= \sum\limits_{n=0}^{\infty}\frac{1}{(n+1)!}(\theta\bm{a}^{\land})^n\\ & = \bm{I} + \frac{1}{2!}\theta\bm{a}^{\land} + \frac{1}{3!}\theta^2(\bm{a}^{\land})^2 + \frac{1}{4!}\theta^3(\bm{a}^{\land})^3 + \frac{1}{5!}\theta^4(\bm{a}^{\land})^4+···\\ & = \frac{1}{\theta}( \frac{1}{2!}\theta^2- \frac{1}{4!}\theta^4+···)\bm{a}^{\land} + \frac{1}{\theta}( \frac{1}{3!}\theta^3- \frac{1}{5!}\theta^5+···)(\bm{a}^{\land})^2+\bm{I} \\ & = \frac{1}{\theta}( 1-cos\theta)\bm{a}^{\land} + \frac{1}{\theta}(\theta-sin\theta)(\bm{a}\bm{a}^T-\bm{I})+\bm{I} \\ & = \frac{sin\theta}{\theta}\bm{I}+(1-\frac{sin\theta}{\theta})\bm{a}\bm{a}^T + \frac{1-cos\theta}{\theta}\bm{a}^{\land}\\ & \overset{\mathrm{def}}{=} \bm{J} \end{align*} n=0∑∞?(n+1)!1?(?∧)n?=n=0∑∞?(n+1)!1?(θa∧)n=I+2!1?θa∧+3!1?θ2(a∧)2+4!1?θ3(a∧)3+5!1?θ4(a∧)4+???=θ1?(2!1?θ2?4!1?θ4+???)a∧+θ1?(3!1?θ3?5!1?θ5+???)(a∧)2+I=θ1?(1?cosθ)a∧+θ1?(θ?sinθ)(aaT?I)+I=θsinθ?I+(1?θsinθ?)aaT+θ1?cosθ?a∧=defJ?
J = s i n θ θ I + ( 1 ? s i n θ θ ) a a T + 1 ? c o s θ θ a ∧ \bm{J}=\frac{sin\theta}{\theta}\bm{I}+(1-\frac{sin\theta}{\theta})\bm{a}\bm{a}^T + \frac{1-cos\theta}{\theta}\bm{a}^{\land} J=θsinθ?I+(1?θsinθ?)aaT+θ1?cosθ?a∧
R = c o s θ I + ( 1 ? c o s θ ) a a T + s i n θ a ∧ \bm{R}=cos\theta\bm{I}+(1-cos\theta)\bm{a}\bm{a}^T + sin\theta\bm{a}^{\land} R=cosθI+(1?cosθ)aaT+sinθa∧
————
t = J ρ \bm{t=Jρ} t=Jρ
平移部分發(fā)生了一次以 J \bm{J} J 為系數(shù)矩陣的 線性變換。
SO(3),SE(3),so(3),se(3)的對(duì)應(yīng)關(guān)系
4.3 李代數(shù)求導(dǎo)與擾動(dòng)模型
Baker-Campbell-Hausdorff公式(BCH公式)
4.3.2 SO(3)上的李代數(shù)求導(dǎo)
位姿由SO(3)
上的旋轉(zhuǎn)矩陣 或 SE(3)
上的變換矩陣 描述
設(shè)某時(shí)刻機(jī)器人的位姿為 T \bm{T} T, 觀察到了一個(gè)世界坐標(biāo)位于 p \bm{p} p 的點(diǎn),產(chǎn)生了一個(gè)觀測(cè)數(shù)據(jù) z \bm{z} z
計(jì)算理想的觀測(cè)與實(shí)際數(shù)據(jù)之間的誤差: e = z ? T p \bm{e = z-Tp} e=z?Tp
假設(shè)一共有 N N N 個(gè)這樣的路標(biāo)點(diǎn)和觀測(cè),對(duì)機(jī)器人進(jìn)行位姿估計(jì),相當(dāng)于尋找一個(gè)最優(yōu)的 T \bm{T} T ,使得整體誤差最小化:
min ? T J ( T ) = ∑ i = 1 N ∣ ∣ z i ? T p i ∣ ∣ 2 2 \min\limits_{\bm{T}}J(\bm{T}) = \sum\limits_{i=1}^{N}||\bm{z_i-Tp_i}||_2^2 Tmin?J(T)=i=1∑N?∣∣zi??Tpi?∣∣22?
求解上述問(wèn)題,需要計(jì)算目標(biāo)函數(shù) J J J 關(guān)于變換矩陣 T \bm{T} T 的導(dǎo)數(shù)。
使用 李代數(shù) 解決 求導(dǎo)問(wèn)題 的2種思路:
1、用李代數(shù)表示姿態(tài),然后根據(jù)李代數(shù)加法對(duì)李代數(shù)求導(dǎo)。
2、對(duì)李群左乘或右乘微小擾動(dòng),然后對(duì)該擾動(dòng)求導(dǎo),稱為左擾動(dòng)和右擾動(dòng)模型。
4.3.3 李代數(shù)求導(dǎo)
——————
推導(dǎo):
? ( R p ) ? R = R 對(duì)應(yīng)的李代數(shù)為 ? ? ( exp ? ( ? ∧ ) p ) ? ? = lim ? Δ ? → 0 exp ? ( ( ? + Δ ? ) ∧ ) p ? exp ? ( ? ∧ ) p Δ ? 由式 ( 4.35 ) = lim ? Δ ? → 0 exp ? ( ( J l Δ ? ) ∧ ) exp ? ( ? ∧ ) p ? exp ? ( ? ∧ ) p Δ ? = lim ? Δ ? → 0 ( I + ( J l Δ ? ) ∧ ) exp ? ( ? ∧ ) p ? exp ? ( ? ∧ ) p Δ ? = lim ? Δ ? → 0 ( J l Δ ? ) ∧ exp ? ( ? ∧ ) p Δ ? a ∧ 等效于 a × , 因此根據(jù)叉乘的性質(zhì) = lim ? Δ ? → 0 ? ( exp ? ( ? ∧ ) p ) ∧ J l Δ ? Δ ? = ? ( R p ) ∧ J l \begin{align*}\frac{\partial(\bm{Rp})}{\partial\bm{R}} &\xlongequal{R對(duì)應(yīng)的李代數(shù)為\phi}\frac{\partial(\exp(\phi^{\land})\bm{p})}{\partial\phi} \\ & = \lim\limits_{Δ\phi\to0}\frac{\exp((\phi+Δ\phi)^{\land})\bm{p}-\exp(\phi^{\land})\bm{p}}{Δ\phi} \\ & 由 式(4.35)\\ & = \lim\limits_{Δ\phi\to0}\frac{\exp((\bm{J}_lΔ\phi)^{\land})\exp(\phi^{\land})\bm{p}-\exp(\phi^{\land})\bm{p}}{Δ\phi} \\ & = \lim\limits_{Δ\phi\to0}\frac{(\bm{I}+(\bm{J}_lΔ\phi)^{\land})\exp(\phi^{\land})\bm{p}-\exp(\phi^{\land})\bm{p}}{Δ\phi} \\ & = \lim\limits_{Δ\phi\to0}\frac{(\bm{J}_lΔ\phi)^{\land}\exp(\phi^{\land})\bm{p}}{Δ\phi} \\ & a^{\land} 等效于 a \times ,因此根據(jù)叉乘的性質(zhì) \\ & = \lim\limits_{Δ\phi\to0}\frac{-(\exp(\phi^{\land})\bm{p})^{\land}\bm{J}_lΔ\phi}{Δ\phi} \\ & = -(\bm{Rp})^{\land}\bm{J}_l \end{align*} ?R?(Rp)??R對(duì)應(yīng)的李代數(shù)為????(exp(?∧)p)?=Δ?→0lim?Δ?exp((?+Δ?)∧)p?exp(?∧)p?由式(4.35)=Δ?→0lim?Δ?exp((Jl?Δ?)∧)exp(?∧)p?exp(?∧)p?=Δ?→0lim?Δ?(I+(Jl?Δ?)∧)exp(?∧)p?exp(?∧)p?=Δ?→0lim?Δ?(Jl?Δ?)∧exp(?∧)p?a∧等效于a×,因此根據(jù)叉乘的性質(zhì)=Δ?→0lim?Δ??(exp(?∧)p)∧Jl?Δ??=?(Rp)∧Jl??
? ( exp ? ( ? ∧ ) p ) ? ? = ? ( R p ) ∧ J l \frac{\partial(\exp(\phi^{\land})\bm{p})}{\partial\phi} = -(\bm{Rp})^{\land}\bm{J}_l ???(exp(?∧)p)?=?(Rp)∧Jl?
——————
4.3.4 擾動(dòng)模型(左乘)【更簡(jiǎn)單 的導(dǎo)數(shù)計(jì)算模型】
對(duì) R \bm{R} R 進(jìn)行一次擾動(dòng) Δ R Δ\bm{R} ΔR ,看結(jié)果對(duì)于 擾動(dòng)的變化率。
設(shè)左擾動(dòng) Δ R Δ\bm{R} ΔR 對(duì)應(yīng)的李代數(shù) 為 φ \varphi φ
? ( R p ) ? φ = lim ? φ → 0 exp ? ( φ ∧ ) exp ? ( ? ∧ ) p ? exp ? ( ? ∧ ) p φ = lim ? φ → 0 ( I + φ ∧ ) exp ? ( ? ∧ ) p ? exp ? ( ? ∧ ) p φ = lim ? φ → 0 φ ∧ exp ? ( ? ∧ ) p φ = lim ? φ → 0 φ ∧ R p φ = lim ? φ → 0 ? ( R p ) ∧ φ φ = ? ( R p ) ∧ \begin{align*}\frac{\partial(\bm{Rp})}{\partial\varphi} &= \lim\limits_{\varphi\to0}\frac{\exp(\varphi^{\land})\exp(\phi^{\land})\bm{p}-\exp(\phi^{\land})\bm{p}}{\varphi}\\ &= \lim\limits_{\varphi\to0}\frac{(\bm{I} + \varphi^{\land})\exp(\phi^{\land})\bm{p}-\exp(\phi^{\land})\bm{p}}{\varphi}\\ &= \lim\limits_{\varphi\to0}\frac{\varphi^{\land}\exp(\phi^{\land})\bm{p}}{\varphi}\\ &= \lim\limits_{\varphi\to0}\frac{\varphi^{\land}\bm{Rp}}{\varphi}\\ &= \lim\limits_{\varphi\to0}\frac{-(\bm{Rp})^{\land}\varphi}{\varphi}\\ &= -(\bm{Rp})^{\land} \end{align*} ?φ?(Rp)??=φ→0lim?φexp(φ∧)exp(?∧)p?exp(?∧)p?=φ→0lim?φ(I+φ∧)exp(?∧)p?exp(?∧)p?=φ→0lim?φφ∧exp(?∧)p?=φ→0lim?φφ∧Rp?=φ→0lim?φ?(Rp)∧φ?=?(Rp)∧?
4.3.5 SE(3)上的李代數(shù)求導(dǎo)
假設(shè)某空間點(diǎn) p \bm{p} p 經(jīng)過(guò)一次變換 T \bm{T} T (對(duì)應(yīng)李代數(shù)為 ξ \bm{\xi} ξ), 得到 T p \bm{Tp} Tp
現(xiàn)在給 T \bm{T} T 左乘一個(gè)擾動(dòng) Δ T = exp ? ( Δ ξ ∧ ) Δ\bm{T} = \exp(Δ\bm{\xi}^{\land}) ΔT=exp(Δξ∧)
設(shè)擾動(dòng)項(xiàng)的李代數(shù)為 Δ ξ = [ Δ ρ , Δ ? ] T Δ\bm{\xi}=[Δ\bm{\rho},Δ\bm{\phi}]^T Δξ=[Δρ,Δ?]T,則
? ( 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 ] = d e f ( T p ) ? \begin{align*}\frac{\partial(\bm{Tp})}{\partial{Δ\bm{\xi}}} &= \lim\limits_{Δ\bm{\xi}\to0}\frac{\exp(Δ\bm{\xi}^{\land})\exp(\bm{\xi}^{\land})\bm{p}-\exp(\bm{\xi}^{\land})\bm{p}}{Δ\bm{\xi}} \\ &= \lim\limits_{Δ\bm{\xi}\to0}\frac{(\bm{I} +Δ\bm{\xi}^{\land})\exp(\bm{\xi}^{\land})\bm{p}-\exp(\bm{\xi}^{\land})\bm{p}}{Δ\bm{\xi}} \\ &= \lim\limits_{Δ\bm{\xi}\to0}\frac{Δ\bm{\xi}^{\land}\exp(\bm{\xi}^{\land})\bm{p}}{Δ\bm{\xi}} \\ &=\lim\limits_{Δ\bm{\xi}\to0} \frac{\begin{bmatrix} Δ\bm{\phi}^{\land} & \Delta\bm{\rho}\\ \bm{0}^T & 0 \end{bmatrix}\begin{bmatrix} \bm{Rp+t}\\ 1 \end{bmatrix}}{Δ\bm{\xi}}\\ &=\lim\limits_{Δ\bm{\xi}\to0} \frac{\begin{bmatrix} \Delta\bm{\phi}^{\land}(\bm{Rp+t})+\Delta\bm{\rho}\\ \bm{0}^T \end{bmatrix}}{[Δ\bm{\rho},Δ\bm{\phi}]^T} \\ & = \begin{bmatrix} \bm{I} & -(\bm{Rp+t})^{\land} \\ \bm{0}^T & \bm{0}^T \end{bmatrix} \\ &\overset{\mathrm{def}}{=}(\bm{Tp})^{\bigodot} \end{align*} ?Δξ?(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)??
$\overset{\mathrm{def}}{=}(\bm{Tp})^{\bigodot}$
4.4 Sophus應(yīng)用 【Code】
SO(3)、SE(3)
二維運(yùn)動(dòng)SO(2)和SE(2)
相似變換 Sim(3)
mkdir build && cd build
cmake ..
make
./useSophus
CMakeLists.txt
cmake_minimum_required(VERSION 2.8)project(useSophus)find_package(Sophus REQUIRED)
include_directories( ${Sophus_INCLUDE_DIRS})add_executable(useSophus useSophus.cpp)
target_link_libraries(useSophus ${Sophus_LIBRARIES})
#include<iostream>
#include<cmath>
#include<Eigen/Core>
#include<Eigen/Geometry>
#include "sophus/se3.h"using namespace std;
using namespace Eigen;/* sophus 的基本用法 */
int main(int argc, char **argv){// 沿 Z軸 轉(zhuǎn)90° 的旋轉(zhuǎn)矩陣Matrix3d R = AngleAxisd(M_PI/2, Vector3d(0, 0, 1)).toRotationMatrix();/* 四元數(shù) */Quaterniond q(R);Sophus::SO3 SO3_R(R);Sophus::SO3 SO3_q(q);cout << "SO(3) from matrix:\n" << SO3_R.matrix() << endl;cout << "SO(3) from quatenion:\n" << SO3_q.matrix() << endl;cout << "they are equal" << endl;return 0;
}
#include<iostream>
#include<cmath>
#include<Eigen/Core>
#include<Eigen/Geometry>
#include "sophus/se3.h"using namespace std;
using namespace Eigen;/* sophus 的基本用法 */
int main(int argc, char **argv){/* 使用 對(duì)數(shù)映射 獲得 李代數(shù)*/Matrix3d R = AngleAxisd(M_PI/2, Vector3d(0, 0, 1)).toRotationMatrix();Sophus::SO3 SO3_R(R);Vector3d so3 = SO3_R.log();cout << "so3 = " << so3.transpose() << endl;// hat 向量 ——> 反對(duì)稱矩陣cout << "so3 hat = \n" << Sophus::SO3::hat(so3)<< endl;// vee 反對(duì)稱 ——> 向量cout << "so3 hat vee = " << Sophus::SO3::vee(Sophus::SO3::hat(so3)).transpose() << endl;Vector3d update_so3(1e-4, 0, 0);// 假設(shè)更新量為這么多Sophus::SO3 SO3_updated =Sophus::SO3::exp(update_so3) * SO3_R;cout << "SO3 updated = \n" << SO3_updated.matrix() << endl;return 0;
}
#include<iostream>
#include<cmath>
#include<Eigen/Core>
#include<Eigen/Geometry>
#include "sophus/se3.h"using namespace std;
using namespace Eigen;/* sophus SE(3) 的基本用法 */
int main(int argc, char **argv){Matrix3d R = AngleAxisd(M_PI/2, Vector3d(0, 0, 1)).toRotationMatrix(); // 沿 Z軸 旋轉(zhuǎn) 90° 的旋轉(zhuǎn)矩陣Vector3d t(1, 0, 0); // 沿 X 軸平移1Sophus::SE3 SE3_Rt(R, t); // 從R,t 構(gòu)造 SE(3)Quaterniond q(R);Sophus::SE3 SE3_qt(q, t); // 從q, t 構(gòu)造 SE(3)cout << "SE3 from R, t = \n" << SE3_Rt.matrix() << endl;cout << "SE3 from q, t = \n" << SE3_qt.matrix() << endl; /* 李代數(shù)se(3) 是一個(gè) 6 維 向量*/typedef Eigen::Matrix<double, 6, 1> Vector6d;Vector6d se3 = SE3_Rt.log();cout << "se3 = " << se3.transpose() << endl;// hat 向量 ——> 反對(duì)稱矩陣cout << "se3 hat = \n" << Sophus::SE3::hat(se3)<< endl;// vee 反對(duì)稱 ——> 向量cout << "se3 hat vee = " << Sophus::SE3::vee(Sophus::SE3::hat(se3)).transpose() << endl;// 更新Vector6d update_se3;// 更新量update_se3.setZero();update_se3(0, 0) = 1e-4;Sophus::SE3 SE3_updated =Sophus::SE3::exp(update_se3) * SE3_Rt;cout << "SE3 updated = \n" << SE3_updated.matrix() << endl;return 0;
}
4.4.2 評(píng)估軌跡的誤差 【Code】
————————
考慮一條估計(jì)軌跡 T e s t i , i \bm{T}_{esti,i} Testi,i? 和真實(shí)軌跡 T g t , i \bm{T}_{gt,i} Tgt,i? ,其中 i = 1 , ? ? ? , N i= 1,···,N i=1,???,N
1、絕對(duì)誤差軌跡(Absolute Trajectory Error, ATE)
旋轉(zhuǎn)和平移誤差
A T E a l l = 1 N ∑ i = 1 N ∣ ∣ l o g ( T g t , i ? 1 T e s t i , i ) ∨ ∣ ∣ 2 2 ATE_{all}=\sqrt{\frac{1}{N}\sum\limits_{i=1}^{N}||log(\bm{T}_{gt,i}^{-1}\bm{T}_{esti,i})^{\vee}||_2^2} ATEall?=N1?i=1∑N?∣∣log(Tgt,i?1?Testi,i?)∨∣∣22??
- 每個(gè)位姿 李代數(shù) 的均方根誤差 (Root-Mean-Squared Error,RMSE)
2、絕對(duì)平移誤差(Average Translational Error)
A T E t r a n s = 1 N ∑ i = 1 N ∣ ∣ t r a n s ( T g t , i ? 1 T e s t i , i ) ∣ ∣ 2 2 ATE_{trans}=\sqrt{\frac{1}{N}\sum\limits_{i=1}^{N}||trans(\bm{T}_{gt,i}^{-1}\bm{T}_{esti,i})||_2^2} ATEtrans?=N1?i=1∑N?∣∣trans(Tgt,i?1?Testi,i?)∣∣22??
其中 trans
表示 取括號(hào)內(nèi)部變量的平移部分。
- 從整條軌跡上看,旋轉(zhuǎn)出現(xiàn)偏差后,隨后的軌跡在平移上也會(huì)出現(xiàn)誤差。
3、相對(duì)誤差
考慮 i i i 時(shí)刻到 i + Δ t i+\Delta t i+Δt 的運(yùn)動(dòng),相對(duì)位姿誤差(Relative Pose Error, RPE)
R P E a l l = 1 N ? Δ t ∑ i = 1 N ? Δ t ∣ ∣ l o g ( ( T g t , i ? 1 T g t , i + Δ t ) ? 1 ( T e s t i , i ? 1 T e s t i , i + Δ t ) ) ∨ ∣ ∣ 2 2 RPE_{all}=\sqrt{\frac{1}{N-\Delta t}\sum\limits_{i=1}^{N-\Delta t}||log((\bm{T}_{gt,i}^{-1}\bm{T}_{gt,i+\Delta t})^{-1}(\bm{T}_{esti,i}^{-1}\bm{T}_{esti,i+\Delta t}))^{\vee}||_2^2} RPEall?=N?Δt1?i=1∑N?Δt?∣∣log((Tgt,i?1?Tgt,i+Δt?)?1(Testi,i?1?Testi,i+Δt?))∨∣∣22??
R P E t r a n s = 1 N ? Δ t ∑ i = 1 N ? Δ t ∣ ∣ t r a n s ( ( T g t , i ? 1 T g t , i + Δ t ) ? 1 ( T e s t i , i ? 1 T e s t i , i + Δ t ) ) ∣ ∣ 2 2 RPE_{trans}=\sqrt{\frac{1}{N-\Delta t}\sum\limits_{i=1}^{N-\Delta t}||trans((\bm{T}_{gt,i}^{-1}\bm{T}_{gt,i+\Delta t})^{-1}(\bm{T}_{esti,i}^{-1}\bm{T}_{esti,i+\Delta t}))||_2^2} RPEtrans?=N?Δt1?i=1∑N?Δt?∣∣trans((Tgt,i?1?Tgt,i+Δt?)?1(Testi,i?1?Testi,i+Δt?))∣∣22??
————————
mkdir build && cd build
cmake ..
make
./trajectoryError
CMakeLists.txt
cmake_minimum_required(VERSION 2.8)project(trajectoryError)find_package(Sophus REQUIRED)
include_directories( ${Sophus_INCLUDE_DIRS})option(USE_UBUNTU_20 "Set to ON if you are using Ubuntu 20.04" OFF)
find_package(Pangolin REQUIRED)
if(USE_UBUNTU_20)message("You are using Ubuntu 20.04, fmt::fmt will be linked")find_package(fmt REQUIRED)set(FMT_LIBRARIES fmt::fmt)
endif()
include_directories(${Pangolin_INCLUDE_DIRS})add_executable(trajectoryError trajectoryError.cpp)
target_link_libraries(trajectoryError ${Sophus_LIBRARIES})
target_link_libraries(trajectoryError ${Pangolin_LIBRARIES} ${FMT_LIBRARIES})
trajectoryError.cpp
#include <iostream>
#include <fstream>
#include <unistd.h>
#include <pangolin/pangolin.h>
#include <sophus/se3.h>using namespace Sophus;
using namespace std;string groundtruth_file = "../groundtruth.txt";
string estimated_file = "../estimated.txt";typedef vector<Sophus::SE3, Eigen::aligned_allocator<Sophus::SE3>> TrajectoryType;void DrawTrajectory(const TrajectoryType >, const TrajectoryType &esti);TrajectoryType ReadTrajectory(const string &path);int main(int argc, char **argv) {TrajectoryType groundtruth = ReadTrajectory(groundtruth_file);TrajectoryType estimated = ReadTrajectory(estimated_file);assert(!groundtruth.empty() && !estimated.empty());assert(groundtruth.size() == estimated.size());// compute rmsedouble rmse = 0;for (size_t i = 0; i < estimated.size(); i++) {Sophus::SE3 p1 = estimated[i], p2 = groundtruth[i];double error = (p2.inverse() * p1).log().norm();rmse += error * error;}rmse = rmse / double(estimated.size());rmse = sqrt(rmse);cout << "RMSE = " << rmse << endl;DrawTrajectory(groundtruth, estimated);return 0;
}TrajectoryType ReadTrajectory(const string &path) {ifstream fin(path);TrajectoryType trajectory;if (!fin) {cerr << "trajectory " << path << " not found." << endl;return trajectory;}while (!fin.eof()) {double time, tx, ty, tz, qx, qy, qz, qw;fin >> time >> tx >> ty >> tz >> qx >> qy >> qz >> qw;Sophus::SE3 p1(Eigen::Quaterniond(qw, qx, qy, qz), Eigen::Vector3d(tx, ty, tz));trajectory.push_back(p1);}return trajectory;
}void DrawTrajectory(const TrajectoryType >, const TrajectoryType &esti) {// create pangolin window and plot the trajectorypangolin::CreateWindowAndBind("Trajectory Viewer", 1024, 768);glEnable(GL_DEPTH_TEST);glEnable(GL_BLEND);glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);pangolin::OpenGlRenderState s_cam(pangolin::ProjectionMatrix(1024, 768, 500, 500, 512, 389, 0.1, 1000),pangolin::ModelViewLookAt(0, -0.1, -1.8, 0, 0, 0, 0.0, -1.0, 0.0));pangolin::View &d_cam = pangolin::CreateDisplay().SetBounds(0.0, 1.0, pangolin::Attach::Pix(175), 1.0, -1024.0f / 768.0f).SetHandler(new pangolin::Handler3D(s_cam));while (pangolin::ShouldQuit() == false) {glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);d_cam.Activate(s_cam);glClearColor(1.0f, 1.0f, 1.0f, 1.0f);glLineWidth(2);for (size_t i = 0; i < gt.size() - 1; i++) {glColor3f(0.0f, 0.0f, 1.0f); // blue for ground truthglBegin(GL_LINES);auto p1 = gt[i], p2 = gt[i + 1];glVertex3d(p1.translation()[0], p1.translation()[1], p1.translation()[2]);glVertex3d(p2.translation()[0], p2.translation()[1], p2.translation()[2]);glEnd();}for (size_t i = 0; i < esti.size() - 1; i++) {glColor3f(1.0f, 0.0f, 0.0f); // red for estimatedglBegin(GL_LINES);auto p1 = esti[i], p2 = esti[i + 1];glVertex3d(p1.translation()[0], p1.translation()[1], p1.translation()[2]);glVertex3d(p2.translation()[0], p2.translation()[1], p2.translation()[2]);glEnd();}pangolin::FinishFrame();usleep(5000); // sleep 5 ms}}
4.5 相似變換群 與 李代數(shù)
單目視覺(jué) 相似變換群Sim(3)
尺度不確定性 與 尺度漂移
對(duì)位于空間的點(diǎn) p \bm{p} p ,在相機(jī)坐標(biāo)系下要經(jīng)過(guò)一個(gè)相似變換。
p ′ = [ s R t 0 T 1 ] p = s R p + t \bm{p}^{\prime}=\begin{bmatrix}s\bm{R} & \bm{t}\\ \bm{0}^T& 1 \end{bmatrix}\bm{p} = s\bm{Rp+t} p′=[sR0T?t1?]p=sRp+t
對(duì)于尺度因子,李群中的 s s s 即為李代數(shù)中 σ \sigma σ 的指數(shù)函數(shù)
4.6 小結(jié)
李群 SO(3) 和 SE(3) 以及對(duì)應(yīng)的李代數(shù) s o ( 3 ) \mathfrak{so}(3) so(3) 和 s e ( 3 ) \mathfrak{se}(3) se(3)
BCH 線性近似, 對(duì)位姿進(jìn)行擾動(dòng)并求導(dǎo)
習(xí)題
題1
驗(yàn)證SO(3)、SE(3)、Sim(3)關(guān)于乘法成群
特殊正交群SO(n) 旋轉(zhuǎn)矩陣群
特殊歐式群SE(n) n維歐式變換
題2
題4
√ 題5
證明:
原式等效于證明 R p ∧ R T R = ( R p ) ∧ R R p ∧ I = ( R p ) ∧ R R p ∧ = ( R p ) ∧ R 對(duì)于向量 v ∈ R 3 R p ∧ v = ( R p ) ∧ R v 上式等號(hào)左邊 表示向量 p , v 叉乘后所得向量根據(jù) R 旋轉(zhuǎn)。 等號(hào)右邊表示 向量 p , v 分別根據(jù) R 旋轉(zhuǎn)后叉乘,顯然得到同一個(gè)向量。 證畢。 \begin{align*} 原式等效于證明\\ \bm{Rp^{\land}R^TR} & = \bm{(Rp)}^{\land}\bm{R} \\ \bm{Rp^{\land}\bm{I}} & = \bm{(Rp)}^{\land}\bm{R} \\ \bm{Rp^{\land}} & = \bm{(Rp)}^{\land}\bm{R} \\ 對(duì)于向量 \bm{v} \in \mathbb{R}^3\\ \bm{Rp^{\land}}\bm{v} & = \bm{(Rp)}^{\land}\bm{R}\bm{v} \\ 上式等號(hào)左邊& 表示向量\bm{p,v}叉乘后所得向量根據(jù) \bm{R}旋轉(zhuǎn)。\\ 等號(hào)右邊表示& 向量\bm{p,v}分別根據(jù) \bm{R}旋轉(zhuǎn)后叉乘,顯然得到同一個(gè)向量。\\ 證畢。 \end{align*} 原式等效于證明Rp∧RTRRp∧IRp∧對(duì)于向量v∈R3Rp∧v上式等號(hào)左邊等號(hào)右邊表示證畢。?=(Rp)∧R=(Rp)∧R=(Rp)∧R=(Rp)∧Rv表示向量p,v叉乘后所得向量根據(jù)R旋轉(zhuǎn)。向量p,v分別根據(jù)R旋轉(zhuǎn)后叉乘,顯然得到同一個(gè)向量。?
√ 題6
根據(jù)題 5 的結(jié)論 : ( R p ) ∧ = R p ∧ R T exp ? ( ( R p ) ∧ ) = exp ? ( R p ∧ R T ) 級(jí)數(shù)展開 = ∑ n = 0 ∞ ( R p ∧ R T ) n N ! = ∑ n = 0 ∞ R p ∧ R T ? R p ∧ R T ? , ? ? ? , ? R p ∧ R T ? R p ∧ R T N ! 其中 R T R = I = ∑ n = 0 ∞ R ( p ∧ ) n R T N ! = R ∑ n = 0 ∞ ( p ∧ ) n N ! R T = R exp ? ( p ∧ ) R T \begin{align*}根據(jù)題5 的結(jié)論&:\bm{(Rp)}^{\land} = \bm{Rp^{\land}R^T} \\ \exp((\bm{Rp})^{\land})& = \exp(\bm{Rp^{\land}R^T}) \\ 級(jí)數(shù)展開\\ &= \sum\limits_{n=0}^{\infty}\frac{(\bm{Rp^{\land}R^T}) ^n}{N!} \\ &= \sum\limits_{n=0}^{\infty}\frac{\bm{Rp^{\land}R^T}·\bm{Rp^{\land}R^T}·,···,·\bm{Rp^{\land}R^T}·\bm{Rp^{\land}R^T}}{N!} \\ 其中 \bm{R^TR=I}\\ & = \sum\limits_{n=0}^{\infty}\frac{\bm{R(p^{\land})^nR^T}}{{N!} }\\ & = \bm{R} \sum\limits_{n=0}^{\infty}\frac{\bm{(p^{\land})^n}}{{N!} } \bm{R}^T \\ & = \bm{R}\exp(\bm{p}^{\land})\bm{R}^T \end{align*} 根據(jù)題5的結(jié)論exp((Rp)∧)級(jí)數(shù)展開其中RTR=I?:(Rp)∧=Rp∧RT=exp(Rp∧RT)=n=0∑∞?N!(Rp∧RT)n?=n=0∑∞?N!Rp∧RT?Rp∧RT?,???,?Rp∧RT?Rp∧RT?=n=0∑∞?N!R(p∧)nRT?=Rn=0∑∞?N!(p∧)n?RT=Rexp(p∧)RT?
證畢。
——————
6.2 SE(3)伴隨性質(zhì)
T exp ? ( ξ ∧ ) T ? 1 = T ∑ n = 0 ∞ ( ξ ∧ ) n n ! T ? 1 由于 T ? 1 T = I = ∑ n = 0 ∞ T ξ ∧ T ? 1 ? T ξ ∧ T ? 1 ? T ξ ∧ T ? 1 ? T ξ ∧ T ? 1 ? , ? ? ? , T ξ ∧ T ? 1 ? T ξ ∧ T ? 1 n ! = ∑ n = 0 ∞ ( T ξ ∧ T ? 1 ) n n ! = exp ? ( T ξ ∧ T ? 1 ) \begin{align*} \bm{T}\exp(\bm{\xi}^{\land})\bm{T}^{-1} &= \bm{T}\sum\limits_{n=0}^{\infty}\frac{(\bm{\xi}^{\land})^n}{n!}\bm{T}^{-1} \\ 由于 \bm{T^{-1}T=I} \\ & = \sum\limits_{n=0}^{\infty}\frac{\bm{T}\bm{\xi}^{\land}\bm{T}^{-1}·\bm{T}\bm{\xi}^{\land}\bm{T}^{-1}·\bm{T}\bm{\xi}^{\land}\bm{T}^{-1}·\bm{T}\bm{\xi}^{\land}\bm{T}^{-1}·,···, \bm{T}\bm{\xi}^{\land}\bm{T}^{-1}·\bm{T}\bm{\xi}^{\land}\bm{T}^{-1}}{n!} \\ & = \sum\limits_{n=0}^{\infty}\frac{(\bm{T}\bm{\xi}^{\land}\bm{T}^{-1})^n}{n!} \\ &= \exp(\bm{T}\bm{\xi}^{\land}\bm{T}^{-1}) \\ \end{align*} Texp(ξ∧)T?1由于T?1T=I?=Tn=0∑∞?n!(ξ∧)n?T?1=n=0∑∞?n!Tξ∧T?1?Tξ∧T?1?Tξ∧T?1?Tξ∧T?1?,???,Tξ∧T?1?Tξ∧T?1?=n=0∑∞?n!(Tξ∧T?1)n?=exp(Tξ∧T?1)?
ξ = [ ρ ? ] , ξ ∧ = [ ? ∧ ρ 0 T 0 ] , T = [ R t 0 T 1 ] , T ? 1 = [ R T ? R T t 0 T 1 ] \bm{\xi=}\begin{bmatrix}\bm{\rho}\\ \bm{\phi} \end{bmatrix},\bm{\xi}^{\land}=\begin{bmatrix}\bm{\phi}^{\land} & \bm{\rho} \\ \bm{0}^T & 0 \end{bmatrix},\bm{T}=\begin{bmatrix}\bm{R} & \bm{t}\\ \bm{0}^T & 1 \end{bmatrix},\bm{T}^{-1}=\begin{bmatrix}\bm{R}^T & -\bm{R}^T\bm{t}\\ \bm{0}^T & 1 \end{bmatrix} ξ=[ρ??],ξ∧=[?∧0T?ρ0?],T=[R0T?t1?],T?1=[RT0T??RTt1?]
則:
T ξ ∧ T ? 1 = [ R t 0 T 1 ] [ ? ∧ ρ 0 T 0 ] [ R T ? R T t 0 T 1 ] = [ R ? ∧ R ρ 0 T 0 ] [ R T ? R T t 0 T 1 ] = [ R ? ∧ R T ? R ? ∧ R T t + R ρ 0 T 0 ] 由題 5 的結(jié)論 R p ∧ R T = ( R p ) ∧ = [ ( R ? ) ∧ ? ( R ? ) ∧ t + R ρ 0 T 0 ] 對(duì)比 ξ , ξ ∧ 進(jìn)行轉(zhuǎn)換 = [ ? ( R ? ) ∧ t + R ρ R ? ] ∧ 由叉乘性質(zhì), = [ t ∧ R ? + R ρ R ? ] ∧ = [ R t ∧ R 0 R ] [ ρ ? ] ) ∧ = ( A d ( T ) ξ ) ∧ \begin{align*}\bm{T}\bm{\xi}^{\land}\bm{T}^{-1}&= \begin{bmatrix}\bm{R} & \bm{t}\\ \bm{0}^T & 1 \end{bmatrix}\begin{bmatrix}\bm{\phi}^{\land} & \bm{\rho} \\ \bm{0}^T & 0 \end{bmatrix}\begin{bmatrix}\bm{R}^T & -\bm{R}^T\bm{t}\\ \bm{0}^T & 1 \end{bmatrix}\\ &= \begin{bmatrix}\bm{R}\bm{\phi}^{\land} & \bm{R\rho}\\ \bm{0}^T & 0 \end{bmatrix}\begin{bmatrix}\bm{R}^T & -\bm{R}^T\bm{t}\\ \bm{0}^T & 1 \end{bmatrix}\\ &= \begin{bmatrix}\bm{R}\bm{\phi}^{\land}\bm{R}^T & -\bm{R}\bm{\phi}^{\land}\bm{R}^T\bm{t + \bm{R\rho}}\\ \bm{0}^T & 0 \end{bmatrix} \\ 由題5的結(jié)論& \bm{Rp^{\land}R^T} = \bm{(Rp)}^{\land} \\ &= \begin{bmatrix}(\bm{R}\bm{\phi})^{\land} & -(\bm{R}\bm{\phi})^{\land}\bm{t + \bm{R\rho}}\\ \bm{0}^T &0 \end{bmatrix}\\ & 對(duì)比 \bm{\xi, {\xi}^{\land}}進(jìn)行轉(zhuǎn)換\\ &= \begin{bmatrix}-(\bm{R}\bm{\phi})^{\land}\bm{t + \bm{R\rho}}\\ \bm{R}\bm{\phi} \end{bmatrix}^{\land}\\ 由叉乘性質(zhì), \\ &= \begin{bmatrix}\bm{t}^{\land}\bm{R}\bm{\phi}+ \bm{R\rho}\\ \bm{R}\bm{\phi} \end{bmatrix}^{\land}\\ &= \begin{bmatrix}\bm{R}& \bm{t}^{\land}\bm{R} \\ \bm{0} & \bm{R} \end{bmatrix}\begin{bmatrix}\bm{\rho}\\ \bm{\phi} \end{bmatrix})^{\land}\\ & = (Ad(\bm{T})\bm{\xi})^{\land} \end{align*} Tξ∧T?1由題5的結(jié)論由叉乘性質(zhì),?=[R0T?t1?][?∧0T?ρ0?][RT0T??RTt1?]=[R?∧0T?Rρ0?][RT0T??RTt1?]=[R?∧RT0T??R?∧RTt+Rρ0?]Rp∧RT=(Rp)∧=[(R?)∧0T??(R?)∧t+Rρ0?]對(duì)比ξ,ξ∧進(jìn)行轉(zhuǎn)換=[?(R?)∧t+RρR??]∧=[t∧R?+RρR??]∧=[R0?t∧RR?][ρ??])∧=(Ad(T)ξ)∧?
綜上:
T exp ? ( ξ ∧ ) T ? 1 = exp ? ( ( A d ( T ) ξ ) ∧ ) \bm{T}\exp(\bm{\xi}^{\land})\bm{T}^{-1}=\exp((Ad(\bm{T})\bm{\xi})^{\land}) Texp(ξ∧)T?1=exp((Ad(T)ξ)∧)
其中
A d ( T ) = [ R t ∧ R 0 R ] Ad(\bm{T})=\begin{bmatrix}\bm{R}& \bm{t}^{\land}\bm{R} \\ \bm{0} & \bm{R} \end{bmatrix} Ad(T)=[R0?t∧RR?]
證畢
————————————————
√ 題7
SO(3):
設(shè)右擾動(dòng) Δ R Δ\bm{R} ΔR 對(duì)應(yīng)的李代數(shù) 為 φ \varphi φ
? ( R p ) ? φ = lim ? φ → 0 exp ? ( ? ∧ ) exp ? ( φ ∧ ) p ? exp ? ( ? ∧ ) p φ = lim ? φ → 0 exp ? ( ? ∧ ) ( I + φ ∧ ) p ? exp ? ( ? ∧ ) p φ = lim ? φ → 0 exp ? ( ? ∧ ) φ ∧ p φ = lim ? φ → 0 R φ ∧ p φ 由題 5 : R p ∧ = ( R p ) ∧ R = lim ? φ → 0 ( R φ ) ∧ R p φ 由叉乘性質(zhì) = lim ? φ → 0 ? ( R p ) ∧ R φ φ = ? ( R p ) ∧ R \begin{align*}\frac{\partial(\bm{Rp})}{\partial\varphi} &= \lim\limits_{\varphi\to0}\frac{\exp(\phi^{\land})\exp(\varphi^{\land})\bm{p}-\exp(\phi^{\land})\bm{p}}{\varphi}\\ &= \lim\limits_{\varphi\to0}\frac{\exp(\phi^{\land})(\bm{I} + \varphi^{\land})\bm{p}-\exp(\phi^{\land})\bm{p}}{\varphi}\\ &= \lim\limits_{\varphi\to0}\frac{\exp(\phi^{\land})\varphi^{\land}\bm{p}}{\varphi}\\ &= \lim\limits_{\varphi\to0}\frac{\bm{R}\varphi^{\land}\bm{p}}{\varphi}\\ 由題5 : \bm{Rp^{\land}} & = \bm{(Rp)}^{\land}\bm{R} \\ &= \lim\limits_{\varphi\to0}\frac{(\bm{R}\varphi)^{\land}\bm{Rp}}{\varphi}\\ 由叉乘性質(zhì)\\ &= \lim\limits_{\varphi\to0}\frac{-(\bm{Rp})^{\land}\bm{R}\varphi}{\varphi}\\ & = -(\bm{Rp})^{\land}\bm{R} \end{align*} ?φ?(Rp)?由題5:Rp∧由叉乘性質(zhì)?=φ→0lim?φexp(?∧)exp(φ∧)p?exp(?∧)p?=φ→0lim?φexp(?∧)(I+φ∧)p?exp(?∧)p?=φ→0lim?φexp(?∧)φ∧p?=φ→0lim?φRφ∧p?=(Rp)∧R=φ→0lim?φ(Rφ)∧Rp?=φ→0lim?φ?(Rp)∧Rφ?=?(Rp)∧R?
SE(3):
假設(shè)某空間點(diǎn) p \bm{p} p 經(jīng)過(guò)一次變換 T \bm{T} T (對(duì)應(yīng)李代數(shù)為 ξ \bm{\xi} ξ), 得到 T p \bm{Tp} Tp
現(xiàn)在給 T \bm{T} T 右乘一個(gè)擾動(dòng) Δ T = exp ? ( Δ ξ ∧ ) Δ\bm{T} = \exp(Δ\bm{\xi}^{\land}) ΔT=exp(Δξ∧)
設(shè)擾動(dòng)項(xiàng)的李代數(shù)為 Δ ξ = [ Δ ρ , Δ ? ] T Δ\bm{\xi}=[Δ\bm{\rho},Δ\bm{\phi}]^T Δξ=[Δρ,Δ?]T,則
? ( T p ) ? Δ ξ = lim ? Δ ξ → 0 exp ? ( ξ ∧ ) exp ? ( Δ ξ ∧ ) p ? exp ? ( ξ ∧ ) p Δ ξ = lim ? Δ ξ → 0 exp ? ( ξ ∧ ) ( I + Δ ξ ∧ ) p ? exp ? ( ξ ∧ ) p Δ ξ = lim ? Δ ξ → 0 exp ? ( ξ ∧ ) Δ ξ ∧ p Δ ξ = lim ? Δ ξ → 0 [ R t 0 1 ] [ Δ ? ∧ Δ ρ 0 T 0 ] p Δ ξ 把 p 前的 矩陣當(dāng)做旋轉(zhuǎn)矩陣,結(jié)合向量旋轉(zhuǎn)的性質(zhì), = lim ? Δ ξ → 0 [ R t 0 1 ] [ Δ ? ∧ p + Δ ρ 0 ] Δ ξ = lim ? Δ ξ → 0 [ R Δ ? ∧ p + R Δ ρ 0 T ] [ Δ ρ , Δ ? ] T 將 Δ ρ , Δ ? 提出來(lái),方便求導(dǎo) 根據(jù) R p ∧ = ( R p ) ∧ R = lim ? Δ ξ → 0 [ ( R Δ ? ) ∧ R p + R Δ ρ 0 T ] [ Δ ρ , Δ ? ] T = lim ? Δ ξ → 0 [ ? ( R p ) ∧ R Δ ? + R Δ ρ 0 T ] [ Δ ρ , Δ ? ] T = [ R ? ( R p ) ∧ R 0 T 0 T ] \begin{align*}\frac{\partial(\bm{Tp})}{\partial{Δ\bm{\xi}}} &= \lim\limits_{Δ\bm{\xi}\to0}\frac{\exp(\bm{\xi}^{\land})\exp(Δ\bm{\xi}^{\land})\bm{p}-\exp(\bm{\xi}^{\land})\bm{p}}{Δ\bm{\xi}} \\ &= \lim\limits_{Δ\bm{\xi}\to0}\frac{\exp(\bm{\xi}^{\land})(\bm{I} +Δ\bm{\xi}^{\land})\bm{p}-\exp(\bm{\xi}^{\land})\bm{p}}{Δ\bm{\xi}} \\ &= \lim\limits_{Δ\bm{\xi}\to0}\frac{\exp(\bm{\xi}^{\land})Δ\bm{\xi}^{\land}\bm{p}}{Δ\bm{\xi}} \\ &=\lim\limits_{Δ\bm{\xi}\to0} \frac{\begin{bmatrix} \bm{R} & \bm{t}\\ 0 & 1 \end{bmatrix}\begin{bmatrix} Δ\bm{\phi}^{\land} & \Delta\bm{\rho}\\ \bm{0}^T & 0 \end{bmatrix}\bm{p}}{Δ\bm{\xi}}\\ 把\bm{p}前的&矩陣當(dāng)做旋轉(zhuǎn)矩陣,結(jié)合向量旋轉(zhuǎn)的性質(zhì),\\ &=\lim\limits_{Δ\bm{\xi}\to0} \frac{\begin{bmatrix} \bm{R} & \bm{t}\\ 0 & 1 \end{bmatrix}\begin{bmatrix} Δ\bm{\phi}^{\land}\bm{p} + \Delta\bm{\rho}\\ 0 \end{bmatrix}}{Δ\bm{\xi}}\\ &=\lim\limits_{Δ\bm{\xi}\to0} \frac{\begin{bmatrix} \bm{R}\Delta\bm{\phi}^{\land}\bm{p}+ \bm{R}\Delta\bm{\rho}\\ \bm{0}^T \end{bmatrix}}{[Δ\bm{\rho},Δ\bm{\phi}]^T} \\ 將&Δ\bm{\rho},Δ\bm{\phi} 提出來(lái),方便求導(dǎo)\\ & 根據(jù) \bm{Rp^{\land}} = \bm{(Rp)}^{\land}\bm{R} \\ &=\lim\limits_{Δ\bm{\xi}\to0} \frac{\begin{bmatrix} (\bm{R}\Delta\bm{\phi})^{\land}\bm{R}\bm{p}+\bm{R}\Delta\bm{\rho}\\ \bm{0}^T \end{bmatrix}}{[Δ\bm{\rho},Δ\bm{\phi}]^T} \\ &=\lim\limits_{Δ\bm{\xi}\to0} \frac{\begin{bmatrix} -(\bm{R}\bm{p})^{\land}\bm{R}\Delta\bm{\phi}+ \bm{R}\Delta\bm{\rho}\\ \bm{0}^T \end{bmatrix}}{[Δ\bm{\rho},Δ\bm{\phi}]^T} \\ & = \begin{bmatrix} \bm{R} & -(\bm{R}\bm{p})^{\land}\bm{R} \\ \bm{0}^T & \bm{0}^T \end{bmatrix} \\ \end{align*} ?Δξ?(Tp)?把p前的將?=Δξ→0lim?Δξexp(ξ∧)exp(Δξ∧)p?exp(ξ∧)p?=Δξ→0lim?Δξexp(ξ∧)(I+Δξ∧)p?exp(ξ∧)p?=Δξ→0lim?Δξexp(ξ∧)Δξ∧p?=Δξ→0lim?Δξ[R0?t1?][Δ?∧0T?Δρ0?]p?矩陣當(dāng)做旋轉(zhuǎn)矩陣,結(jié)合向量旋轉(zhuǎn)的性質(zhì),=Δξ→0lim?Δξ[R0?t1?][Δ?∧p+Δρ0?]?=Δξ→0lim?[Δρ,Δ?]T[RΔ?∧p+RΔρ0T?]?Δρ,Δ?提出來(lái),方便求導(dǎo)根據(jù)Rp∧=(Rp)∧R=Δξ→0lim?[Δρ,Δ?]T[(RΔ?)∧Rp+RΔρ0T?]?=Δξ→0lim?[Δρ,Δ?]T[?(Rp)∧RΔ?+RΔρ0T?]?=[R0T??(Rp)∧R0T?]?
——————————————
√ 題8
cmake的 find_package指令:
官方文檔
find_package(包名 版本 REQUIRED)
一些包需要 sudo make install
后才能被找到
LaTex
$\mathfrak{g}$
g \mathfrak{g} g
$\mathbb{R}$
R \mathbb{R} R
$\times$
× \times ×
$\varphi$
φ \varphi φ
$\Phi$
Φ \Phi Φ
$\overset{\mathrm{def}}{=}$
$\xlongequal{def}$
= d e f \overset{\mathrm{def}}{=} =def
= d e f \xlongequal{def} def