Visual SLAM的基本概念和公式

  1. pose x ∈ s e ( 3 ) \mathbf{x} \in se(3) xse(3),未知量( s e ( 3 ) se(3) se(3)的解释见 附录A
  2. landmark/reference point y ∈ R 3 × 1 \mathbf{y} \in R^{3 \times 1} yR3×1,未知量
  3. reprojection function: p = p ( x , y ) ∈ R 2 × 1 \mathbf{p} = \mathbf{p}(\mathbf{x}, \mathbf{y}) \in R^{2 \times 1} p=p(x,y)R2×1
  4. observation z ∈ R 2 × 1 \mathbf{z} \in R^{2 \times 1} zR2×1, 已知量
  5. reprojection error function f = z − p ( x , y ) ∈ R 2 × 1 \mathbf{f} = \mathbf{z} - \mathbf{p}(\mathbf{x}, \mathbf{y}) \in R^{2 \times 1} f=zp(x,y)R2×1

有如下的求导公式(推导过程见 附录B):
∂ f ∂ y = [ − f c 3 0 f c 1 c 3 2 0 − f c 3 f c 2 c 3 2 ] ⋅ R \frac{\partial \mathbf{f}}{\partial \mathbf{y}} = \begin{bmatrix} -\frac{f}{c_3} &0 &\frac{f c_1}{c_3^2} \\ 0 &-\frac{f}{c_3} &\frac{f c_2}{c_3^2} \\ \end{bmatrix} \cdot \mathbf{R} yf=[c3f00c3fc32fc1c32fc2]R

∂ f ∂ x = [ f c 1 c 2 c 3 2 − f ( 1 + c 1 2 c 3 2 ) f c 2 c 3 − f c 3 0 f c 1 c 3 2 f ( 1 + c 2 2 c 3 2 ) − f c 1 c 2 c 3 2 − f c 1 c 3 0 − f c 3 f c 2 c 3 2 ] \frac{\partial \mathbf{f}}{\partial \mathbf{x}} = \begin{bmatrix} \frac{f c_1 c_2}{c_3^2} &-f(1 + \frac{c_1^2}{c_3^2}) &\frac{f c_2}{c_3} &-\frac{f}{c_3} &0 &\frac{f c_1}{c_3^2} \\ f(1 + \frac{c_2^2}{c_3^2}) &-\frac{f c_1 c_2}{c_3^2} &-\frac{f c_1}{c_3} &0 &-\frac{f}{c_3} &\frac{f c_2}{c_3^2} \\ \end{bmatrix} xf= c32fc1c2f(1+c32c22)f(1+c32c12)c32fc1c2c3fc2c3fc1c3f00c3fc32fc1c32fc2

其中 c = [ c 1 , c 2 , c 3 ] ⊤ \mathbf{c} = [c_1, c_2, c_3]^\top c=[c1,c2,c3] f = f u = f v f = f_u = f_v f=fu=fv就是等效焦距:
[ c 1 ] = T [ y 1 ] \begin{bmatrix} \mathbf{c} \\ 1 \\ \end{bmatrix} = \mathbf{T} \begin{bmatrix} \mathbf{y} \\ 1 \\ \end{bmatrix} [c1]=T[y1]

T = [ R t 0 1 ] = exp ⁡ ( x ∧ ) \mathbf{T} = \begin{bmatrix} \mathbf{R} &\mathbf{t} \\ \mathbf{0} &1 \\ \end{bmatrix} = \exp(\mathbf{x}^{\wedge}) T=[R0t1]=exp(x)

附录

A

s e ( 3 ) se(3) se(3)以及左扰动模型见 “SE(3)和se(3),左扰动模型” 和 “SO(3)与so(3)、左扰动模型

B

上述求导公式的推导过程:

这里用了计算图的方式:

x
c
p
f
y
z

f = [ f 1 , f 2 ] ⊤ \mathbf{f}=[f_1, f_2]^\top f=[f1,f2], z = [ z 1 , z 2 ] ⊤ \mathbf{z}=[z_1, z_2]^\top z=[z1,z2], p = [ p 1 , p 2 ] ⊤ \mathbf{p}=[p_1, p_2]^\top p=[p1,p2]:
f = z − p \mathbf{f} = \mathbf{z} - \mathbf{p} f=zp

∂ f ∂ p = [ − 1 0 0 − 1 ] \frac{\partial \mathbf{f}}{\partial \mathbf{p}} = \begin{bmatrix} -1 &0 \\ 0 &-1 \\ \end{bmatrix} pf=[1001]

c = [ c 1 , c 2 , c 3 ] ⊤ \mathbf{c} = [c_1, c_2, c_3]^\top c=[c1,c2,c3]:
{ p 1 = f ⋅ c 1 c 3 + c x p 2 = f ⋅ c 2 c 3 + c y \begin{cases} p_1 = f \cdot \frac{c_1}{c_3} + c_x \\ p_2 = f \cdot \frac{c_2}{c_3} + c_y \\ \end{cases} {p1=fc3c1+cxp2=fc3c2+cy

∂ p ∂ c = [ f c 3 0 − f c 1 c 3 2 0 f c 3 − f c 2 c 3 2 ] \frac{\partial \mathbf{p}}{\partial \mathbf{c}} = \begin{bmatrix} \frac{f}{c_3} &0 &-\frac{f c_1}{c_3^2} \\ 0 &\frac{f}{c_3} &-\frac{f c_2}{c_3^2} \\ \end{bmatrix} cp=[c3f00c3fc32fc1c32fc2]

y = [ y 1 , y 2 , y 3 ] ⊤ \mathbf{y} = [y_1, y_2, y_3]^\top y=[y1,y2,y3]:
[ c 1 ] = T [ y 1 ] \begin{bmatrix} \mathbf{c} \\ 1 \\ \end{bmatrix} = \mathbf{T} \begin{bmatrix} \mathbf{y} \\ 1 \\ \end{bmatrix} [c1]=T[y1]

T = [ R t 0 1 ] = exp ⁡ ( x ∧ ) \mathbf{T} = \begin{bmatrix} \mathbf{R} &\mathbf{t} \\ \mathbf{0} &1 \\ \end{bmatrix} = \exp(\mathbf{x}^{\wedge}) T=[R0t1]=exp(x)

∂ c ∂ y = R \frac{\partial \mathbf{c}}{\partial \mathbf{y}} = \mathbf{R} yc=R

∂ c ∂ x = [ − c ∧ , I ] \frac{\partial \mathbf{c}}{\partial \mathbf{x}} = [-\mathbf{c}^{\wedge}, \mathbf{I}] xc=[c,I]

于是
∂ f ∂ y = [ − f c 3 0 f c 1 c 3 2 0 − f c 3 f c 2 c 3 2 ] ⋅ R \frac{\partial \mathbf{f}}{\partial \mathbf{y}} = \begin{bmatrix} -\frac{f}{c_3} &0 &\frac{f c_1}{c_3^2} \\ 0 &-\frac{f}{c_3} &\frac{f c_2}{c_3^2} \\ \end{bmatrix} \cdot \mathbf{R} yf=[c3f00c3fc32fc1c32fc2]R

∂ f ∂ x = [ − f c 3 0 f c 1 c 3 2 0 − f c 3 f c 2 c 3 2 ] ⋅ [ − c ∧ , I ] = [ f c 1 c 2 c 3 2 − f ( 1 + c 1 2 c 3 2 ) f c 2 c 3 − f c 3 0 f c 1 c 3 2 f ( 1 + c 2 2 c 3 2 ) − f c 1 c 2 c 3 2 − f c 1 c 3 0 − f c 3 f c 2 c 3 2 ] \begin{aligned} \frac{\partial \mathbf{f}}{\partial \mathbf{x}} &= \begin{bmatrix} -\frac{f}{c_3} &0 &\frac{f c_1}{c_3^2} \\ 0 &-\frac{f}{c_3} &\frac{f c_2}{c_3^2} \\ \end{bmatrix} \cdot [-\mathbf{c}^{\wedge}, \mathbf{I}] \\ &= \begin{bmatrix} \frac{f c_1 c_2}{c_3^2} &-f(1 + \frac{c_1^2}{c_3^2}) &\frac{f c_2}{c_3} &-\frac{f}{c_3} &0 &\frac{f c_1}{c_3^2} \\ f(1 + \frac{c_2^2}{c_3^2}) &-\frac{f c_1 c_2}{c_3^2} &-\frac{f c_1}{c_3} &0 &-\frac{f}{c_3} &\frac{f c_2}{c_3^2} \\ \end{bmatrix} \end{aligned} xf=[c3f00c3fc32fc1c32fc2][c,I]= c32fc1c2f(1+c32c22)f(1+c32c12)c32fc1c2c3fc2c3fc1c3f00c3fc32fc1c32fc2

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
http://www.iri.upc.edu/people/jsola/JoanSola/eng/toolbox.html EKF-SLAM TOOLBOX FOR MATLAB NEWS Upgrade 2012/04/22: Added support for Omni-directional cameras for ahmPnt and eucPnt points. From 2011/09/03 to 2011/09/08: a bug in the package released between these 5 days caused the toolbox to completely fail. Download the current version below. 2010/09/04: BUG FIX: Corrected bug in code for IDP. If you just want the bug fix, click here. Toolbox versions after 2011/09/08 are already fixed. INTRODUCTION This toolbox performs 6DOF SLAM using the classical EKF implementation. It is conceived as an "active-search" SLAM. It is provided for free under the GPL license (please read the file COPYING and make sure you agree in the terms and conditions before using it). Users employing the toolbox for scientific research should cite in their scientific communications one of the papers of the authors (especially SOLA-ETAL-IJCV-11, SOLA-ETAL-TRO-08) appearing in the References section of the documentation, and also acknowledging the use of this toolbox. • Download the 6DOF SLAM toolbox for Matlab. • Please email me with feedback, I will appreciate. • Read the pdf doc to have an idea. • Features: o Full 6DOF. o Points and lines, with many different parametrizations. Consult the IJCV'11 paper on landmark parametrization. o 3D graphics. o Works with any number of robots and sensors. o Monocular and stereo systems are treated alike. o Supports extrinsic self-calibration of multi-camera rigs as in our TRO'08 paper. • The toolbox supports undelayed initialization of the following landmark types: o ahmPnt : Anchored homogeneous points. See video. This parametrization performs equivalently to Inverse-depth points in filter consistency. o idpPnt : Inverse-Depth points, with conversion to Euclidean points (eucPnt) after confirming linearity. This follows Civera's TRO-08 paper on Inverse-depth parametrization. Seevideo. Also called Anchored Modified-polar points (AMPP) in SOLA-IJCV'11. o hmgPnt : Homogeneous points. See video. o fhmPnt : Framed Homogeneous points. We follow a work by Simone Ceriani et. al., 2011. o plkLin : Plucker lines as explained in our IROS-09 paper. See video. o aplLin : Anchored Plucker lines. See video. o idpLin : Inverse-depth points lines. See video. Also called Anchored Modified-polar points lines (AMPPL) in SOLA-IJCV'11. o hmgLin : Homogeneous-points lines. See video. o ahmLin : Anchored homogeneous-points lines. See video. o See this video that compares idpPnt against ahmPnt and hmgPnt points, showing the superior consistency of idpPnt and ahmPnt because of over-estimation of the covariance in hmgPnt.(note: in the video, hmgPnt is labeled HP, ahmPnt is AHP, and idpPnt is AMPP.) o See this video with all line parametrizations running in parallel. BUG FIXES BUG (fixed in toolbox releases after 2011/09/08): The Jacobians of the idpPnt initialization function were incorrect. This derived in a poor performance of idpPnt points. Now, idpPnt andahmPnt show equivalent performance. FIX: follow these simple steps: 1. Download this file. Unzip it. 2. Copy files idp2ahp.m and ahp2idp.m to toolbox folder %SLAMTB/Points/ 3. Copy file retroProjIdpPntFromPinHoleOnRob.m to toolbox folder %SLAMTB/Observations/ 4. Delete the obsolete bugged file %SLAMTB/Points/idpS2idpW.m from the toolbox.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值