I'm investigating the usage of the incremental smoothing and mapping class (isam2) in the gtsam package for a real-time image navigation problem. The issue is that while the API has methods for adding factors to the factor graph using isam2::update(...), there is no clear method for removing these factors. Therefore in a real-time (not batch) application, the memory required will grow unbounded.
So the questions are:
- Is there an API for removing factors and still maintaining a consistent SLAM?
- How does the isam2 class avoid this memory creep?