Overview¶
The FixedLagSmoother
class is the base class for BatchFixedLagSmoother and IncrementalFixedLagSmoother.
It provides an API for fixed-lag smoothing in nonlinear factor graphs. It maintains a sliding window of the most recent variables and marginalizes out older variables. This is particularly useful in real-time applications where memory and computational efficiency are critical.
Mathematical Formulation¶
In fixed-lag smoothing the objective is to estimate the state given all measurements up to time , but only retaining a fixed window of recent states. The optimization problem can be expressed as:
where is the fixed lag, are the measurement functions, and are the measurements. In practice, the functions depend only on a subset of the state variables , and the optimization is performed over a set of factors instead:
The API below allows the user to add new factors at every iteration, which will be automatically pruned after they no longer depend on any variables in the lag.