diff --git a/gtsam_unstable/nonlinear/IncrementalFixedLagSmoother.cpp b/gtsam_unstable/nonlinear/IncrementalFixedLagSmoother.cpp index 52e56260d6..ec543e45fc 100644 --- a/gtsam_unstable/nonlinear/IncrementalFixedLagSmoother.cpp +++ b/gtsam_unstable/nonlinear/IncrementalFixedLagSmoother.cpp @@ -118,6 +118,10 @@ FixedLagSmoother::Result IncrementalFixedLagSmoother::update( std::set additionalKeys; for(Key key: marginalizableKeys) { ISAM2Clique::shared_ptr clique = isam_[key]; + // Mark all frontal keys of the current clique. + additionalKeys.insert(clique->conditional()->frontals().begin(), + clique->conditional()->frontals().end()); + // Recursively mark all of the children key that contain the marginal key. for(const ISAM2Clique::shared_ptr& child: clique->children) { recursiveMarkAffectedKeys(key, child, additionalKeys); }