A compact, robotics-friendly C++ project that implements:
- Bayes filter recursion (conceptual baseline)
- Kalman filter (KF)
- Extended Kalman filter (EKF)
- Unscented Kalman filter (UKF)
- Particle filter (PF)
- Generalized Gaussian filter (GGF) implemented as a Gauss–Hermite quadrature Gaussian filter (a.k.a. Gauss–Hermite Kalman filter)
The code is intentionally minimal, but designed so you can drop in your own process/measurement models (e.g., IMU preintegration, leg odometry, SE(3) pose, etc.).
cmake -S . -B build -DSTATE_ESTIMATION_BUILD_EXAMPLES=ON -DSTATE_ESTIMATION_BUILD_TESTS=ON
cmake --build build -j
ctest --test-dir buildRun examples:
./build/example_linear_cv
./build/example_pendulummodels/ProcessModel.hpp: definex_{k+1} = f(x_k, u_k, dt) + w, withQmodels/MeasurementModel.hpp: definez_k = h(x_k) + v, withRfilters/*: KF, EKF, UKF, PF, and GGFtransforms/*: moment transforms used by Gaussian filters (e.g., UT, Gauss–Hermite)
EKF, UKF, and Gauss–Hermite GGF are all instances of Gaussian filtering: represent belief as (mean,cov) and approximate the necessary expectations to propagate through nonlinear f and h.
This repo exposes that idea via GaussianFilter + MomentTransform:
UnscentedTransform→ UKFGaussHermiteTransform→ GGF
- Manifold states (SO(3), SE(3)): replace
Vectorwith a state container supportingboxplus/boxminusand use an error-state formulation. - Square-root filters: swap covariance update for numerically robust square-root forms.
- High-dimensional GGF: Gauss–Hermite grows as
order^n; for largen, prefer UKF or sparse quadrature.