Lie Group For Beginners

Abstract

This tutorial is to help those who have never used Lie Groups but want to use this useful tool. As the manifold topic is too large to cover in this single tutorial, we will concentrate those facts that are necessary for computing Jacobian matrix which will be used in future optimization. Some example codes will be given for each part of the tutorial. If you have any questions about this tutorial, please email to me.

Lie Group: SO(3) and SE(3)

  1. SO(3): special orthogonal group.
  2. SE(3): special euclidean group.

A group is associated with some space and the operations that can applied on the elements in this space. We are familiar with 3D Euclidean space (vector space). For example, a=(1,2,3),b=(3,4,5) are elements of the vector space, the plus operator can be applied by c=a+b , which is also an element of the vector space. Obviously SO(3) is not in the vector space, as we cannot simply plus two rotation matrix. However, SO(3) and SE(3) belongs to the Lie Group, which has five properties. We use C for SO(3) and T for SE(3). Suppose C1,C2,C3SO(3) and T1,T2,T3SE(3) :

  1. C,T are also a differential manifold.
  2. C1C2SO(3) and T1T2SE(3) .
  3. Associativity: (C1C2)C3 = C1(C2C3) . (T1T2)T3=T1(T2T3)
  4. Identity: C1I=IC1=C1 , T1I=IT1=T1
  5. Invertibility: C11SO(3) , T11SE(3)

Necessary and sufficient conditions fro SO(3): CTC=I,det(C)=1 , and for SE(3): T=[C,t0,1],where,CSO(3),tR3

Lie Algebras

Every Lie group associates with a Lie Algebras, which is in vector space V . More specifically, the Lie Algebras is skew matrix (a square real matrix (subspace) of vector space.), and with some operators Lie brackets.

  1. Closure: [X,Y]V
  2. Bilinearity: [aX+bY,Z] = a[X,Z] +b[Y,Z]
  3. Alternating: [X,X] = 0
  4. Jacobi identity: [X,[Y,Z]]=[Z,[Y,X]]=[Y,[Z,X]]
    Above is the general form of Lie brackets for Lie Algebras. Next we will see two special Lie Algebras, so(3),se(3) .

Rotation RO(3)

The Lie algebra associated with SO(3) is given by
1. Vector space: so(3)={Φ=ϕR3×3|ϕR3}
2. Field: R
3. Lie bracket: [Φ1,Φ2]=Φ1Φ2Φ2Φ1
Based on Lie bracket defined above, we can easily tested that, the four properties (general Lie Algebras) holds.

Pose SE(3)

The Lie algebra associated with SE(3) is given by
1. Vector space, se(3)={Ξ=ξR4×4|ξR6}
2. Field: R
3. Lie bracket: [Ξ1,Ξ2]=Ξ1Ξ2Ξ1Ξ2
where

ξ=[ρϕ]=[ϕ,ρ0,1]R4×4

Exponential Map

We have defined Lie Group and Lie Algebras above, here we will study Exponential Map, that will connect those two concepts. \
The matrix exponential map and matrix logarithms are defined:

\begin{equation}\label{ep:exponentialA}
\begin{split}
exp(A) &= 1 + A + \frac{1}{2!}A^2 +\frac{1}{3!}A^3+... \\
ln(A) &= \sum_{n=1}^{\infty}\frac{(-1)^{n-1}}{n}(A-1)^n
\end{split}
\end{equation}

Rotation SO(3)

Let CSO(3),ϕso(3) , according to Eq. ???

\begin{equation}\label{eq:em:RSo3}
\begin{split}
C &= exp(\phi^\wedge) = \sum_{n=1}^{\infty} \frac{1}{n!}(\phi^\wedge)^n\\
\phi &= ln(C)^\vee\\
\end{split}
\end{equation}

We provide a deeper perspective on the not unique ϕ problem in Section ??? appendix.\
A closed form solution for both cases are given by
Cϕ=cos(ϕ)I+(1cos(ϕ))aaT+sin(ϕ)a=acos(tr(C)12)+2πm

where ϕ=ϕa . while the unit vector a is the eigen vector, whose eigen value is 1.

Pose SE(3)

Similarly we define the following TSE(3),ξse(3), according to Eq. ???

T=exp(ξ)ξ=n=01n!(ξ)n=ln(T)

We also give a closed form solution for the above equations.
Tρ=[C,r0,1]=J1r

where J is the left Jacobian matrix.
\begin{equation}\label{eq:EM:Pse:jac}
\begin{split}
J &= \sum_{n=0}^{\infty} \frac{1}{(n+1)!}(\phi^\wedge)^n\\
r &= J\rho\\
\end{split}
\end{equation}

Jacobian

The concept of “Jacobian” here is different from the one used in optimization.This Jacobian matrix is defined in Eq. ??? and can be used in two sceneries: transforming ξ to r in SE(3), and also this J can be used in derivatives.\
As we defined Jacobian matrix, we can give the closed form solution to it in the same way with SO(3).

J=sin(ϕ)ϕI+(1sin(ϕ)ϕ)aaT+1cos(ϕ)ϕa

In the same way, we can also give the expression of J1,JTJ .

Adjoint

This section can be covered later.

Baker Campbell Hausdorff

For scalar values, we have

exp(a)exp(b)=exp(a+b)

BCH can be used to do this job (of course the format is different for Lie groups). After some derivation we have
exp(A+B)=lima(exp(A/α)exp(B/α))α

Rotation SO(3)

For the special case of SO(3), we have

ln(C1C2){J(ϕ2)1ϕ1+ϕ2,ϕ1+J(ϕ1)1ϕ2,ifϕ1smallifϕ2small

Pose SE(3)

Similarly we can get

ln(T1T2){J(ξ2)1ξ1+ξ2,ξ1+J(ξ1)1ξ2,ifξ1smallifξ2small

Distance, volume, Integration

Rotation SO(3)

We define the distance between two SO(3)

ϕ12=ln(CT1C2)

Perturbing ϕ by a little results in a new Rotation matrix C
ln(CCT)ln(exp(Jlδϕ)CCT)=Jlδϕ

Pose SE(3)

The distance

ξ12=ln(T11T2)

The perturbing
ln(TTT)Jδξ

Calculus and Optimization

Rotation matrix

We can derive that

Cvϕ=(Cv)J

If we have complex function u(x),withx=Cv , we have
uϕ=uxxϕ=ux(Cv)J

After some substuting, we have simpler case:
Cvψ=(Cv)

which has no J.

Poses

Let TSE(3) , pHC , we can find that:

Tp=exp(ξ)Topp(1+ξ)Topp=Topp+ξTopp=Topp+(Topp)ξ

So we can get the derivatives easily:
Tpξ=(Topp)

Appendix

why ϕ is not unique

Some background knowledge. The first equation is about the properties of skew synmetric matrix. Using this properties, we can simplify the high order on skew matrix to scalar numbers.

\begin{equation}\label{eq:Apwhy}
\begin{split}
w \in \mathbb{R}^3, (w^{\wedge})^3 &= - (w^Tw)w^{\wedge} \\
sin(\theta) &= \frac{1}{1!}\theta + \frac{-1}{3!}\theta^3+...\\
cos(\theta) & = 1+\frac{-1}{2!}\theta^2 + \frac{1}{4!}\theta^4+...
\end{split}
\end{equation}

Let ϕ=ϕa,ϕR,aR3,|a|=1 , refer to Eq. ??? and Eq. ??? we can expand the exponential map as
exp(ϕ)=exp(ϕa)=cos(ϕ)I+(1cos(ϕ))aaT+sin(ϕ)a

As ϕ is all inside the cos and sin functions, so the exp value will be satified with infinite number of ϕ+2πm,muint . Note that rotation matrix is unique, but the 3-parameter values can not be unique, so there is a singularity problem in 3-parameter rotation matrix.

Determinant of Rotation matrix

Exponential map provide another way to see the determinant of rotation matrix. Here we introduce a theory in general matrix. For any square matrix A with complex elements, we have

det(exp(A))=exp(tr(A))

In our case

det(C)=det(exp(ϕ))=exp(tr(ϕ))=exp(0)=1

Example BA

Using 3D points

We give a simplified BA example here, where the 3D points are known as ground truth, and the pose is to be estimated. let K be the intrinsic matrix, PG,PL be the 3D points in global and local frame, u,v be the measured pixel points.

PLobj=R1(PGT)=KPL/PL(3)[uv]

Jacobian matrix. Derive on R and t of the objective functions. Let v=(PGT) , δ is perturb value on R. We can define the derivative of PL on variables.
R1vPLδPLtx=(exp(δ)Rop)1v=R1opexp(δ)1v=R1opexp(δ)vR1op(Iδ)v=R1opvR1opδv=R1opv+R1opvδ=R1opv=R1([1;0;0]);

We then define the derivative of objective function f on variables.
f=K(PL)PL(3)PLPL(3)(PL(3))2

Please refer to the code "run_so3_spBA.m" .

Using homogeneous coordinates

In the above code, we use 3D points to do the BA, which is not convenient. In this part, we will give you a homogeneous coordinates (HC) example. You can refer to the lecture given by Prof. Cyrill Stachniss. The HC can be regarded as another cooridinates with axis and origin.
So we can use SE(3) to represent the transformations

TPGPLPIobj=[R,t0,1]=TPL=T1PG=Keye(3,4)PL=PIPI(3)uv1

Jacobian matrix: we can use perturbation to derive derivatives on T, which is very straightforward.
T1pPLξPIξobjξ=(exp(ξ)Top)1p=T1opexp(ξ)1p=T1opexp(ξ)pT1op(1ξ)p=T1oppT1opξp=T1oppT1oppξ=T1opp=Keye(3,4)PLξ=PIξPIξ(3)uv1

Amazing!
Comparison: run : run_so3_spBA , it takes 20 iterations to converge to the optimal values. If we run run_se3_hc , it takes just 5 iterations to converge. So we can draw a conclusion that, it’s more efficient using Lie Group SE(3) to converge.

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
李群的一本书,是扫描版,书的质量不错。 This book is intended for a one year graduate course on Lie groups and Lie algebras. The author proceeds beyond the representation theory of compact Lie groups (which is the basis of many texts)and provides a carefully chosen range of material to give the student the bigger picture. For compact Lie groups, the Peter-Weyl theorem, conjugacy of maximal tori (two proofs), Weyl character formula and more are covered. The book continues with the study of complex analytic groups, then general noncompact Lie groups, including the Coxeter presentation of the Weyl group, the Iwasawa and Bruhat decompositions, Cartan decomposition, symmetric spaces, Cayley transforms, relative root systems, Satake diagrams, extended Dynkin diagrams and a survey of the ways Lie groups may be embedded in one another. The book culminates in a "topics" section giving depth to the student's understanding of representation theory, taking the Frobenius-Schur duality between the representation theory of the symmetric group and the unitary groups as a unifying theme, with many applications in diverse areas such as random matrix theory, minors of Toeplitz matrices, symmetric algebra decompositions, Gelfand pairs, Hecke algebras, representations of finite general linear groups and the cohomology of Grassmannians and flag varieties.   Daniel Bump is Professor of Mathematics at Stanford University. His research is in automorphic forms, representation theory and number theory. He is a co-author of GNU Go, a computer program that plays the game of Go. His previous books include Automorphic Forms and Representations (Cambridge University Press 1997)and Algebraic Geometry (World Scientific 1998).
"re for beginners" 指的是为初学者设计的re(正则表达式)指南或教程。正则表达式是一种强大且灵活的文本匹配工具,用于在字符串中查找和操作特定模式的文本。 首先,学习re的基础知识是关键。了解re的语法规则和常用元字符非常重要。例如,元字符"."代表一个任意字符,"^"和"$"分别表示行的开头和结尾等。同时,学习如何使用字符类来匹配特定的字符范围,如"[0-9]"表示匹配0到9之间的任意数字等。 其次,掌握re的常用函数和方法。在Python中,我们可以通过re模块来使用正则表达式。例如,re.search()和re.match()函数用于在字符串中查找匹配模式的子字符串,re.findall()函数用于返回所有匹配的字符串列表。此外,还有re.sub()函数用于替换匹配的字符串。 在学习re时,练习是非常重要的。通过编写各种模式和测试字符串的正则表达式,可以帮助我们更好地理解其工作原理。同时,网上有许多在线正则表达式测试工具,可以帮助我们实时调试和验证我们的表达式。 最后,持续学习和实践re是提高技能的关键。正则表达式非常强大且灵活,可以在各种应用中使用。通过不断学习和解决实际问题,我们可以逐渐掌握更高级的正则表达式技巧和技术。 总结来说,“re for beginners”是一个为初学者设计的正则表达式指南或教程。通过学习re的基础知识、掌握常用函数和方法、进行练习和实践,我们可以逐步提升自己的正则表达式技能。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值