【ESKF】(一)IMU运动学方程离散化

参考:《Quaternion kinematics for error-state kalman filter》


1. 三种状态

  1. true-state
    真实状态值,包含高斯噪声,用于EKF作为状态变量使用
  2. nominal-state
    • 无(不考虑)噪声的状态值,可以是估计值(不考虑噪声)、预测值(不考虑噪声)
    • 在预测阶段,由高频的IMU测量值预测得到当前的nominal-state x \mathbf x x,nominal state没有考虑噪声项,因此会存在累计误差,这些误差被堆积到error-state δ x \mathbf{\delta x} δx中,
  3. error-state
    • 误差状态,符合零均值高斯分布,用于ESKF
      true-state = nominal-state + error-state
    • ESKF中dynamic, control, measurement matrices由nominal-state计算得到

2. 连续时间的系统运动学(System kinematics in continuous time)

  1. The true-state kinematics
    p ˙ t = v t v ˙ t = R t ( a m − a b t − a n ) + g t q ˙ t = 1 2 q t ⊗ ( ω m − ω b t − ω n ) a ˙ b t = a w ω ˙ b t = ω w g ˙ t = 0 \begin{aligned} \dot{\mathbf{p}}_{t} &=\mathbf{v}_{t} \\ \dot{\mathbf{v}}_{t} &=\mathbf{R}_{t}\left(\mathbf{a}_{m}-\mathbf{a}_{b t}-\mathbf{a}_{n}\right)+\mathbf{g}_{t} \\ \dot{\mathbf{q}}_{t} &=\frac{1}{2} \mathbf{q}_{t} \otimes\left(\boldsymbol{\omega}_{m}-\boldsymbol{\omega}_{b t}-\boldsymbol{\omega}_{n}\right) \\ \dot{\mathbf{a}}_{b t} &=\mathbf{a}_{w} \\ \dot{\boldsymbol{\omega}}_{b t} &=\boldsymbol{\omega}_{w} \\ \dot{\mathbf{g}}_{t} &=0 \end{aligned} p˙tv˙tq˙ta˙btω˙btg˙t=vt=Rt(amabtan)+gt=21qt(ωmωbtωn)=aw=ωw=0
  2. The nominal-state kinematics
    p ˙ = v v ˙ = R ( a m − a b ) + g q ˙ = 1 2 q ⊗ ( ω m − ω b ) a ˙ b = 0 ω ˙ b = 0 g ˙ = 0 \begin{aligned} \dot{\mathbf{p}} &=\mathbf{v} \\ \dot{\mathbf{v}} &=\mathbf{R}\left(\mathbf{a}_{m}-\mathbf{a}_{b}\right)+\mathbf{g} \\ \dot{\mathbf{q}} &=\frac{1}{2} \mathbf{q} \otimes\left(\boldsymbol{\omega}_{m}-\boldsymbol{\omega}_{b}\right) \\ \dot{\mathbf{a}}_{b} &=0 \\ \dot{\boldsymbol{\omega}}_{b} &=0 \\ \dot{\mathrm{g}} &=0 \end{aligned} p˙v˙q˙a˙bω˙bg˙=v=R(amab)+g=21q(ωmωb)=0=0=0
  3. The error-state kinematics
    δ p ˙ = δ v δ v ˙ = − R [ a m − a b ] × δ θ − R δ a b + δ g − R a n δ θ ˙ = − [ ω m − ω b ] × δ θ − δ ω b − ω n δ a ˙ b = a w δ ω ˙ b = ω w δ g ˙ = 0 \begin{aligned} \dot{\delta \mathbf{p}} &=\delta \mathbf{v} \\ \dot{\delta \mathbf{v}} &=-\mathbf{R}\left[\mathbf{a}_{m}-\mathbf{a}_{b}\right]_{\times} \delta \boldsymbol{\theta}-\mathbf{R} \delta \mathbf{a}_{b}+\delta \mathbf{g}-\mathbf{R a}_{n} \\ \dot{\delta \boldsymbol{\theta}} &=-\left[\boldsymbol{\omega}_{m}-\boldsymbol{\omega}_{b}\right]_{\times} \delta \boldsymbol{\theta}-\delta \boldsymbol{\omega}_{b}-\boldsymbol{\omega}_{n} \\ \dot{\delta \mathbf{a}}_{b} &=\mathbf{a}_{w} \\ \delta \dot{\boldsymbol{\omega}}_{b} &=\boldsymbol{\omega}_{w} \\ \dot{\delta \mathbf{g}} &=0 \end{aligned} δp˙δv˙δθ˙δa˙bδω˙bδg˙=δv=R[amab]×δθRδab+δgRan=[ωmωb]×δθδωbωn=aw=ωw=0

3. 离散时间的系统运动学(System kinematics in discrete time)

连续时间的系统运动学方程是微分方程,离散化后转换成差分方程,所谓离散化,其实本质就是积分

  1. The nominal state kinematics
    此差分方程用于预测系统状态
    p ← p + v Δ t + 1 2 ( R ( a m − a b ) + g ) Δ t 2 v ← v + ( R ( a m − a b ) + g ) Δ t q ← q ⊗ q { ( ω m − ω b ) Δ t } a b ← a b ω b ← ω b g ← g \begin{aligned} \mathbf{p} & \leftarrow \mathbf{p}+\mathbf{v} \Delta t+\frac{1}{2}\left(\mathbf{R}\left(\mathbf{a}_{m}-\mathbf{a}_{b}\right)+\mathbf{g}\right) \Delta t^{2} \\ \mathbf{v} & \leftarrow \mathbf{v}+\left(\mathbf{R}\left(\mathbf{a}_{m}-\mathbf{a}_{b}\right)+\mathbf{g}\right) \Delta t \\ \mathbf{q} & \leftarrow \mathbf{q} \otimes \mathbf{q}\left\{\left(\boldsymbol{\omega}_{m}-\boldsymbol{\omega}_{b}\right) \Delta t\right\} \\ \mathbf{a}_{b} & \leftarrow \mathbf{a}_{b} \\ \boldsymbol{\omega}_{b} & \leftarrow \boldsymbol{\omega}_{b} \\ \mathbf{g} & \leftarrow \mathbf{g} \end{aligned} pvqabωbgp+vΔt+21(R(amab)+g)Δt2v+(R(amab)+g)Δtqq{(ωmωb)Δt}abωbg
  2. The error-state kinematics
    此差分方程用于协方差传递
    δ p ← δ p + δ v Δ t δ v ← δ v + ( − R [ a m − a b ] × δ θ − R δ a b + δ g ) Δ t + v i δ θ ← R ⊤ { ( ω m − ω b ) Δ t } δ θ − δ ω b Δ t + θ i δ a b ← δ a b + a i δ ω b ← δ ω b + ω i δ g ← δ g \begin{aligned} \delta \mathbf{p} & \leftarrow \delta \mathbf{p}+\delta \mathbf{v} \Delta t \\ \delta \mathbf{v} & \leftarrow \delta \mathbf{v}+\left(-\mathbf{R}\left[\mathbf{a}_{m}-\mathbf{a}_{b}\right]_{\times} \delta \boldsymbol{\theta}-\mathbf{R} \delta \mathbf{a}_{b}+\delta \mathbf{g}\right) \Delta t+\mathbf{v}_{\mathbf{i}} \\ \delta \boldsymbol{\theta} & \leftarrow \mathbf{R}^{\top}\left\{\left(\boldsymbol{\omega}_{m}-\boldsymbol{\omega}_{b}\right) \Delta t\right\} \delta \boldsymbol{\theta}-\delta \boldsymbol{\omega}_{b} \Delta t+\boldsymbol{\theta}_{\mathbf{i}} \\ \delta \mathbf{a}_{b} & \leftarrow \delta \mathbf{a}_{b}+\mathbf{a}_{\mathbf{i}} \\ \delta \boldsymbol{\omega}_{b} & \leftarrow \delta \boldsymbol{\omega}_{b}+\boldsymbol{\omega}_{\mathbf{i}} \\ \delta \mathbf{g} & \leftarrow \delta \mathbf{g} \end{aligned} δpδvδθδabδωbδgδp+δvΔtδv+(R[amab]×δθRδab+δg)Δt+viR{(ωmωb)Δt}δθδωbΔt+θiδab+aiδωb+ωiδg

4. 离散时间的error-state kinematics方程推导

  1. 第一步:写出连续时间的true-state kinematics
    x ˙ = f ( x , u , w ) u ~ ∼ N { 0 , U c } , w c ∼ N { 0 , W c } \dot{\mathbf{x}}=f(\mathbf{x}, \mathbf{u}, \mathbf{w}) \\ \tilde{\mathbf{u}} \sim \mathcal{N}\left\{0, \mathbf{U}^{c}\right\} \quad, \quad \mathbf{w}^{c} \sim \mathcal{N}\left\{0, \mathbf{W}^{c}\right\} x˙=f(x,u,w)u~N{0,Uc},wcN{0,Wc}

    注意,区分两种噪声模型:

    • 控制信号噪声 u ~ \tilde{\mathbf{u}} u~
      此噪声在采样时间段内认为是常量
    • 随机扰动噪声 w c \mathbf{w}^{c} wc
      跟采样无关,时刻以高斯分布的形态改变(时变量),布朗运动
  2. 第二步:写出连续时间的error-state kinematics(一阶泰勒展开)
    δ ˙ x = A δ x + B u ~ + C w A ≜ ∂ f ∂ δ x ∣ x , u m , B ≜ ∂ f ∂ u ~ ∣ x , u m , C ≜ ∂ f ∂ w ∣ x , u m \dot{\delta} \mathbf{x}=\mathbf{A} \delta \mathbf{x}+\mathbf{B} \tilde{\mathbf{u}}+\mathbf{C} \mathbf{w} \\ \left.\mathbf{A} \triangleq \frac{\partial f}{\partial \delta \mathbf{x}}\right|_{\mathbf{x}, \mathbf{u}_{m}} \quad,\left.\quad \mathbf{B} \triangleq \frac{\partial f}{\partial \tilde{\mathbf{u}}}\right|_{\mathbf{x}, \mathbf{u}_{m}} \quad,\left.\quad \mathbf{C} \triangleq \frac{\partial f}{\partial \mathbf{w}}\right|_{\mathbf{x}, \mathbf{u}_{m}} δ˙x=Aδx+Bu~+CwAδxf x,um,Bu~f x,um,Cwf x,um

  3. 第三步:积分得到离散时间的error-state kinematics
    δ x n + 1 = δ x n + ∫ n Δ t ( n + 1 ) Δ t ( A δ x ( τ ) + B u ~ ( τ ) + C w c ( τ ) ) d τ = δ x n + ∫ n Δ t ( n + 1 ) Δ t A δ x ( τ ) d τ + ∫ n Δ t ( n + 1 ) Δ t B u ~ ( τ ) d τ + ∫ n Δ t ( n + 1 ) Δ t C w c ( τ ) d τ \begin{aligned} \delta \mathbf{x}_{n+1} &=\delta \mathbf{x}_{n}+\int_{n \Delta t}^{(n+1) \Delta t}\left(\mathbf{A} \delta \mathbf{x}(\tau)+\mathbf{B} \tilde{\mathbf{u}}(\tau)+\mathbf{C} \mathbf{w}^{c}(\tau)\right) d \tau \\ &=\delta \mathbf{x}_{n}+\int_{n \Delta t}^{(n+1) \Delta t} \mathbf{A} \delta \mathbf{x}(\tau) d \tau+\int_{n \Delta t}^{(n+1) \Delta t} \mathbf{B} \tilde{\mathbf{u}}(\tau) d \tau+\int_{n \Delta t}^{(n+1) \Delta t} \mathbf{C} \mathbf{w}^{c}(\tau) d \tau \end{aligned} δxn+1=δxn+nΔt(n+1)Δt(Aδx(τ)+Bu~(τ)+Cwc(τ))dτ=δxn+nΔt(n+1)ΔtAδx(τ)dτ+nΔt(n+1)ΔtBu~(τ)dτ+nΔt(n+1)ΔtCwc(τ)dτ

    分三部分进行积分:

    • dynamic部分
      δ x n + ∫ n Δ t ( n + 1 ) Δ t A δ x ( τ ) d τ = Φ ⋅ δ x n \delta \mathbf{x}_{n}+\int_{n \Delta t}^{(n+1) \Delta t} \mathbf{A} \delta \mathbf{x}(\tau) d \tau=\Phi \cdot \delta \mathbf{x}_{n} δxn+nΔt(n+1)ΔtAδx(τ)dτ=Φδxn

      其中, Φ = e A Δ t \Phi=e^{\mathbf{A} \Delta t} Φ=eAΔt可以通过闭式积分或者近似积分的方式得到

    • 一旦被采样,在积分阶段采样噪声不再改变(该噪声已经在采样时成为确定),相当于常量进行积分
      ∫ n Δ t ( n + 1 ) Δ t B u ~ ( τ ) d τ = B Δ t u ~ n \int_{n \Delta t}^{(n+1) \Delta t} \mathbf{B} \tilde{\mathbf{u}}(\tau) d \tau=\mathbf{B} \Delta t \tilde{\mathbf{u}}_{n} nΔt(n+1)ΔtBu~(τ)dτ=BΔtu~n

    • bias随机游走噪声属于布朗运动,在积分阶段也是时变的,所以需要对高斯分布进行积分:
      w n ≜ ∫ n Δ t ( n + 1 ) Δ t w ( τ ) d τ , w n ∼ N { 0 , W } ,  with  W = W c Δ t \mathbf{w}_{n} \triangleq \int_{n \Delta t}^{(n+1) \Delta t} \mathbf{w}(\tau) d \tau \quad, \quad \mathbf{w}_{n} \sim \mathcal{N}\{0, \mathbf{W}\} \quad, \quad \text { with } \mathbf{W}=\mathbf{W}^{c} \Delta t wnnΔt(n+1)Δtw(τ)dτ,wnN{0,W}, with W=WcΔt

  4. 最终结果:
     Description   Continuous time  t  Discrete time  n Δ t  state  x ˙ = f c ( x , u , w ) x n + 1 = f ( x n , u n , w n )  error-state  δ x ˙ = A δ x + B u ~ + C w δ x n + 1 = F x δ x n + F u u ~ n + F w w n  system/ transition matrix  A F x = Φ = e A Δ t  control matrix  B F u = B Δ t  perturbation matrix  C F w = C  control covariance  U c U = U c  perturbation covariance  W c W = W c Δ t \begin{array}{|c|c|c|} \hline \text { Description } & \text { Continuous time } t & \text { Discrete time } n \Delta t \\ \hline \hline \text { state } & \dot{\mathbf{x}}=f^{c}(\mathbf{x}, \mathbf{u}, \mathbf{w}) & \mathbf{x}_{n+1}=f\left(\mathbf{x}_{n}, \mathbf{u}_{n}, \mathbf{w}_{n}\right) \\ \text { error-state } & \dot{\delta \mathbf{x}}=\mathbf{A} \delta \mathbf{x}+\mathbf{B \tilde{u}}+\mathbf{C} \mathbf{w} & \delta \mathbf{x}_{n+1}=\mathbf{F}_{\mathbf{x}} \delta \mathbf{x}_{n}+\mathbf{F}_{\mathbf{u}} \tilde{\mathbf{u}}_{n}+\mathbf{F}_{\mathbf{w}} \mathbf{w}_{n} \\ \hline \text { system/ transition matrix } & \mathbf{A} & \mathbf{F}_{\mathbf{x}}=\Phi=e^{\mathbf{A} \Delta t} \\ \text { control matrix } & \mathbf{B} & \mathbf{F}_{\mathbf{u}}=\mathbf{B} \Delta t \\ \text { perturbation matrix } & \mathbf{C} & \mathbf{F}_{\mathbf{w}}=\mathbf{C} \\ \hline \text { control covariance } & \mathbf{U}^{c} & \mathbf{U}=\mathbf{U}^{c} \\ \text { perturbation covariance } & \mathbf{W}^{c} & \mathbf{W}=\mathbf{W}^{c} \Delta t \\ \hline \end{array}  Description  state  error-state  system/ transition matrix  control matrix  perturbation matrix  control covariance  perturbation covariance  Continuous time tx˙=fc(x,u,w)δx˙=Aδx+Bu~+CwABCUcWc Discrete time nΔtxn+1=f(xn,un,wn)δxn+1=Fxδxn+Fuu~n+FwwnFx=Φ=eAΔtFu=BΔtFw=CU=UcW=WcΔt

    δ x n + 1 = F x δ x n + F u u ~ n + F w w n u ~ n ∼ N { 0 , U } , w n ∼ N { 0 , W } \delta \mathbf{x}_{n+1}=\mathbf{F}_{\mathbf{x}} \delta \mathbf{x}_{n}+\mathbf{F}_{\mathbf{u}} \tilde{\mathbf{u}}_{n}+\mathbf{F}_{\mathbf{w}} \mathbf{w}_{n} \\ \tilde{\mathbf{u}}_{n} \sim \mathcal{N}\{0, \mathbf{U}\} \quad, \quad \mathbf{w}_{n} \sim \mathcal{N}\{0, \mathbf{W}\} δxn+1=Fxδxn+Fuu~n+Fwwnu~nN{0,U},wnN{0,W}

    EKF预测阶段的两个方程:
    δ x ^ n + 1 = F x δ ^ x n P n + 1 = F x P n F x ⊤ + F u U F u ⊤ + F w W F w ⊤ = e A Δ t P n ( e A Δ t ) ⊤ + Δ t 2 B U c B ⊤ + Δ t C W c C ⊤ \begin{aligned} \hat{\delta \mathbf{x}}_{n+1} &=\mathbf{F}_{\mathbf{x}} \hat{\delta} \mathbf{x}_{n} \\ \mathbf{P}_{n+1} &=\mathbf{F}_{\mathbf{x}} \mathbf{P}_{n} \mathbf{F}_{\mathbf{x}}^{\top}+\mathbf{F}_{\mathbf{u}} \mathbf{U} \mathbf{F}_{\mathbf{u}}^{\top}+\mathbf{F}_{\mathbf{w}} \mathbf{W} \mathbf{F}_{\mathbf{w}}^{\top} \\ &=e^{\mathbf{A} \Delta t} \mathbf{P}_{n}\left(e^{\mathbf{A} \Delta t}\right)^{\top}+\Delta t^{2} \mathbf{B} \mathbf{U}^{c} \mathbf{B}^{\top}+\Delta t \mathbf{C} \mathbf{W}^{c} \mathbf{C}^{\top} \end{aligned} δx^n+1Pn+1=Fxδ^xn=FxPnFx+FuUFu+FwWFw=eAΔtPn(eAΔt)+Δt2BUcB+ΔtCWcC

    注意观察:

    • the dynamic error term is exponential
    • the measurement error term is quadratic
    • and the perturbation error term is linear

5. ESKF中需要进行两次积分

Integration needs to be done for the following sub-systems

  • The nominal state
  • The error-state
    • The deterministic part: state dynamics and control
    • The stochastic part: noise and perturbations

@leatherwang
二零二一年十月三日

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
很抱歉,我是一个AI语言模型,无法提供代码编写服务。但我可以提供一个ESKF融合imu与odom数据的Python示例代码供参考: ```python import numpy as np # ESKF参数设置 class ESKF_Params(): def __init__(self): self.gravity = 9.81 self.gyro_noise = 0.0015 # rad/s self.acc_noise = 0.05 # m/s^2 self.gyro_bias = 0.001 # rad/s self.acc_bias = 0.1 # m/s^2 self.P_matrix = np.identity(15) # 初始协方差矩阵 self.Q_matrix = np.identity(12) # 状态转移噪声矩阵 self.R_matrix = np.identity(6) # 观测噪声矩阵 self.alpha = 1e-4 # 残差的比例因子 self.beta = 2 # 残差的方差因子 # ESKF状态存储 class ESKF_State(): def __init__(self): self.Rotation = np.eye(3) self.Position = np.zeros((3,1)) self.Velocity = np.zeros((3,1)) self.AccBias = np.zeros((3,1)) self.GyroBias = np.zeros((3,1)) self.P_matrix = np.identity(15) # 进行状态预测 def ESKF_Prediction(u, dt, S, params): accData = u[:3].reshape((3,1)) gyroData = u[3:].reshape((3,1)) accData -= S.AccBias gyroData -= S.GyroBias Cn = S.Rotation.T gravity = np.array([0, 0, -params.gravity]).reshape((3,1)) linearVel = S.Velocity + (dt * (accData - (Cn @ gravity))) linearPos = S.Position + (dt * S.Velocity) + (0.5 * (dt ** 2) * (accData - (Cn @ gravity))) gyroBias = S.GyroBias accBias = S.AccBias F_mtx = np.identity(15) F_mtx[:3, 3:6] = np.eye(3) * dt F_mtx[:3, 6:9] = (-Cn @ dt) F_mtx[3:6, 9:12] = np.eye(3) * (-dt) G_mtx = np.zeros((15, 12)) G_mtx[6:9, :3] = -Cn * dt G_mtx[9:12, 3:] = np.eye(3) * dt Q = np.zeros((12, 12)) Q[:3, :3] = (params.acc_noise ** 2) * np.eye(3) Q[3:6, 3:6] = (params.gyro_noise ** 2) * np.eye(3) Q[6:9, 6:9] = (params.acc_bias ** 2) * np.eye(3) Q[9:, 9:] = (params.gyro_bias ** 2) * np.eye(3) F_mtx *= (-1 * params.alpha * dt) G_mtx *= (-1 * params.alpha) Q *= params.beta Q_mtx = np.dot(np.dot(G_mtx, Q), G_mtx.T) + np.dot(np.dot(F_mtx, S.P_matrix), F_mtx.T) X = np.concatenate((linearPos, linearVel, accBias, gyroBias), axis=0) S.Position = linearPos S.Velocity = linearVel S.GyroBias = gyroBias S.AccBias = accBias S.P_matrix = np.dot(np.dot(F_mtx, S.P_matrix), F_mtx.T) + Q_mtx return S, X # 进行状态更新 def ESKF_Update(z, S, X, params): Cn = S.Rotation.T accData = z[:3].reshape((3,1)) posData = z[3:].reshape((3,1)) posData = posData / np.linalg.norm(posData) gravity = np.array([0, 0, -params.gravity]).reshape((3,1)) predPos = S.Position + (S.Velocity * (z[-1] - X[-1])) predVel = S.Velocity predAccBias = S.AccBias predGyroBias = S.GyroBias Cn = Cn @ np.array([[1., gyroData[0]*dt/2., gyroData[1]*dt/2], [-gyroData[0]*dt/2., 1., gyroData[2]*dt/2.], [-gyroData[1]*dt/2., -gyroData[2]*dt/2., 1.]]) H_mtx = np.zeros((6, 15)) H_mtx[:3, 3:6] = np.eye(3) H_mtx[3:6, :3] = (2 * (np.dot(np.dot(np.linalg.inv(Cn), gravity), posData)) * (np.dot(np.dot(np.linalg.inv(Cn), gravity), posData)).T) - (np.dot(np.linalg.inv(Cn), gravity)).T H_mtx[3:6, 6:9] = np.dot(np.dot(np.linalg.inv(Cn), gravity), posData) * np.dot(np.dot(np.linalg.inv(Cn), np.array([[0, -S.Position[2], S.Position[1]], [S.Position[2], 0, -S.Position[0]], [-S.Position[1], S.Position[0], 0]])), (Cn @ dt)) R_mtx = np.diag([(params.acc_noise ** 2) * np.eye(3), (params.acc_bias ** 2) * np.eye(3)]) K_mtx = np.dot(np.dot(S.P_matrix, H_mtx.T), np.linalg.inv(np.dot(np.dot(H_mtx, S.P_matrix), H_mtx.T) + R_mtx)) delta_x = np.dot(K_mtx, (z - np.concatenate((np.dot(Cn, gravity), S.Position), axis=0))) X += np.dot(K_mtx, (z - np.concatenate((np.dot(Cn, gravity), S.Position), axis=0))) predPos += delta_x[:3] predVel += delta_x[3:6] predAccBias += delta_x[6:9] predGyroBias += delta_x[9:] S.Position = predPos S.Velocity = predVel S.AccBias = predAccBias S.GyroBias = predGyroBias S.P_matrix -= np.dot(np.dot(K_mtx, H_mtx), S.P_matrix) S.P_matrix = (S.P_matrix + S.P_matrix.T) * 0.5 return S, X # ESKF滤波器函数 def ESKF_Filter(imuData, odomData, params, omega_init=None): S = ESKF_State() X = np.zeros(15) for i in range(imuData.shape[1] - 1): dt = imuData[0, i+1] - imuData[0, i] if omega_init is None: omega_init = np.zeros((3,1)) u = np.concatenate((imuData[1:, i].reshape((-1,1)), omega_init), axis=0) S, X = ESKF_Prediction(u, dt, S, params) if np.any(np.abs(odomData[0, :] - imuData[0, i]) < 1e-5): idx = np.argmin(np.abs(odomData[0, :] - imuData[0, i])) z = np.concatenate((odomData[1:4, idx].reshape((-1,1)), odomData[4:7, idx].reshape((-1,1)), np.array([odomData[0, idx]]).reshape((-1,1))), axis=0) S, X = ESKF_Update(z, S, X, params) return S, X ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值