Overview¶
The IncrementalFixedLagSmoother
is a FixedLagSmoother that uses LevenbergMarquardtOptimizer for batch optimization.
This fixed lag smoother will batch-optimize at every iteration, but warm-started from the last estimate.
API¶
Constructor¶
You construct a BatchFixedLagSmoother
object with the following parameters:
- smootherLag: The length of the smoother lag. Any variable older than this amount will be marginalized out. (Default: 0.0)
- parameters: The Levenberg-Marquardt optimization parameters. (Default:
LevenbergMarquardtParams()
) - enforceConsistency: A flag indicating whether the optimizer should enforce probabilistic consistency by maintaining the linearization point of all variables involved in linearized/marginal factors at the edge of the smoothing window. (Default:
true
)
Smoothing and Optimization¶
- update: This method is the core of the
BatchFixedLagSmoother
. It processes new factors and variables, updating the current estimate of the state. The update method also manages the marginalization of variables that fall outside the fixed lag window.
Computational Considerations¶
Every call to update
triggers a batch LM optimization: use the parameters to control the convergence thresholds to bound computation to fit within your application.
Internals¶
- marginalize: This function handles the marginalization of variables that are no longer within the fixed lag window. Marginalization is a crucial step in maintaining the size of the factor graph, ensuring that only relevant variables are kept for optimization.