【学习随笔】机器人感知-因子图在SLAM中的应用

本文仅用于记录自己学习过程中的总结。

0.

购于2022年9月28,计划十一期间看完一遍。

第1章 引言

贝叶斯网络是一个有向图模型,图中的节点代表变量 θ j \theta_j θj,将一个贝叶斯网络全部变量 Θ \Theta Θ上的联合概率密度函数 p ( Θ ) p(\Theta) p(Θ) 定义为节点的乘积: p ( Θ ) = Π j p ( θ j ∣ π j ) p(\Theta)=\Pi_j p(\theta_j|\pi_j) p(Θ)=Πjp(θjπj) 其中 π j \pi_j πj θ j \theta_j θj的父节点。

贝叶斯网络是一种非常适用于建模的语言,相比而言因子图则更适用于推断。然而因子图比bayes网络更加通用,因为它不仅可以指定概率密度,还可以指定在变脸 X X X的集合上的任意一个因子函数 ϕ ( X ) \phi(X) ϕ(X)

与Bayes网络不同,银子图中观测量不会被显示地表示出来

困惑:表示成因子后,如何确定谁是先验、谁是后验?

原始采样(ancestral sampling)只适用于 有向无环图,通常采样是使用马可夫链蒙特卡洛方法,其中之一是吉布斯采样(Gibbs sampling)。

因子图以其能够在最大后验概率推断问题中表示未归一化后验概率的能力,成了概率机器人领域中理想的图模型。

20220929

第2章 平滑与地图构建

平滑与地图构建(smoothing and mapping, SAM)

对于一个符合高斯噪声模型的SLAM问题进行最大后验概率推断,等价于求解一个非线性最小二乘问题。

白化:whitening,相当于消掉了观测量的单位。

求解最小二乘问题 A x = b Ax=b Ax=b
Cholesky分解: A T A x = A T b A^TAx=A^Tb ATAx=ATb Λ = A T A \Lambda=A^TA Λ=ATA 称为信息矩阵,通过cholesky分解为三角矩阵 Λ = R T R \Lambda=R^TR Λ=RTR,最终有 R T ( R x ) = A T b R^T(Rx)=A^Tb RT(Rx)=ATb,进而求解;对于 m ∗ n m*n mn的矩阵 A A A,计算复杂度为 ( m + n / 3 ) n (m+n/3)n (m+n/3)n
QR分解:直接对 A A A阵进行分解,利用Householder变换, H n . . . H 2 H 1 A = Q T A = [ R , 0 ] T H_n...H_2H_1A=Q^TA=[R, 0]^T Hn...H2H1A=QTA=[R,0]T,其中 Q Q Q为正交矩阵,此时 ∣ A x − b ∣ 2 2 = ∣ Q T A x − Q T b ∣ 2 2 = ∣ R x − d 2 2 ∣ + ∣ e ∣ 2 2 |Ax-b|_2^2=|Q^TAx-Q^Tb|_2^2=|Rx-d_2^2|+|e|_2^2 Axb22=QTAxQTb22=Rxd22+e22,其中 d = R x d=Rx d=Rx。计算复杂度主要为Householder变化,为 O ( 2 ( m − n / 3 ) n 2 ) O(2(m-n/3)n^2) O(2(mn/3)n2)
总结:SLAM优化问题,变为稀疏线性代数的方式表述,这类方法乘坐平方根SAM,简记为 S A M \sqrt {SAM} SAM

优化方法:
梯度下降:一阶
高斯牛顿 GN:二阶
列文博格-马夸尔特 LM: ( A T A + λ I ) Δ x = A T b (A^TA+\lambda I)\Delta x=A^Tb (ATA+λI)Δx=ATb,介于梯度和GN之间;当接收更新时,降低 λ \lambda λ,拒绝更新时,提高 λ \lambda λ
DogLeg(PDL):将梯度下降方向向GN方向弯折,停止在置信区域边界,避免了LM算法拒绝迭代时重新计算分解的计算量。
GN和PDL都要求信息矩阵 Λ \Lambda Λ是可逆的,对于欠约束或病态问题,建议采用LM。

EKF等滤波方法对于SLAM的问题是,线性化选择没有办法撤销;SLAM的平滑问题,在勘测学和摄影测量中称作光束法平差BA,在计算机视觉中称作运动重建SfM。平方根SAM从根本上优于EKF方法,被认为是“应该总是被优先应用于标准的卡尔曼滤波器的递归中”。

参考论文:
Dellaert, F., & Kaess, M. (2006). Square Root SAM: Simultaneous localization and mapping via square root information smoothing. The International Journal of Robotics Research, 25(12), 1181-1203.

20220930

总结

实在懒得抄了,大概10月3把这本书翻完了。整体理解了因子图的思想。但可能还不够深入,没有形成系统。

尤其是因子图与Bayes图有什么关系,具体为什么用xxx。
但今日又重新翻看了一边《十四讲》,将相关内容再次思考,整理如下:

第11讲
SLAM是一个图优化问题,可以自然表示成一个动态Bayes网络。
Bayes网络是一种概率图,由随机变量的节点和表达随即条件独立性的边组成,形成一个有向无环图。SLAM中,运动方程和观测方程,恰好表示状态变量之间的条件概率。
例如,箭头表示了先验后验等,例如 P ( x 1 ∣ x 2 , u 1 ) P(x_1|x_2, u_1) P(x1x2,u1)为运动方程,在图上存在一个箭头。

我们发现在计算后验概率最大时,是多个因式相乘,故Bayes网络可以转化成一个因子图。
因子节点包含了待优化变量之间的关系(因子来自运动和观测方程),因子图优化的目的,即调整变量的值,使因子的乘积最大化。

因子图和普通的图优化比,在优化时没有显著区别, 但增量式平滑与建图(incremental smooth and mapping)的iSAM,使其后端可以增量式处理优化,而不是像原始的图优化,每次加入节点后都需要整个图进行优化。

20221005

We review the use of factor graphs for the modeling and solving of large-scale inference problems in robotics. Factor graphs are a family of probabilistic graphical models, other examples of which are Bayesian networks and Markov random fields, well known from the statistical modeling and machine learning literature. They provide a powerful abstraction that gives insight into particular inference problems, making it easier to think about and design solutions, and write modular software to perform the actual inference. We illustrate their use in the simultaneous localization and mapping problem and other important problems associated with deploying robots in the real world. We introduce factor graphs as an economical representation within which to formulate the different inference problems, setting the stage for the subsequent sections on practical methods to solve them.We explain the nonlinear optimization techniques for solving arbitrary nonlinear factor graphs, which requires repeatedly solving large sparse linear systems. The sparse structure of the factor graph is the key to understanding this more general algorithm, and hence also understanding (and improving) sparse factorization methods. We provide insight into the graphs underlying robotics inference, and how their sparsity is affected by the implementation choices we make, crucial for achieving highly performant algorithms. As many inference problems in robotics are incremental, we also discuss the iSAM class of algorithms that can reuse previous computations, re-interpreting incremental matrix factorization methods as operations on graphical models, introducing the Bayes tree in the process. Because in most practical situations we will have to deal with 3D rotations and other nonlinear manifolds, we also introduce the more sophisticated machinery to perform optimization on nonlinear manifolds. Finally, we provide an overview of applications of factor graphs for robot perception, showing the broad impact factor graphs had in robot perception. (只有第一章内容,我也才发现)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值