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

Last updated on November 26, 2023 pm

Overview [1]

Matrix Exponential & Logarithm

已知 $A \in \mathbb{R}^{M \times M}$,

Lie Bracket

TODO

$SU(2)$ and the Quaternions [2]

欧拉公式

2D旋转

单位复数 可用来表示2D旋转。

3D旋转

单位四元数 才可表示3D旋转,四元数是复数的扩充,在表示旋转前需要进行 归一化

当 $\theta$ 很小时,一阶泰勒展开,可以近似表达为

四元数可以在 保证效率 的同时,减小矩阵1/4的内存占有量,同时又能 避免欧拉角的万向锁问题

Hamilton & JPL 四元数

$SO(3)$

Lie Group $SO(3)$

Lie Algebra $\mathfrak{so}(3)$

where

Infinitesimal Rotations

the base of $\mathfrak{so}(3)$ are three skew symmetric matrices, each corresponding to infinitesimal rotations along each axis

then the $\mathfrak{so}$(3)

映射

指数映射

当 $|\phi|$ 比较小时,一阶泰勒近似

对数映射

$SE(3)$

Lie Group $SE(3)$

Lie Algebra $\mathfrak{se}(3)$

where

The infinitesimal generators of SE(3)

the base of $\mathfrak{se}(3)$ are these six 4×4 matrices, each corresponding to either infinitesimal rotations or infinitesimal translations along each axis

then the $\mathfrak{se}(3)$

so

1
2
3
4
5
Sophus::Matrix4d sk_b1;
sk_b1.setZero();
for (int i = 0; i < vec_b.size(); i++) {
sk_b1 += vec_b[i] * Sophus::SE3d::generator(i);
}

Jacobian

to convert the translation component of pose in $\mathfrak{se}(3)$ into the translation component of pose in $SE(3)$ through

映射

指数映射

对数映射

Adjoints

Adjoint action of SE(3)

上图用伴随表示:

with the key property of exponential map

we can get

so, for $SO(3)$

同一刚体中不同坐标系姿态变换的相互表示

以带有IMU的相机模组为例,已知 IMU(坐标系)本身的姿态变换 $\mathbf{T}^{B}$ 和 同一模组中Camera到IMU(Body)的坐标系变换 $\mathbf{T}_{BC}$,则 该Camera(坐标系)本身的姿态变换为:

因为上面的变换都是 坐标系的变换,所以矩阵相乘 从左到右,即 矩阵右乘

Exponential Map on $SE(3)$

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Eigen::Matrix3d R_b = Eigen::AngleAxisd(M_PI / 4, Eigen::Vector3d(0, 1, 0)).toRotationMatrix();
Sophus::SO3d SO3_b(R_b);
Sophus::SE3d::Tangent vec_b;
vec_b.head(3) << 10.1793, -6.3204, 28.09113;
vec_b.tail(3) = SO3_b.log();

Sophus::Vector3d t_wb(1.2, 3.4, 5.6);
Sophus::SE3d SE3_wb(R, t_wb);

Sophus::SE3d SE3_w = SE3_wb * Sophus::SE3d::exp(vec_b) * SE3_wb.inverse();
Sophus::SE3d::Tangent vec_w0 = SE3_w.log();

Sophus::SE3d::Tangent vec_w1 = Sophus::SE3d::vee(SE3_wb.matrix() * Sophus::SE3d::hat(vec_b) * SE3_wb.inverse().matrix());

Sophus::SE3d::Tangent vec_w2 = Sophus::SE3d::exp(vec_w1).log();

Sophus::SE3d::Tangent vec_b_adj = SE3_wb.Adj() * vec_b;

std::cout << "vec_w0 :" << vec_w0.transpose() << std::endl;
std::cout << "vec_w1 :" << vec_w1.transpose() << std::endl;
std::cout << "vec_w2 :" << vec_w2.transpose() << std::endl;
std::cout << "vec_b_adj :" << vec_b_adj.transpose() << std::endl;

output:

1
2
3
4
vec_w0 :     6.3204     5.78107     30.7615   -0.785398 1.13928e-16           0
vec_w1 : 6.3204 5.78107 30.7615 -0.785398 1.74393e-16 0
vec_w2 : 6.3204 5.78107 30.7615 -0.785398 1.74393e-16 0
vec_b_adj : 6.3204 5.78107 30.7615 -0.785398 1.74393e-16 0

Baker-Campbell-Hausdorff (BCH)

Properties

where

and

so

当 $\phi$ 很小时

Rotations

The BCH formula

In Lie group theory, $J_r$ and $J_l$ are referred to as the right and left Jacobians of $SO(3)$, respectively.

Libs

  • Sophus
  • manif: A small header-only library for Lie theory

Reference


Lie Group and Lie Algebra: SO(3), SE(3)
https://cgabc.xyz/posts/2626d418/
Author
Gavin Gao
Posted on
January 8, 2022
Licensed under