NOTE / 3/22/2020
Common Lie Group and Lie Algebra Formulae in SLAM SLAM Technical Notes SLAM VIO sensor fusion
In SLAM, rotation and pose are usually represented by rotation matrices or quaternions rather than ordinary vectors. Lie groups and Lie algebras are therefore introduced for optimization and filtering. Classic references include:
Joan Sola, A Micro Lie Theory for State Estimation in Robotics .
E. Eade, Lie Groups for 2D and 3D Transformations .
C. Forster, On-Manifold Preintegration for Real-Time Visual-Inertial Odometry .
T. D. Barfoot, State Estimation for Robotics .
G. Chirikjian, Stochastic Models, Information Theory, and Lie Groups .
Joan Sola’s article is particularly detailed and strongly recommended for understanding the concepts. It resolves most practical questions about using Lie groups and Lie algebras for attitude estimation. The formulae below are excerpts for reference.
Key properties of the exponential map
exp ( ( t + s ) τ ∧ ) = exp ( t τ ∧ ) exp ( s τ ∧ ) , exp ( t τ ∧ ) = exp ( τ ∧ ) t , exp ( − τ ∧ ) = exp ( τ ∧ ) − 1 , exp ( X τ ∧ X − 1 ) = X exp ( τ ∧ ) X − 1 . \begin{aligned}
\exp((t+s)\tau^\wedge)&=\exp(t\tau^\wedge)\exp(s\tau^\wedge),\\
\exp(t\tau^\wedge)&=\exp(\tau^\wedge)^t,\\
\exp(-\tau^\wedge)&=\exp(\tau^\wedge)^{-1},\\
\exp(\mathcal X\tau^\wedge\mathcal X^{-1})&=\mathcal X\exp(\tau^\wedge)\mathcal X^{-1}.
\end{aligned} exp (( t + s ) τ ∧ ) exp ( t τ ∧ ) exp ( − τ ∧ ) exp ( X τ ∧ X − 1 ) = exp ( t τ ∧ ) exp ( s τ ∧ ) , = exp ( τ ∧ ) t , = exp ( τ ∧ ) − 1 , = X exp ( τ ∧ ) X − 1 .
Two plus and minus operators
right- ⊕ : Y = X ⊕ X τ = X Exp ( X τ ) ∈ M , right- ⊖ : X τ = Y ⊖ X = Log ( X − 1 Y ) ∈ T X M . \begin{aligned}
\text{right-}\oplus:\quad
\mathcal Y&=\mathcal X\oplus{}^\mathcal X\tau
=\mathcal X\operatorname{Exp}({}^\mathcal X\tau)\in\mathcal M,\\
\text{right-}\ominus:\quad
{}^\mathcal X\tau&=\mathcal Y\ominus\mathcal X
=\operatorname{Log}(\mathcal X^{-1}\mathcal Y)\in T_\mathcal X\mathcal M.
\end{aligned} right- ⊕ : Y right- ⊖ : X τ = X ⊕ X τ = X Exp ( X τ ) ∈ M , = Y ⊖ X = Log ( X − 1 Y ) ∈ T X M .
left- ⊕ : Y = ε τ ⊕ X = Exp ( ε τ ) X ∈ M , left- ⊖ : ε τ = Y ⊖ X = Log ( Y − 1 X ) ∈ T ε M . \begin{aligned}
\text{left-}\oplus:\quad
\mathcal Y&={}^{\varepsilon}\tau\oplus\mathcal X
=\operatorname{Exp}({}^{\varepsilon}\tau)\mathcal X\in\mathcal M,\\
\text{left-}\ominus:\quad
{}^{\varepsilon}\tau&=\mathcal Y\ominus\mathcal X
=\operatorname{Log}(\mathcal Y^{-1}\mathcal X)\in T_{\varepsilon}\mathcal M.
\end{aligned} left- ⊕ : Y left- ⊖ : ε τ = ε τ ⊕ X = Exp ( ε τ ) X ∈ M , = Y ⊖ X = Log ( Y − 1 X ) ∈ T ε M .
The adjoint
Ad X : m → m , τ ∧ ↦ X τ ∧ X − 1 , Linear: Ad X ( a τ ∧ + b σ ∧ ) = a Ad X ( τ ∧ ) + b Ad X ( σ ∧ ) , Homomorphism: Ad X ( Ad Y ( τ ∧ ) ) = Ad X Y ( τ ∧ ) . \begin{aligned}
\operatorname{Ad}_{\mathcal X}:\mathfrak m&\to\mathfrak m,
&\tau^\wedge&\mapsto\mathcal X\tau^\wedge\mathcal X^{-1},\\
\text{Linear:}\quad
\operatorname{Ad}_{\mathcal X}(a\tau^\wedge+b\sigma^\wedge)
&=a\operatorname{Ad}_{\mathcal X}(\tau^\wedge)
+b\operatorname{Ad}_{\mathcal X}(\sigma^\wedge),\\
\text{Homomorphism:}\quad
\operatorname{Ad}_{\mathcal X}(\operatorname{Ad}_{\mathcal Y}(\tau^\wedge))
&=\operatorname{Ad}_{\mathcal X\mathcal Y}(\tau^\wedge).
\end{aligned} Ad X : m Linear: Ad X ( a τ ∧ + b σ ∧ ) Homomorphism: Ad X ( Ad Y ( τ ∧ )) → m , = a Ad X ( τ ∧ ) + b Ad X ( σ ∧ ) , = Ad X Y ( τ ∧ ) . τ ∧ ↦ X τ ∧ X − 1 ,
The adjoint matrix
A d X : R m → R m , X τ ↦ ε τ = A d X X τ , A d X τ = ( X τ ∧ X − 1 ) ∨ , X ⊕ τ = ( A d X τ ) ⊕ X , A d X − 1 = ( A d X ) − 1 , A d X A d Y = A d X Y . \begin{aligned}
\mathbf{Ad}_{\mathcal X}:\mathbb R^m&\to\mathbb R^m,
&{}^\mathcal X\tau&\mapsto{}^\varepsilon\tau
=\mathbf{Ad}_{\mathcal X}{}^\mathcal X\tau,\\
\mathbf{Ad}_{\mathcal X}\tau&=(\mathcal X\tau^\wedge\mathcal X^{-1})^\vee,\\
\mathcal X\oplus\tau&=(\mathbf{Ad}_{\mathcal X}\tau)\oplus\mathcal X,\\
\mathbf{Ad}_{\mathcal X^{-1}}&=(\mathbf{Ad}_{\mathcal X})^{-1},\\
\mathbf{Ad}_{\mathcal X}\mathbf{Ad}_{\mathcal Y}
&=\mathbf{Ad}_{\mathcal X\mathcal Y}.
\end{aligned} Ad X : R m Ad X τ X ⊕ τ Ad X − 1 Ad X Ad Y → R m , = ( X τ ∧ X − 1 ) ∨ , = ( Ad X τ ) ⊕ X , = ( Ad X ) − 1 , = Ad X Y . X τ ↦ ε τ = Ad X X τ ,
Jacobian
X D f ( X ) D X = lim τ → 0 f ( X ⊕ τ ) ⊖ f ( X ) τ = lim τ → 0 Log ( f ( X ) − 1 f ( X Exp ( τ ) ) ) τ = ∂ Log ( f ( X ) − 1 f ( X Exp ( τ ) ) ) ∂ τ ∣ τ = 0 . \begin{aligned}
\frac{{}^\mathcal XDf(\mathcal X)}{D\mathcal X}
&=\lim_{\tau\to0}\frac{f(\mathcal X\oplus\tau)\ominus f(\mathcal X)}{\tau}\\
&=\lim_{\tau\to0}\frac{\operatorname{Log}(f(\mathcal X)^{-1}f(\mathcal X\operatorname{Exp}(\tau)))}{\tau}\\
&=\left.\frac{\partial\operatorname{Log}(f(\mathcal X)^{-1}f(\mathcal X\operatorname{Exp}(\tau)))}{\partial\tau}\right|_{\tau=0}.
\end{aligned} D X X D f ( X ) = τ → 0 lim τ f ( X ⊕ τ ) ⊖ f ( X ) = τ → 0 lim τ Log ( f ( X ) − 1 f ( X Exp ( τ ))) = ∂ τ ∂ Log ( f ( X ) − 1 f ( X Exp ( τ ))) τ = 0 .
Relationship between different Jacobians:
ϵ D f ( X ) D X = A d f ( X ) X D f ( X ) D X A d X − 1 . \frac{{}^\epsilon Df(\mathcal X)}{D\mathcal X}
=\mathbf{Ad}_{f(\mathcal X)}
\frac{{}^\mathcal XDf(\mathcal X)}{D\mathcal X}
\mathbf{Ad}_{\mathcal X}^{-1}. D X ϵ D f ( X ) = Ad f ( X ) D X X D f ( X ) Ad X − 1 .
Approximations:
Exp ( τ + δ τ ) ≈ Exp ( τ ) Exp ( J r ( τ ) δ τ ) , Exp ( τ ) Exp ( δ τ ) ≈ Exp ( τ + J r ( τ ) − 1 δ τ ) , Log ( Exp ( τ ) Exp ( δ τ ) ) ≈ τ + J r ( τ ) − 1 δ τ . \begin{aligned}
\operatorname{Exp}(\tau+\delta\tau)&\approx\operatorname{Exp}(\tau)\operatorname{Exp}(J_r(\tau)\delta\tau),\\
\operatorname{Exp}(\tau)\operatorname{Exp}(\delta\tau)&\approx\operatorname{Exp}(\tau+J_r(\tau)^{-1}\delta\tau),\\
\operatorname{Log}(\operatorname{Exp}(\tau)\operatorname{Exp}(\delta\tau))&\approx\tau+J_r(\tau)^{-1}\delta\tau.
\end{aligned} Exp ( τ + δ τ ) Exp ( τ ) Exp ( δ τ ) Log ( Exp ( τ ) Exp ( δ τ )) ≈ Exp ( τ ) Exp ( J r ( τ ) δ τ ) , ≈ Exp ( τ + J r ( τ ) − 1 δ τ ) , ≈ τ + J r ( τ ) − 1 δ τ .
Exp ( τ + δ τ ) ≈ Exp ( J l ( τ ) δ τ ) Exp ( τ ) , Exp ( δ τ ) Exp ( τ ) ≈ Exp ( τ + J l ( τ ) − 1 δ τ ) , Log ( Exp ( δ τ ) Exp ( τ ) ) ≈ τ + J l ( τ ) − 1 δ τ . \begin{aligned}
\operatorname{Exp}(\tau+\delta\tau)&\approx\operatorname{Exp}(J_l(\tau)\delta\tau)\operatorname{Exp}(\tau),\\
\operatorname{Exp}(\delta\tau)\operatorname{Exp}(\tau)&\approx\operatorname{Exp}(\tau+J_l(\tau)^{-1}\delta\tau),\\
\operatorname{Log}(\operatorname{Exp}(\delta\tau)\operatorname{Exp}(\tau))&\approx\tau+J_l(\tau)^{-1}\delta\tau.
\end{aligned} Exp ( τ + δ τ ) Exp ( δ τ ) Exp ( τ ) Log ( Exp ( δ τ ) Exp ( τ )) ≈ Exp ( J l ( τ ) δ τ ) Exp ( τ ) , ≈ Exp ( τ + J l ( τ ) − 1 δ τ ) , ≈ τ + J l ( τ ) − 1 δ τ .
Relationship between the left and right Jacobians:
A d Exp ( τ ) = J l ( τ ) J r ( τ ) − 1 , J r ( − τ ) = J l ( τ ) . \mathbf{Ad}_{\operatorname{Exp}(\tau)}=J_l(\tau)J_r(\tau)^{-1},
\qquad
J_r(-\tau)=J_l(\tau). Ad Exp ( τ ) = J l ( τ ) J r ( τ ) − 1 , J r ( − τ ) = J l ( τ ) .
Elementary Jacobian blocks:
J X X − 1 = − A d X , J X X ∘ Y = A d Y − 1 , J Y X ∘ Y = I , J X Log ( X ) = J r − 1 ( τ ) , J X X ⊕ τ = A d Exp ( τ ) − 1 , J τ X ⊕ τ = J r , J X Y ⊖ X = − J l ( τ ) − 1 , J Y Y ⊖ X = J r ( τ ) − 1 . \begin{aligned}
\mathbf J_{\mathcal X}^{\mathcal X^{-1}}&=-\mathbf{Ad}_{\mathcal X},&
\mathbf J_{\mathcal X}^{\mathcal X\circ\mathcal Y}&=\mathbf{Ad}_{\mathcal Y^{-1}},&
\mathbf J_{\mathcal Y}^{\mathcal X\circ\mathcal Y}&=\mathbf I,\\
\mathbf J_{\mathcal X}^{\operatorname{Log}(\mathcal X)}&=\mathbf J_r^{-1}(\tau),&
\mathbf J_{\mathcal X}^{\mathcal X\oplus\tau}&=\mathbf{Ad}_{\operatorname{Exp}(\tau)}^{-1},&
\mathbf J_{\tau}^{\mathcal X\oplus\tau}&=\mathbf J_r,\\
\mathbf J_{\mathcal X}^{\mathcal Y\ominus\mathcal X}&=-\mathbf J_l(\tau)^{-1},&
\mathbf J_{\mathcal Y}^{\mathcal Y\ominus\mathcal X}&=\mathbf J_r(\tau)^{-1}.
\end{aligned} J X X − 1 J X Log ( X ) J X Y ⊖ X = − Ad X , = J r − 1 ( τ ) , = − J l ( τ ) − 1 , J X X ∘ Y J X X ⊕ τ J Y Y ⊖ X = Ad Y − 1 , = Ad Exp ( τ ) − 1 , = J r ( τ ) − 1 . J Y X ∘ Y J τ X ⊕ τ = I , = J r ,
Uncertainty on manifolds and covariance propagation
Σ X = E ( ( X ⊖ X ˉ ) ( X ⊖ X ˉ ) T ) ∈ R m × m , ε Σ X = A d X X Σ X A d X T , Σ Y ≈ D f D X Σ X ( D f D X ) T . \begin{aligned}
\Sigma_{\mathcal X}&=\mathbb E\left((\mathcal X\ominus\bar{\mathcal X})(\mathcal X\ominus\bar{\mathcal X})^\mathsf T\right)\in\mathbb R^{m\times m},\\
{}^\varepsilon\Sigma_{\mathcal X}&=\mathbf{Ad}_{\mathcal X}\,{}^\mathcal X\Sigma_{\mathcal X}\,\mathbf{Ad}_{\mathcal X}^\mathsf T,\\
\Sigma_{\mathcal Y}&\approx\frac{Df}{D\mathcal X}\Sigma_{\mathcal X}\left(\frac{Df}{D\mathcal X}\right)^\mathsf T.
\end{aligned} Σ X ε Σ X Σ Y = E ( ( X ⊖ X ˉ ) ( X ⊖ X ˉ ) T ) ∈ R m × m , = Ad X X Σ X Ad X T , ≈ D X D f Σ X ( D X D f ) T .
Discrete integration on manifolds
X k = X k − 1 ⊕ τ k = X k − 1 Exp ( τ k ) . \mathcal X_k=\mathcal X_{k-1}\oplus\tau_k
=\mathcal X_{k-1}\operatorname{Exp}(\tau_k). X k = X k − 1 ⊕ τ k = X k − 1 Exp ( τ k ) .
The 3D rotation group S O ( 3 ) \mathrm{SO}(3) SO ( 3 )
Exponential and logarithm
R = Exp ( θ u ) = I + sin θ [ u ] × + ( 1 − cos θ ) [ u ] × 2 ∈ R 3 × 3 . \mathbf R=\operatorname{Exp}(\theta\mathbf u)
=\mathbf I+\sin\theta[\mathbf u]_\times+
(1-\cos\theta)[\mathbf u]_\times^2
\in\mathbb R^{3\times3}. R = Exp ( θ u ) = I + sin θ [ u ] × + ( 1 − cos θ ) [ u ] × 2 ∈ R 3 × 3 .
θ u = Log ( R ) = θ ( R − R T ) ∨ 2 sin θ , θ = cos − 1 ( tr ( R ) − 1 2 ) . \theta\mathbf u=\operatorname{Log}(\mathbf R)
=\frac{\theta(\mathbf R-\mathbf R^\mathsf T)^\vee}{2\sin\theta},
\qquad
\theta=\cos^{-1}\left(\frac{\operatorname{tr}(\mathbf R)-1}{2}\right). θ u = Log ( R ) = 2 sin θ θ ( R − R T ) ∨ , θ = cos − 1 ( 2 tr ( R ) − 1 ) .
Adjoint
A d R = R . \mathbf{Ad}_{\mathbf R}=\mathbf R. Ad R = R .
Elementary Jacobian blocks
J R R − 1 = − R , J Q Q R = R T , J R Q R = I , J R R v = − R [ v ] × , J v R v = R , J R R ⊕ θ = R ( θ ) T , J θ R ⊕ θ = J r ( θ ) , J Q Q ⊖ R = J r ( θ ) − 1 , J R Q ⊖ R = − J l ( θ ) − 1 , J l = J r T , J l − 1 = J r − T . \begin{aligned}
\mathbf J_{\mathbf R}^{\mathbf R^{-1}}&=-\mathbf R,&
\mathbf J_{\mathbf Q}^{\mathbf Q\mathbf R}&=\mathbf R^\mathsf T,&
\mathbf J_{\mathbf R}^{\mathbf Q\mathbf R}&=\mathbf I,\\
\mathbf J_{\mathbf R}^{\mathbf R\mathbf v}&=-\mathbf R[\mathbf v]_\times,&
\mathbf J_{\mathbf v}^{\mathbf R\mathbf v}&=\mathbf R,&
\mathbf J_{\mathbf R}^{\mathbf R\oplus\theta}&=\mathbf R(\theta)^\mathsf T,\\
\mathbf J_{\theta}^{\mathbf R\oplus\theta}&=\mathbf J_r(\theta),&
\mathbf J_{\mathbf Q}^{\mathbf Q\ominus\mathbf R}&=\mathbf J_r(\theta)^{-1},&
\mathbf J_{\mathbf R}^{\mathbf Q\ominus\mathbf R}&=-\mathbf J_l(\theta)^{-1},\\
\mathbf J_l&=\mathbf J_r^\mathsf T,&
\mathbf J_l^{-1}&=\mathbf J_r^{-\mathsf T}.
\end{aligned} J R R − 1 J R Rv J θ R ⊕ θ J l = − R , = − R [ v ] × , = J r ( θ ) , = J r T , J Q QR J v Rv J Q Q ⊖ R J l − 1 = R T , = R , = J r ( θ ) − 1 , = J r − T . J R QR J R R ⊕ θ J R Q ⊖ R = I , = R ( θ ) T , = − J l ( θ ) − 1 ,
In many cases, an S E ( 3 ) \mathrm{SE}(3) SE ( 3 ) or S i m ( 3 ) \mathrm{Sim}(3) Sim ( 3 ) Lie group is unnecessary: only rotation is matrix-valued, while translation and scale can be treated as vectors.