第九章 位姿估计应用
Chapter 9 Pose Estimation Problems
9.1 点云对齐 / Point-Cloud Alignment
9.1.1 问题设置 / Problem Setup
中文
点云对齐是三维机器人感知中最基础的问题之一:给定两组来自不同参考系的三维点集合(点云),找到最佳的旋转和平移,使两组点云尽可能重合。
形式化设置:设存在固定参考系 和附于移动机器人的参考系 。对 个地标点 ,我们拥有:
- 在固定系中的坐标 (地图中已知)
- 在车体系中的含噪测量
目标:找旋转矩阵 和平移 ,最小化加权最小二乘误差
应用场景:
- ICP(迭代最近点)算法:每次迭代中使用本节方法对齐当前扫描与地图
- RANSAC 最小子集:从最少 3 对点快速估计初始位姿
直觉:点云对齐就像”拼拼图”——你有一张局部照片(车体系测量)和一份地图(固定系坐标),要找到相机的位置与朝向。关键约束是旋转矩阵 ,这使问题非线性。
English
Point-cloud alignment (also called point-set registration) is fundamental to 3D perception: given two sets of 3D points expressed in different frames, find the rotation and translation that best aligns them.
Setup. There are landmark points with:
- Known positions in a fixed frame
- Noisy measurements in the vehicle frame
We seek the rotation and translation minimizing the weighted least-squares cost above with scalar weights .
Key applications: Iterative Closest Point (ICP), RANSAC minimal-set pose estimation.
9.1.2 单位四元数解 / Unit-Length Quaternion Solution
中文
四元数方法将点云对齐化为一个特征值问题。
化简步骤:用简化记号,关系式 用四元数重写为
其中 和 是四元数左/右乘矩阵(见第 7 章)。经过变换,误差线性化后,目标函数化为
求解:
- 对平移 求导置零,得到最优平移等于两点云质心之差:
其中 是加权质心。
- 将最优平移代回后,问题化为 4×4 特征值问题:
由于 ,取最小特征值对应的特征向量即为最优旋转四元数。
直觉:旋转约束 通过 Lagrange 乘子引入;最小化能量就是选择与”期望旋转方向”最匹配的特征向量。这等同于从数据的协方差矩阵中提取主方向。
English
The quaternion approach reduces point-cloud alignment to a 4×4 eigenproblem.
Key steps:
- Re-express the alignment constraint using quaternion multiplication matrices and (Section 7.2.3).
- The optimal translation is the difference between the weighted centroids of the two clouds (in the fixed frame):
- After substituting the optimal translation, the remaining problem reduces to the Davenport/Wahba eigenproblem:
where is a symmetric positive-semidefinite matrix built from cross-covariances of the centroid-subtracted point clouds.
Solution: Since , minimizing the cost requires choosing the smallest eigenvalue and its corresponding eigenvector (the rotation quaternion ). The unit-length constraint uniquely determines the overall scale. This approach is originally due to Davenport (1965) and Horn (1987).
9.1.3 旋转矩阵解(Wahba 问题)/ Rotation Matrix Solution (Wahba’s Problem)
中文
旋转矩阵方法将对齐问题化为一个 SVD(奇异值分解)问题,并给出完整的全局最小值分析。
化简:定义去心点对
最优旋转等价于最大化 ,约束 。
SVD 解:对 (,),当全局最小值唯一时,解为
中的最后一个符号位确保 (即确保是真旋转而非反射)。
各种情形:
| 条件 | 最小值情况 |
|---|---|
| 唯一全局最小值, | |
| 且 唯一() | 唯一全局最小值, |
| (,) | 唯一解, |
| 点共线(rank 1)或共点(rank 0) | 无穷多最小值 |
重要事实:对旋转矩阵参数化而言,无局部极小值——任何满足一阶条件的临界点要么是全局极小值,要么是极大值或鞍点。因此迭代方法从任意初始点出发都会收敛到全局最小值(只要存在唯一解)。
迭代方法(基于李群 ):使用左扰动方案 ,每步更新
其中最优扰动
唯一性条件:需要至少三个非共线点(使 正定)。
English
The rotation matrix approach reduces to a singular-value decomposition and provides a complete global analysis.
Cross-covariance matrix:
SVD solution. Compute . The unique global minimum (when it exists) is:
The last sign entry in corrects for a possible reflection, ensuring . This is the classical solution to Wahba’s problem (Wahba, 1965; Horn, 1987; Arun et al., 1987).
No local minima: A second-order perturbation analysis shows that in all practically relevant cases (unique global minimum exists), there are no local minima — only one global minimum, one global maximum, and saddle points. This guarantees convergence of iterative methods.
Iterative approach (using kinematics): At each iteration, solve a linear system for the optimal perturbation and update . Both the “mass matrix” and cross-covariance are precomputed from the points, making each iteration (independent of ).
Condition: The solution is unique as long as there are at least three non-collinear points.
9.1.4 变换矩阵解 / Transformation Matrix Solution
中文
最后一种方法直接以变换矩阵 为变量,使用 敏感的扰动方案进行迭代优化。
定义点的齐次表示 和 ,误差为
使用扰动 和恒等式 ,目标函数在 中恰好是二次型,最优更新:
其中 。利用恒等式 ,左边化为
其中 是广义质量矩阵(仅依赖于固定系中的点,可预计算)。最优更新的闭式解为
其中 是依赖于当前猜测的向量,可用 和质心计算。更新后迭代:。
English
Using homogeneous-coordinate points and the -sensitive perturbation , the objective becomes exactly quadratic in . The optimal update is:
where the generalized mass matrix (built from the fixed-frame point cloud) is precomputed and used at every iteration, and is a vector that can also be computed from and the centroids (without looping over individual points per iteration). The update keeps exactly.
Summary of three approaches:
| Method | Parameterization | Solution type | Notes |
|---|---|---|---|
| Quaternion | Eigenproblem () | No approximation | |
| Rotation matrix | SVD, or iterative | Full case analysis | |
| Transformation | Iterative (GN) | Simultaneous |
9.2 点云跟踪 / Point-Cloud Tracking
中文
点云跟踪将对齐问题推广到时间序列:机器人随时间运动,在每个时刻观测若干地标点的位置,目标是估计整条位姿轨迹 。与对齐不同,这里需要融合运动先验和测量信息。
9.2.1 问题设置 / Problem Setup
状态:,每个 。
输入(运动先验):初始位姿猜测 和各时刻的广义速度 (均在车体系中表示)。
测量:在时刻 观测地标 在车体系中的位置
English
Point-cloud tracking extends alignment to a trajectory estimation problem. The vehicle moves over time, observing known landmarks at each step. Both a motion prior (generalized velocity inputs) and landmark measurements are fused to estimate the pose trajectory .
State: where each .
Inputs: Prior pose and generalized velocity at each step.
Measurements: Position of landmark in the vehicle frame: , where strips the homogeneous coordinate.
9.2.2 运动先验 / Motion Prior
中文
从 运动学 出发,假设速度输入在离散时间段内为常数,得到:
标称运动学(均值传播):
扰动运动学(协方差传播):
注意:与普通向量空间的 EKF 不同,这里的线性化矩阵 只依赖于输入(广义速度),不依赖于当前状态估计——这是在李群上使用指数映射定义扰动的重要优势。
English
Starting from the kinematic equation , assuming piecewise-constant inputs over intervals :
Nominal kinematics (mean propagation):
Perturbation kinematics (covariance propagation):
A key advantage: the Jacobian depends only on the input , not the current state estimate. This simplifies the EKF prediction step considerably.
9.2.3 测量模型 / Measurement Model
中文
测量模型(非线性)为
使用扰动 线性化后(一阶近似):
其中 是第 8 章定义的齐次点算子,将 齐次点映射为 矩阵。线性化 Jacobian 为
English
The linearized measurement Jacobian is:
where is the predicted mean pose and is the homogeneous-point operator from Chapter 8 satisfying .
For simultaneous point measurements at time , stack: , , .
9.2.4 扩展卡尔曼滤波解 / EKF Solution
中文
将 的对称性与第 4 章的 EKF 框架结合,得到如下”李群版 EKF“,共五个标准方程:
其中 是非线性测量模型在预测均值处的评估。
关键差异:
- 均值存储在李群 中,更新使用指数映射确保
- 协方差存储在李代数 中( 矩阵),以扰动 为坐标
English
The Lie-group-adapted EKF (five canonical equations):
| Step | Equation |
|---|---|
| Cov. predict | |
| Mean predict | |
| Kalman gain | |
| Cov. update | |
| Mean update |
Key insight: Means live in the Lie group (matrices), covariances live in the Lie algebra ( matrices). The exponential map in the mean update ensures the estimate always stays exactly on the manifold .
Relationship to Invariant EKF: Under a certain right-perturbation choice, this EKF takes the form of the invariant EKF (Barrau and Bonnabel, 2017), which enjoys state-independent Jacobians and provably stable error dynamics.
9.2.5 批量最大后验估计解 / Batch MAP Solution
中文
批量方法同时求解整条轨迹 。
误差函数:
对运动先验():;
对后续步():;
对测量(每个地标 ,每个时刻 ):。
目标函数(MAP = 最大后验):
高斯-牛顿迭代:将所有误差关于扰动 线性化后,构建块状矩阵方程
其中 是稀疏的块双对角矩阵(含测量部分后为块结构)。求解后按 更新,迭代至收敛。
李群批量估计的本质:更新步骤在李代数 中(线性空间)求解,但均值始终存储在李群 中(非线性流形)。这是”在正切空间中优化”的标准做法,等价于黎曼梯度下降。
English
The batch MAP problem estimates the entire trajectory simultaneously by minimizing:
Gauss-Newton update: After linearizing all error terms about the operating point , the quadratic approximation leads to:
The structure of is block-tridiagonal (from the motion prior chain) plus low-rank updates (from measurements), enabling efficient sparse Cholesky solves. After each solve, update via and iterate.
9.3 位姿图松弛 / Pose-Graph Relaxation
中文
位姿图问题是 SLAM 的核心。与上节不同的是,这里没有地标点的绝对位置,只有一组相对位姿”测量”(伪测量)。这些相对测量来自里程计、视觉里程计等方法,会在闭环时出现矛盾(不一致性),需要”松弛”整个图以找到全局一致的位姿估计。
9.3.1 问题设置 / Problem Setup
状态:,其中 是位姿 相对于固定参考位姿 0 的变换矩阵(固定 )。
测量:对图中某些边 ,有相对位姿测量
误差函数(移动系不变误差):
直觉: 是从位姿 到 的真实相对变换, 是其测量值。误差就是两者之差(在李代数中)。如果所有测量都完全准确,绕任意闭环一圈后误差为零。
English
Pose-graph relaxation is the back-end of SLAM. Given a set of relative pose “measurements” for edges in a pose graph, find the globally consistent absolute poses (relative to a fixed reference node 0).
Error term (moving-frame invariant):
When the graph has loops, the measurements are inconsistent (they don’t compose to identity around any loop), and we must relax the graph to minimize the total weighted squared error.
9.3.2 批量最大似然解 / Batch Maximum Likelihood Solution
中文
目标函数(最大似然 = 最小化加权平方误差):
使用左扰动方案 ,线性化误差为
其中
注意: 项在收敛后残差非零时非平凡,保留该项可提升精度。
高斯-牛顿步骤:构建并求解 ,其中 (稀疏矩阵,对应图的拓扑结构)。然后按 更新,迭代至收敛。
初始化:找到一棵生成树,从节点 0 出发通过复合相对测量来初始化所有节点的位姿。
利用稀疏性:
- 通过识别”悬臂链”(只有一端连接到度大于 2 节点)和”约束链”(两端均连接到节点),可以先合并局部链,再求解精简图,大幅减少计算量
- 对链状图, 为块三对角矩阵,可用稀疏 Cholesky 分解高效求解,代价线性于链长
English
Maximum likelihood objective:
Linearized error:
where the Jacobian involves the inverse left Jacobian and the current adjoint estimates. Setting (first-order approximation) gives a simpler but less accurate version; keeping more terms is beneficial when residuals are large.
Gauss-Newton iteration: Solve (sparse linear system), update poses via , iterate.
Initialization: Find a spanning tree in the graph; compound relative measurements outward from node 0.
Sparsity exploitation: The matrix has the same sparsity pattern as the pose-graph adjacency matrix. For chain subgraphs, is block-tridiagonal and solvable in via sparse Cholesky + forward-backward substitution.
9.4 惯性导航 / Inertial Navigation
中文
惯性测量单元(IMU)是最常用的自运动传感器之一。它同时测量角速度(陀螺仪)和线加速度(加速度计),可以通过积分获得位置和朝向估计。然而 IMU 积分会随时间累积误差,需要与其他传感器融合。
本节展示如何将 IMU 数据嵌入到李群框架中,实现严格数学正确的状态估计。
9.4.1 传感器模型 / IMU Sensor Model
简化 IMU 模型(传感器系与车体系重合):
其中 为重力(固定系),偏置 建模为随机游走过程。
English
The IMU measures angular rate and specific force (acceleration minus gravity), both corrupted by biases and noise:
Biases are modeled as random walks: , .
9.4.2 扩展位姿: / Extended Poses:
中文
由于 IMU 测量线加速度,状态向量中必须包含线速度 。最优雅的方式是将位置、速度和旋转打包成一个扩展位姿矩阵
这组 矩阵构成另一个矩阵李群 ,具备类似 的代数结构:
- 李代数元素:
- 指数映射:
- 伴随矩阵:
直觉: 是”导航群”。它把旋转、位置和速度统一在一个矩阵中,可以用一次矩阵乘法完成坐标变换的”一站式”操作——正如 把旋转和位置统一在一起一样。
English
Since the IMU measures linear acceleration, the velocity must be included in the state. We package rotation, position, and velocity into an extended pose matrix:
The set of all such matrices forms the matrix Lie group (also called or the “navigation group”). Its Lie algebra has elements parametrized by . The exponential map, adjoint, and left Jacobian all take block forms analogous to , with ’s left Jacobian appearing on the diagonal.
Key identities (same as , extended to ):
9.4.3 运动模型 / Motion Model
中文
连续时间运动方程(选择在惯性系中表示平移和速度):
这里使用右扰动方案(本书唯一使用右扰动的地方),因为运动方程自然地在 的右侧出现噪声:
分离标称分量和扰动分量后,扰动动力学(LTV 系统)为
其中 , 依赖于当前(标称)角速度和加速度测量值(减去偏置)。
English
Continuous-time nominal motion model (in ):
where and , and contains the gravity vector.
The perturbation model (LTV system on the -dimensional state ):
This right-perturbation scheme (the only place in the book) is natural because the noise enters on the “vehicle side” of .
9.4.4 均值传播 / Propagating the Mean
中文
假设每个 IMU 采样间隔 内测量值恒定,标称扩展位姿的更新为(封闭式)
其中 是 的左 Jacobian, 是新的矩阵函数
这些方程比简单欧拉积分更精确,特别是在角速度较大时。
English
Under piecewise-constant IMU measurements over , the nominal mean update is:
where:
The function accounts for the rotation experienced during the interval when integrating acceleration into position. For small , and (Euler approximation).
9.4.5 协方差传播 / Propagating the Covariance
中文
扰动动力学(LTV 系统)对应的离散时间协方差传播为
其中转移矩阵 ,离散过程噪声协方差
可用 的三阶近似高效计算(见正文公式)。
English
The discrete-time covariance propagation uses:
where is the transition matrix (computable via matrix exponential or truncated series), and is the integrated process noise covariance. The third-order approximation for balances accuracy and efficiency:
9.4.6 滤波 / Filtering
中文
将 IMU 运动模型嵌入 EKF 框架。状态为
状态维度为 ( 维扩展位姿扰动 + 维偏置),协方差矩阵 。
预测步骤(循环遍历所有 IMU 数据 直至下一外部测量时刻 ):
对每个 IMU 数据:用 §9.4.4 传播均值,用 §9.4.5 传播协方差。
更新步骤(同 §9.2.4 的格式,但状态是 扩展位姿):当有外部测量(如 GPS、相机)时,
注意这里均值更新用右乘(因为扰动定义在右侧),偏置用加法更新:。
English
The IMU-based EKF operates on the -dimensional state comprising the extended pose plus biases. During prediction, the state is propagated forward through each IMU sample using the mean/covariance equations of Sections 9.4.4–9.4.5. When an external measurement (e.g., GPS position, camera bearing) arrives at time , the standard EKF correction is applied:
The right-hand perturbation update (unique to IMU/inertial nav) is consistent with the right-perturbation scheme used for .
This EKF structure is the core of practically every inertial navigation system used in aerospace and robotics, from the Apollo Lunar Module (where a Kalman filter fused IMU + radar data) to modern visual-inertial odometry.
9.5 本章小结 / Chapter Summary
中文
本章将第一、二部分的工具整合,解决了三个核心的三维位姿估计应用:
| 问题 | 核心方法 | 关键结果 |
|---|---|---|
| 点云对齐 | 四元数特征值 / SVD / 迭代 GN | 无局部极小值;唯一解等价于 Wahba 问题 |
| 点云跟踪 | 李群版 EKF / 批量 MAP (GN) | 均值在 ;协方差在 |
| 位姿图松弛 | 批量 ML (GN),稀疏求解 | 图稀疏性对应 矩阵稀疏性 |
| 惯性导航 | 扩展位姿 + 右扰动 EKF | 预积分;偏置估计;与外部测量融合 |
贯穿全章的核心思想:
- 扰动在李代数中(线性空间),均值在李群中(非线性流形)
- 左扰动()在大多数情况适用;惯性导航使用右扰动
- 任何估计问题都可通过定义合适的误差函数,然后用高斯-牛顿迭代求解
English
This chapter unified the Lie-group machinery of Part II with the estimation framework of Part I to tackle three fundamental 3D estimation problems:
-
Point-cloud alignment — three equivalent approaches (quaternion eigenproblem, SVD/Wahba, -iterative GN), all provably free of local minima when a unique global solution exists.
-
Point-cloud tracking — a Lie-group-adapted EKF and batch MAP where means live in and covariances live in ; the motion-model Jacobian depends only on inputs, not the state.
-
Pose-graph relaxation — batch ML on a sparse graph, exploiting the sparsity of for efficient computation; the key is defining invariant error terms of the form .
-
Inertial navigation — the “navigation group” packages rotation, position, and velocity into a matrix; a right-perturbation EKF on a 15-DOF state (extended pose + biases) serves as the algorithmic backbone of modern inertial navigation.
Unifying principle: Updates are computed in the Lie algebra (a flat vector space), but means are stored and propagated in the Lie group (a curved manifold). The exponential map bridges these two worlds and guarantees geometric consistency at every step.
下一章将解决更难的问题:位置和地图同时未知的位姿-点联合估计(束调整与 SLAM)。
The next chapter tackles the harder problem of estimating both the vehicle’s pose and the map of landmarks simultaneously — the bundle adjustment and SLAM problem.