指数映射:
e x p ( ϕ ^ ) = I + s i n ( ∥ ϕ ∥ ) ∥ ϕ ∥ ϕ ^ + 1 − c o s ( ∥ ϕ ∥ ) ∥ ϕ ∥ 2 ( ϕ ^ ) 2 (1) exp(\phi^{\hat{ }}) = \mathbf{I} + \frac{sin(\left\|\phi \right\|)}{\left\|\phi \right\|}\phi^{\hat{ }} + \frac{1-cos(\left\|\phi \right\|)}{\left\|\phi \right\|^{2}}(\phi^{\hat{ }})^{2} \tag{1} exp(ϕ^)=I+∥ϕ∥sin(∥ϕ∥)ϕ^+∥ϕ∥21−cos(∥ϕ∥)(ϕ^)2(1)
指数映射的一阶近似:
e x p ( ϕ ^ ) ≈ I + ϕ ^ (2) exp(\phi^{\hat{ }}) \approx \mathbf{I} + \phi^{\hat{ }} \tag{2} exp(ϕ^)≈I+ϕ^(2)
对数映射:
l o g ( R ) = φ ⋅ ( R − R T ) 2 s i n ( φ ) 其 中 φ = c o s − 1 ( t r ( R ) − 1 2 ) (3) log(\mathbf{R}) = \frac{\varphi\cdot(\mathbf{R}-\mathbf{R}^{T})}{2sin(\varphi)}其中\varphi=cos^{-1}(\frac{tr(\mathbf{R})-1}{2}) \tag{3} log(R)=2sin(φ)φ⋅(R−RT)其中φ=cos−1(2tr(R)−1)(3)
BCH公式与近似形式(14讲72页):
E x p ( ϕ + δ ϕ ) ≈ E x p ( ϕ ) E x p ( J r ( ϕ ) δ ϕ ) (4) Exp(\phi + \delta\phi) \approx Exp(\phi)Exp(\mathbf{J}_{r}(\phi)\delta\phi) \tag{4} Exp(ϕ+δϕ)≈Exp(ϕ)Exp(Jr(ϕ)δϕ)(4)
式4中:
J r ( ϕ ) = I − 1 − c o s ( ∥ ϕ ∥ ) ∥ ϕ ∥ 2 + ∥ ϕ ∥ − s i n ( ∥ ϕ ∥ ) ∥ ϕ 3 ∥ ( ϕ ^ ) 2 (5) \mathbf{J}_{r}(\phi) = \mathbf{I} - \frac{1-cos(\left\|\phi \right\|)}{\left\|\phi \right\|^{2}} + \frac{\left\|\phi \right\|-sin(\left\|\phi \right\|)}{\left\|\phi ^{3}\right\|} (\phi^{\hat{ }})^{2} \tag{5} Jr(ϕ)=I−∥ϕ∥21−cos(∥ϕ∥)+∥ϕ3∥∥ϕ∥−sin(∥ϕ∥)(ϕ^)2(5)
指数映射还有如下性质:
E x p ( ϕ ) R = R E x p ( R T ϕ ) (6) Exp(\phi)\mathbf{R} = \mathbf{R}Exp(\mathbf{R}^{T}\phi) \tag{6} Exp(ϕ)R=RExp(RTϕ)(6)
注: 上述为了公式的简便使用了 E x p ( ϕ ) Exp(\phi) Exp(ϕ) 代替了 e x p ( ϕ ^ ) exp(\phi^{\hat{ }}) exp(ϕ^).
测量模型:
B ω ~ W B ( t ) = B ω W B ( t ) + b g ( t ) + η g ( t ) B a ~ ( t ) = R W B T ( W a ( t ) − W g ) + b a ( t ) + η a ( t ) (7) \begin{aligned} {}_{_B}\widetilde{\boldsymbol{\omega}}_{_{WB}}(t) &= {}_{_B}\boldsymbol{\omega}_{_{WB}}(t) + \mathbf{b}^{g}(t) + \boldsymbol{\eta}^{g}(t) \\ {}_{_B}\widetilde{\mathbf{a}}(t) &= \mathbf{R}_{_{WB}}^{T}({}_{_W}\mathbf{a}(t)-{}_{_W}\mathbf{g}) + \mathbf{b}^{a}(t) + \boldsymbol{\eta}^{a}(t) \tag{7} \end{aligned} Bω WB(t)Ba (t)=BωWB(t)+bg(t)+ηg(t)=RWBT(Wa(t)−Wg)+ba(t)+ηa(t)(7)
运动学模型:
R ˙ W B = R W B ⋅ B ω W B ^ v ˙ W = W a p ˙ W = W v (8) \begin{aligned} \dot{\mathbf{R}}_{_{WB}} &= \mathbf{R}_{_{WB}} \cdot{}_{_B}\boldsymbol{\omega}_{_{WB}}\hat{}\\ \dot{\mathbf{v}}_{_W} &= {}_{_W}\mathbf{a} \\ \dot{\mathbf{p}}_{_W} &= {}_{_W}\mathbf{v} \tag{8} \end{aligned} R˙WBv˙Wp˙W=RWB⋅BωWB^=Wa=Wv(8)
基于运动学模型可得 t t t 和 t + Δ t t+\Delta t t+Δt 时刻状态关系:
R W B ( t + Δ t ) = R W B E x p ∫ t t + Δ t B ω W B ( τ ) d τ W v ( t + Δ t ) = W v ( t ) + ∫ t t + Δ t W a ( τ ) d τ W p ( t + Δ t ) = W p ( t ) + ∫ t t + Δ t W v ( τ ) d τ + ∬ t t + Δ t W a ( τ ) d τ 2 (9) \begin{aligned} \mathbf{R}_{_{WB}}(t+\Delta t) &= \mathbf{R}_{_{WB}} Exp{ \int_{t}^{t+\Delta{t}} {}_{_{B}}\boldsymbol{\omega}_{_{WB}}(\tau) d\tau } \\ {}_{_{W}}\mathbf{v}(t+\Delta t) &= {}_{_{W}}\mathbf{v}(t) + \int_{t}^{t+\Delta t} {}_{_W}\mathbf{a}(\tau)d\tau \\ {}_{_{W}}\mathbf{p}(t+\Delta t) &= {}_{_{W}}\mathbf{p}(t) + \int_{t}^{t+\Delta t} {}_{_W}\mathbf{v}(\tau)d\tau + \iint_{t}^{t+\Delta t} {}_{_W}\mathbf{a}(\tau)d\tau^{2} \tag{9} \end{aligned} RWB(t+Δt)Wv(t+Δt)Wp(t+Δt)=RWBExp∫tt+ΔtBωWB(τ)dτ=Wv(t)+∫tt+ΔtWa(τ)dτ=Wp(t)+∫tt+ΔtWv(τ)dτ+∬tt+ΔtWa(τ)dτ2(9)
假设 W a {}_{_W}\mathbf{a} Wa 和 B ω W B {}_{_{B}}\boldsymbol{\omega}_{_{WB}} BωWB 在 [ t , t + Δ t ] [t, t+\Delta t] [t,t+Δt]区间内不变,则公式(9)的结果:
R W B ( t + Δ t ) = R W B E x p ( B ω W B ( t ) Δ t ) W v ( t + Δ t ) = W v ( t ) + W a ( t ) Δ t W p ( t + Δ t ) = W p ( t ) + W v ( t ) Δ t + 1 2 W a ( t ) Δ t 2 (10) \begin{aligned} \mathbf{R}_{_{WB}}(t+\Delta t) &= \mathbf{R}_{_{WB}} Exp({}_{_B}\boldsymbol{\omega}_{_{WB}}(t)\Delta t )\\ {}_{_{W}}\mathbf{v}(t+\Delta t) &= {}_{_{W}}\mathbf{v}(t) + {}_{_W}\mathbf{a}(t)\Delta t\\ {}_{_{W}}\mathbf{p}(t+\Delta t) &= {}_{_{W}}\mathbf{p}(t) + {}_{_W}\mathbf{v}(t)\Delta t + \frac{1}{2}{}_{_W}\mathbf{a}(t){\Delta t}^{2} \tag{10} \end{aligned} RWB(t+Δt)Wv(t+Δt)Wp(t+Δt)=RWBExp(BωWB(t)Δt)=Wv(t)+Wa(t)Δt=Wp(t)+Wv(t)Δt+21Wa(t)Δt2(10)
将公式(7)测量模型带入公式(10)可得:
R ( t + Δ t ) = R ( t ) E x p ( ( ω ~ ( t ) − b g ( t ) − η g d ( t ) ) Δ t ) v ( t + Δ t ) = v ( t ) + g Δ t + R ( t ) ( a ~ ( t ) − b a ( t ) − η a d ( t ) ) Δ t p ( t + Δ t ) = p ( t ) + v ( t ) Δ t + 1 2 g Δ t 2 + 1 2 R ( t ) ( a ~ ( t ) − b a ( t ) − η a d ( t ) ) Δ t 2 (11) \begin{aligned} \mathbf{R}(t+\Delta t) &= \mathbf{R}(t)Exp((\widetilde{\boldsymbol{\omega}}(t)-\mathbf{b}^{g}(t)-\boldsymbol{\eta}^{gd}(t))\Delta t) \\ \mathbf{v}(t+\Delta t) &= \mathbf{v}(t) + \mathbf{g}\Delta t + \mathbf{R}(t) (\widetilde{\mathbf{a}}(t) - \mathbf{b}^{a}(t) - \boldsymbol{\eta}^{ad}(t))\Delta t \\ \mathbf{p}(t+\Delta t) &= \mathbf{p}(t) + \mathbf{v}(t)\Delta t + \frac{1}{2}\mathbf{g}\Delta t^{2} + \frac{1}{2}\mathbf{R}(t) (\widetilde{\mathbf{a}}(t) - \mathbf{b}^{a}(t) - \boldsymbol{\eta}^{ad}(t))\Delta t^{2} \tag{11} \end{aligned} R(t+Δt)v(t+Δt)p(t+Δt)=R(t)Exp((ω (t)−bg(t)−ηgd(t))Δt)=v(t)+gΔt+R(t)(a (t)−ba(t)−ηad(t))Δt=p(t)+v(t)Δt+21gΔt2+21R(t)(a (t)−ba(t)−ηad(t))Δt2(11)
注: 上述推导从公式(9)开始就假设 R W B ( t ) R_{_{WB}}(t) RWB(t)在 [ t , Δ t ] [t,\Delta t] [t,Δt]区间内是不变的,这与VINS预积分的推导是不一样的,这样的假设最大的好处就是使得公式比较简洁。另外是由于在视觉惯性紧耦合的slam算法中使用的imu频率都比较高,因此假设相邻两帧之间的位姿没有变化也是较合理的,并且参考论文中的作者也在实际实验中验证了该假设并不会明显影响算法测试结果。但如果使用的imu频率较低,就不能这么假设。
所谓的预积分过程就是将两关键帧之间的所有imu测量值转换成一个测量值,这样就可以只加入一个观测约束,减少了约束数量,可有效的保证vio过程的实时进行。假设两相邻关键帧获取时刻采集的imu帧索引为i和j。则j时刻的状态信息可由i时刻状态信息通过如下积分获得:
R j = R i ∏ k = i j − 1 E x p ( ( w ~ k − b k g − η k g d ) Δ t ) v j = v i + g Δ t i j + ∑ k = i j − 1 R k ( a ~ k − b k a − η k a d ) Δ t p j = p i + ∑ k = i j − 1 [ v k Δ t + 1 2 g Δ t 2 + 1 2 R k ( a ~ k − b k a − η k a d ) Δ t 2 ] (12) \begin{aligned} \mathbf{R}_{j} &= \mathbf{R}_{i}\prod_{k=i}^{j-1}Exp((\widetilde{\boldsymbol{w}}_{k} - \mathbf{b}_{k}^{g}-\boldsymbol{\eta}_{k}^{gd})\Delta t) \\ \mathbf{v}_{j} &= \mathbf{v}_{i} + \mathbf{g}\Delta t_{ij} + \sum_{k=i}^{j-1}\mathbf{R}_{k}(\widetilde{\mathbf{a}}_{k} - \mathbf{b}_{k}^{a}-\boldsymbol{\eta}_{k}^{ad})\Delta t \\ \mathbf{p}_{j} &= \mathbf{p}_{i} + \sum_{k=i}^{j-1}[\mathbf{v}_{k}\Delta t + \frac{1}{2}\mathbf{g}\Delta t^{2} + \frac{1}{2}\mathbf{R}_{k}(\widetilde{\mathbf{a}}_{k} - \mathbf{b}_{k}^{a}-\boldsymbol{\eta}_{k}^{ad})\Delta t^{2}] \tag{12} \end{aligned} Rjvjpj=Rik=i∏j−1Exp((w k−bkg−ηkgd)Δt)=vi+gΔtij+k=i∑j−1Rk(a k−bka−ηkad)Δt=pi+k=i∑j−1[vkΔt+21gΔt2+21Rk(a k−bka−ηkad)Δt2](12)
上面公式(12)有个缺点就是如果在 t i t_{i} ti 时刻的状态 [ p i , v i , R i , b i a , b i g ] [\mathbf{p}_{i}, \mathbf{v}_{i}, \mathbf{R}_{i}, \mathbf{b}_{i}^{a}, \mathbf{b}_{i}^{g}] [pi,vi,Ri,bia,big] 发生改变(在进行vio轨迹优化时,状态会不断的进行调整),则需要重新重复上面的积分过程,这将非常耗时,为了避免该问题,对上述积分过程进行了如下改变:
Δ R i j = R i T R j = ∏ k = i j − 1 E x p ( ( w ~ k − b k g − η k g d ) Δ t ) Δ v i j = R i T ( v j − v i − g Δ t i j ) = ∑ k = i j − 1 R i k ( a ~ k − b k a − η k a d ) Δ t Δ p i j = R i T ( p j − p i − 1 2 g Δ t i j 2 ) = ∑ k = i j − 1 [ v i k Δ t + 1 2 R i k ( a ~ k − b k a − η k a d ) Δ t 2 ] (13) \begin{aligned} \Delta \mathbf{R}_{ij} &= \mathbf{R}_{i}^{T}\mathbf{R}_{j}=\prod_{k=i}^{j-1}Exp((\widetilde{\boldsymbol{w}}_{k} - \mathbf{b}_{k}^{g}-\boldsymbol{\eta}_{k}^{gd})\Delta t)\\ \Delta \mathbf{v}_{ij} &= \mathbf{R}_{i}^{T}(\mathbf{v}_{j} - \mathbf{v}_{i} - \mathbf{g}\Delta t_{ij}) = \sum_{k=i}^{j-1}\mathbf{R}_{ik}(\widetilde{\mathbf{a}}_{k} - \mathbf{b}_{k}^{a}-\boldsymbol{\eta}_{k}^{ad})\Delta t \\ \Delta \mathbf{p}_{ij} &= \mathbf{R}_{i}^{T}(\mathbf{p}_{j}-\mathbf{p}_{i}-\frac{1}{2}\mathbf{g}\Delta t_{ij}^{2}) = \sum_{k=i}^{j-1}[\mathbf{v}_{ik}\Delta t + \frac{1}{2}\mathbf{R}_{ik}(\widetilde{\mathbf{a}}_{k} - \mathbf{b}_{k}^{a}-\boldsymbol{\eta}_{k}^{ad})\Delta t^{2}] \tag{13} \end{aligned} ΔRijΔvijΔpij=RiTRj=k=i∏j−1Exp((w k−bkg−ηkgd)Δt)=RiT(vj−vi−gΔtij)=k=i∑j−1Rik(a k−bka−ηkad)Δt=RiT(pj−pi−21gΔtij2)=k=i∑j−1[vikΔt+21Rik(a k−bka−ηkad)Δt2](13)
从公式(13)可以看出右边积分部分只与 [ b i a , b i g ] [\mathbf{b}_{i}^{a}, \mathbf{b}_{i}^{g}] [bia,big] 状态有关,按当前的公式来说,偏置发生改变,右侧的积分过程需要重新进行,但由于偏置变化较小,可以用近似的方法来计算,后面3.3节会专门来说这个问题。
由公式(13),可知:
Δ R i j = R i T R j = ∏ k = i j − 1 E x p ( ( w ~ k − b k g − η k g d ) Δ t ) ≃ ( 4 ) ∏ k = i j − 1 E x p ( ( w ~ k − b k g ) Δ t ) E x p ( − J r k ( ( w ~ k − b k g ) Δ t ) η k g d Δ t ) = ( 6 ) Δ R ~ i j ∏ k = i j − 1 E x p ( − Δ R ~ k + 1 , j T J r k ( ( w ~ k − b k g ) Δ t ) η k g d Δ t ) = Δ R ~ i j E x p ( − δ ϕ i j ) (14) \begin{aligned} \Delta \mathbf{R}_{ij} &= \mathbf{R}_{i}^{T}\mathbf{R}_{j}\\ &=\prod_{k=i}^{j-1}Exp((\widetilde{\boldsymbol{w}}_{k} - \mathbf{b}_{k}^{g}-\boldsymbol{\eta}_{k}^{gd})\Delta t)\\ &\overset{(4)}\simeq \prod_{k=i}^{j-1}Exp((\widetilde{\boldsymbol{w}}_{k} - \mathbf{b}_{k}^{g})\Delta t) Exp(-\mathbf{J}_{r}^{k}((\widetilde{\boldsymbol{w}}_{k} - \mathbf{b}_{k}^{g})\Delta t)\boldsymbol{\eta}_{k}^{gd}\Delta t) \\ &\overset{(6)}=\Delta\widetilde{\mathbf{R}}_{ij}\prod_{k=i}^{j-1}Exp(-\Delta\widetilde{\mathbf{R}}_{k+1,j}^{T}\mathbf{J}_{r}^{k}((\widetilde{\boldsymbol{w}}_{k} - \mathbf{b}_{k}^{g})\Delta t) \boldsymbol{\eta}_{k}^{gd}\Delta t) \\ &= \Delta\widetilde{\mathbf{R}}_{ij}Exp(-\delta\phi_{ij}) \end{aligned} \tag{14} ΔRij=RiTRj=k=i∏j−1Exp((w k−bkg−ηkgd)Δt)≃(4)k=i∏j−1Exp((w k−bkg)Δt)Exp(−Jrk((w k−bkg)Δt)ηkgdΔt)=(6)ΔR ijk=i∏j−1Exp(−ΔR k+1,jTJrk((w k−bkg)Δt)ηkgdΔt)=ΔR ijExp(−δϕij)(14)
式中:
Δ R ~ i j = ∏ k = i j − 1 E x p ( ( w ~ k − b k g ) Δ t ) \Delta\widetilde{\mathbf{R}}_{ij} = \prod_{k=i}^{j-1}Exp((\widetilde{\boldsymbol{w}}_{k} - \mathbf{b}_{k}^{g})\Delta t) ΔR ij=k=i∏j−1Exp((w k−bkg)Δt)
上述推导中最难的部分是获得第二步结果,其推导方式可参考博客 。 于是基于公式(14)可获得姿态测量方程为:
Δ R ~ i j = R i T R j E x p ( δ ϕ i j ) (15) \Delta\widetilde{\mathbf{R}}_{ij} = \mathbf{R}_{i}^{T}\mathbf{R}_{j}Exp(\delta\phi_{ij}) \tag{15} ΔR ij=RiTRjExp(δϕij)(15)
注: 式中(4)(6)指的是基于公式(4)(6)来推导的,后面都会用这种表示方式.
将公式(14)结果 Δ R i j = Δ R ~ i j E x p ( − δ ϕ i j ) \Delta \mathbf{R}_{ij}=\Delta\widetilde{\mathbf{R}}_{ij}Exp(-\delta\phi_{ij}) ΔRij=ΔR ijExp(−δϕij)带入公式(13)的 Δ v i j \Delta \mathbf{v}_{ij} Δvij中可得:
Δ v i j = R i T ( v j − v i − g Δ t i j ) = ∑ k = i j − 1 R i k ( a ~ k − b k a − η k a d ) Δ t ≃ ( 2 , 14 ) ∑ k = i j − 1 Δ R ~ i k ( I − δ ϕ i k ^ ) ( a ~ k − b i a ) Δ t − Δ R ~ i k η k a d Δ t = Δ v ~ i j + ∑ k = i j − 1 [ Δ R ~ i k ( a ~ k − b i a ) ^ δ ϕ i k Δ t − Δ R ~ i k η k a d Δ t ] = Δ v ~ i j − δ v i j (16) \begin{aligned} \Delta \mathbf{v}_{ij} &=\mathbf{R}_{i}^{T}(\mathbf{v}_{j} - \mathbf{v}_{i} - \mathbf{g}\Delta t_{ij})\\ &= \sum_{k=i}^{j-1}\mathbf{R}_{ik}(\widetilde{\mathbf{a}}_{k} - \mathbf{b}_{k}^{a}-\boldsymbol{\eta}_{k}^{ad})\Delta t \\ &\overset{(2,14)}\simeq \sum_{k=i}^{j-1}\Delta\widetilde{\mathbf{R}}_{ik}(\mathbf{I}-\delta\phi_{ik}\hat{})(\widetilde{\mathbf{a}}_{k}-\mathbf{b}_{i}^{a})\Delta t - \Delta\widetilde{\mathbf{R}}_{ik}\boldsymbol{\eta}_{k}^{ad}\Delta t \\ &= \Delta\widetilde{\mathbf{v}}_{ij} + \sum_{k=i}^{j-1}[\Delta\widetilde{\mathbf{R}}_{ik}(\widetilde{\mathbf{a}}_{k}-\mathbf{b}_{i}^{a})\hat{}\delta\phi_{ik}\Delta t - \Delta\widetilde{\mathbf{R}}_{ik}\boldsymbol{\eta}_{k}^{ad}\Delta t] \\ &= \Delta\widetilde{\mathbf{v}}_{ij} - \delta\mathbf{v}_{ij} \tag{16} \end{aligned} Δvij=RiT(vj−vi−gΔtij)=k=i∑j−1Rik(a k−bka−ηkad)Δt≃(2,14)k=i∑j−1ΔR ik(I−δϕik^)(a k−bia)Δt−ΔR ikηkadΔt=Δv ij+k=i∑j−1[ΔR ik(a k−bia)^δϕikΔt−ΔR ikηkadΔt]=Δv ij−δvij(16)
式中:
Δ v ~ i j = ∑ k = i j − 1 Δ R ~ i k ( a ~ k − b i a ) Δ t \Delta\widetilde{\mathbf{v}}_{ij} = \sum_{k=i}^{j-1}\Delta\widetilde{\mathbf{R}}_{ik}(\widetilde{\mathbf{a}}_{k}-\mathbf{b}_{i}^{a})\Delta t Δv ij=k=i∑j−1ΔR ik(a k−bia)Δt
于是可得速度测量模型:
Δ v ~ i j = R i T ( v j − v i − g Δ t i j ) + δ v i j (17) \Delta\widetilde{\mathbf{v}}_{ij} = \mathbf{R}_{i}^{T}(\mathbf{v}_{j} - \mathbf{v}_{i} - \mathbf{g}\Delta t_{ij}) + \delta\mathbf{v}_{ij} \tag{17} Δv ij=RiT(vj−vi−gΔtij)+δvij(17)
将公式(14)(16)的结果带入公式(13)的 Δ p i j \Delta \mathbf{p}_{ij} Δpij中,可得:
Δ p i j = R i T ( p j − p i − 1 2 g Δ t i j 2 ) = ∑ k = i j − 1 [ v i k Δ t + 1 2 R i k ( a ~ k − b k a − η k a d ) Δ t 2 ] ≃ 2 , 14 , 16 ∑ k = i j − 1 [ ( Δ v ~ i k − δ v i k ) Δ t + 1 2 Δ R ~ i k ( I − δ ϕ i k ^ ) ( a ~ k − b i a ) Δ t 2 − 1 2 Δ R ~ i k η k a d Δ t 2 ] = Δ p ~ i j + ∑ k = i j − 1 [ − δ v i k Δ t + 1 2 Δ R ~ i k ( a ~ k − b i a ) ^ δ ϕ i k Δ t 2 − 1 2 Δ R ~ i k η k a d Δ t 2 ] ] = Δ p ~ i j − δ p i j (18) \begin{aligned} \Delta \mathbf{p}_{ij} &= \mathbf{R}_{i}^{T}(\mathbf{p}_{j}-\mathbf{p}_{i}-\frac{1}{2}\mathbf{g}\Delta t_{ij}^{2})\\ &= \sum_{k=i}^{j-1}[\mathbf{v}_{ik}\Delta t + \frac{1}{2}\mathbf{R}_{ik}(\widetilde{\mathbf{a}}_{k} - \mathbf{b}_{k}^{a}-\boldsymbol{\eta}_{k}^{ad})\Delta t^{2}]\\ &\overset{2,14,16}\simeq \sum_{k=i}^{j-1}[(\Delta\widetilde{\mathbf{v}}_{ik}-\delta\mathbf{v}_{ik})\Delta t + \frac{1}{2}\Delta\widetilde{\mathbf{R}}_{ik}(\mathbf{I}-\delta\phi_{ik}\hat{})(\widetilde{\mathbf{a}}_{k}-\mathbf{b}_{i}^{a})\Delta t^{2} - \frac{1}{2}\Delta\widetilde{\mathbf{R}}_{ik}\boldsymbol{\eta}_{k}^{ad}\Delta t^{2}]\\ &= \Delta\widetilde{\mathbf{p}}_{ij} + \sum_{k=i}^{j-1}[-\delta\mathbf{v}_{ik}\Delta t + \frac{1}{2}\Delta\widetilde{\mathbf{R}}_{ik}(\widetilde{\mathbf{a}}_{k}-\mathbf{b}_{i}^{a})\hat{}\delta\phi_{ik}\Delta t^{2}- \frac{1}{2}\Delta\widetilde{\mathbf{R}}_{ik}\boldsymbol{\eta}_{k}^{ad}\Delta t^{2}]]\\ &= \Delta\widetilde{\mathbf{p}}_{ij} - \delta\mathbf{p}_{ij} \tag{18} \end{aligned} Δpij=RiT(pj−pi−21gΔtij2)=k=i∑j−1[vikΔt+21Rik(a k−bka−ηkad)Δt2]≃2,14,16k=i∑j−1[(Δv ik−δvik)Δt+21ΔR ik(I−δϕik^)(a k−bia)Δt2−21ΔR ikηkadΔt2]=Δp ij+k=i∑j−1[−δvikΔt+21ΔR ik(a k−bia)^δϕikΔt2−21ΔR ikηkadΔt2]]=Δp ij−δpij(18)
于是可得位置测量模型:
Δ p ~ i j = R i T ( p j − p i − 1 2 g Δ t i j 2 ) + δ p i j (19) \Delta\widetilde{\mathbf{p}}_{ij} = \mathbf{R}_{i}^{T}(\mathbf{p}_{j}-\mathbf{p}_{i}-\frac{1}{2}\mathbf{g}\Delta t_{ij}^{2}) + \delta\mathbf{p}_{ij} \tag{19} Δp ij=RiT(pj−pi−21gΔtij2)+δpij(19)
由公式(14)可知预积分姿态噪声项为:
由公式(16)可知预积分速度噪声项为:
由公式(18)可知预积分位置噪声项为:
令 Δ x i k = [ δ ϕ i k , δ v i k , δ p i k ] \Delta\mathbf{x}_{ik}=[\delta\phi_{ik}, \delta\mathbf{v}_{ik},\delta\mathbf{p}_{ik}] Δxik=[δϕik,δvik,δpik], η k d = [ η k g d , η k a d ] \boldsymbol{\eta}_{k}^{d}=[\boldsymbol{\eta}_{k}^{gd}, \boldsymbol{\eta}_{k}^{ad}] ηkd=[ηkgd,ηkad],于是上述三个公式可写为:
Δ x i j = [ Δ R ~ j − 1 , j T 0 0 − Δ R ~ i , j − 1 T ( a ~ j − 1 − b i a ) ^ Δ t I 0 − 1 2 Δ R ~ i , j − 1 T ( a ~ j − 1 − b i a ) ^ Δ t 2 Δ t I ] Δ x i , j − 1 + [ J r j − 1 0 0 Δ R ~ i , j − 1 Δ t 0 1 2 Δ R ~ i , j − 1 Δ t 2 ] η j − 1 d = A j − 1 Δ x i , j − 1 + B j − 1 η j − 1 d (20) \begin{aligned} \Delta\mathbf{x}_{ij} = \begin{bmatrix} \Delta\widetilde{\mathbf{R}}_{j-1,j}^{T} & 0 & 0 \\ -\Delta\widetilde{\mathbf{R}}_{i,j-1}^{T}(\mathbf{\widetilde{\mathbf{a}}}_{j-1}-\mathbf{b}_{i}^{a})\hat{}\Delta t & I & 0 \\ -\frac{1}{2}\Delta\widetilde{\mathbf{R}}_{i,j-1}^{T}(\mathbf{\widetilde{\mathbf{a}}}_{j-1}-\mathbf{b}_{i}^{a})\hat{}\Delta t^{2} & \Delta t & I \end{bmatrix} \Delta\mathbf{x}_{i,j-1} + \begin{bmatrix} \mathbf{J}_{r}^{j-1} & 0\\ 0 & \Delta\widetilde{\mathbf{R}}_{i,j-1}\Delta t \\ 0 & \frac{1}{2}\Delta\widetilde{\mathbf{R}}_{i,j-1}\Delta t^{2} \end{bmatrix} \boldsymbol{\eta}_{j-1}^{d} \end{aligned} = A_{j-1}\Delta\mathbf{x}_{i,j-1}+B_{j-1}\boldsymbol{\eta}_{j-1}^{d} \tag{20} Δxij=⎣⎢⎡ΔR j−1,jT−ΔR i,j−1T(a j−1−bia)^Δt−21ΔR i,j−1T(a j−1−bia)^Δt20IΔt00I⎦⎥⎤Δxi,j−1+⎣⎡Jrj−1000ΔR i,j−1Δt21ΔR i,j−1Δt2⎦⎤ηj−1d=Aj−1Δxi,j−1+Bj−1ηj−1d(20)
从上述推导可以看出,预积分噪声项的传递是线性的,因此可以直接通过如下线性传递的方式进行协方差的更新:
∑ i j = A j − 1 ∑ i , j − 1 A j − 1 T + B j − 1 ∑ η B j − 1 T (21) \sum_{ij} = A_{j-1}\sum_{i,j-1}A_{j-1}^{T} + B_{j-1}\sum_{\eta}B_{j-1}^{T} \tag{21} ij∑=Aj−1i,j−1∑Aj−1T+Bj−1η∑Bj−1T(21)
----------------------------------- 公式已敲吐血 ,后面内容后续再补 --------------------------------
On-Manifold Preintegration for Real-Time Visual-Inertial Odometry
《视觉SLAM十四讲》
https://blog.csdn.net/l741299292/article/details/81203464
IMU预积分总结与公式推导三