Sliding-window filters (SWF) are common in VIO and SLAM: MSCKF, OKVIS, and VINS-Mono are familiar examples. They fall into filter-based and optimization-based families. MSCKF is a typical EKF-based approach; marginalization simply removes the relevant covariance rows and columns. Optimization-based approaches instead require a Schur complement on the Hessian. This article starts with the simpler filter formulation and implements a visual-plus-wheel odometry system based on MSCKF [1].
Simulation and KAIST-dataset results are presented below.
To make visual correction visible, wheel noise is deliberately set high, so trajectories are less smooth. Lower wheel noise for smoother results.
Wheel / odometry frame{O}: at the rear-axle center on the ground; x forward, y left, z upward.
Global frame{G}: coincides with the initial wheel frame.
Camera frame{C}: x right, y down, z forward.
3. Intrinsics and extrinsics
Intrinsic parameters: camera intrinsics, wheelbase b, and left/right wheel coefficients kl,kr, which convert encoder counts to metres or wheel rates to m/s.
Extrinsic parameters: the rotation RCO and translation pCO from the wheel frame to the camera frame.
These parameters are assumed calibrated in advance. They could also be estimated as part of the state, as in OpenVINS, although their observability must be considered; relevant work is available from Guoquan Huang.
4. State vector
The sliding window contains the odometry pose
TGO={RGO,pGO}∈SE(3),
and a sequence of camera poses
TGC={RGC,pGC}∈SE(3).
The complete state consists of the current odometry pose and N camera poses:
χ=[TGOTGC,1TGC,2⋯TGC,N].(1)
As in MSCKF, covariance is block-partitioned:
Pk:k=[POO,k:kPOC,k:kTPOC,k:kPCC,k:k].(2)
POO,k:k is the 6×6 covariance of the odometry pose; PCC,k:k is the 6N×6N covariance of the camera poses.
This implementation keeps the simplest window policy: after adding a new frame, marginalize the oldest one. In an EKF this means removing that camera pose from χ and deleting the corresponding covariance rows and columns.
5. Wheel propagation
EKF has two stages: propagation and update. Wheel data propagates the state; visual information updates it. Following Mingyang Li [2], the ODEs are
R˙GO=RGO[ωO]×,p˙GO=RGOvO.(3)
ωO is the clockwise angular velocity in the wheel frame. Wheels observe only yaw:
ωO=00(krvr−klvl)/b.(4)
The wheel-frame velocity similarly has only its forward component:
vO=(klvl+krvr)/200.(5)
Here vl,vr are left and right wheel velocities. Using Euler integration,
For a new image frame, compute its camera pose from the odometry pose:
RGC=RGOROC,pGC=pGO+RGOpOC.(11)
Append it to the state and expand covariance:
Pk∣k←[I6N+6J]Pk∣k[I6N+6J]T,(12)
where the Jacobian with respect to the old state is
J=[ROCT−RGO[pOC]×0I00].(13)
The leading two blocks are derivatives with respect to the odometry pose.
7. Update
7.1 Visual update
A major MSCKF advantage is that feature points are not part of the state, reducing computation. A feature is used for update only when it is lost:
tracking loss: it is no longer visible in the current frame;
marginalization: it was created in the frame leaving the window.
Here “feature” denotes both the 3D point and its 2D image observation.
A. One feature
A feature pGf seen by M camera frames projects in frame i as
zi=πpCfRGCT(pGf−pGC).(14)
Linearization gives
ri=Hχiδχi+HfiδpGf.(15)
The 3D feature must still be reconstructed to evaluate Hχi. Stacking all observations of one feature gives
r=Hχδχ+HfδpGf.(16)
Because features are absent from the state, eliminate their increment using the left null space. Multiply both sides by AT:
ATr=ATHχδχ+ATHfδpGf.(17)
Choose A such that ATHf=0. MSCKF uses Givens rotations; a QR decomposition also works:
Hf=[Q1Q2][R0]=Q1R,Q2THf=0.
Thus A=Q2, producing the feature-free equation
r=Hχδχ.(18)
B. Multiple features
Stacking the reduced constraints of many features yields
r∗=H∗δχ.(19)
This system often has many rows, making a direct EKF update expensive. QR compresses it:
H∗=[Q1Q2][TH0].
Premultiplication by the orthogonal basis gives the compressed equation
rn=Q1Tr∗=THδχ.(20)
Its row count is at most the state dimension, and it is this equation that feeds the EKF update.
C. Marginalization
The oldest frame leaves the window. All features created in that frame are first used to update the filter, then that pose and its corresponding covariance rows and columns are removed.
For each incoming image:
augment the state;
track features;
collect features whose tracking was lost;
collect features created in the frame to be marginalized;
construct Equation (20) and perform the EKF update;
marginalize the leaving pose.
7.2 Plane-constraint update
Vehicles usually move on a plane. Add the planar constraint from VINS on Wheels [3]. Let frame {π} lie in that plane; it has orientation RπG and the global-origin distance projected on its z axis is zπG.
The relative odometry-to-plane attitude has yaw only, so its roll and pitch vanish:
02×1=ΛRπGRGOe3,Λ=[100100],e3=001.(21)
The global origin’s signed distance to the odometry x-y plane must equal zπG:
zπG=−e3TRπGpGO.(22)
The Jacobian with respect to the odometry pose is
Hp=[−ΛRπGRGO[e3]×00−e3TRπG].(23)
For this application the plane is the initial odometry x-y plane:
RπG=I,zπG=0.(24)
Equations (21–22) then constrain the leading 2×1 elements of the third rotation column to zero and force the z component of pGO to zero.
Simulation: VWO-MSCKF is clearly more accurate than wheel-only odometry.
Dataset: the KAIST dataset similarly improves accuracy compared with raw wheel odometry.
The wheel intrinsic calibration used here is relatively inaccurate, so raw odometry is weak. With highly accurate wheel intrinsics, VWO-MSCKF need not necessarily outperform wheel-only odometry.