Skip to content

Submap culling for long-duration / repetitive trajectories #299

Description

@kgreenek

I’ve been using GLIM for a long-running deployment where the robot repeatedly traverses the same area (e.g., back-and-forth operation over many hours) while building the map online.

In this setting, the number of submaps grows unbounded over time, and memory usage eventually exceeds system limits; even though much of the trajectory revisits previously mapped regions.

Motivation

When the trajectory overlaps with previously built submaps, older submaps in those regions become largely redundant. Retaining all of them does not provide additional mapping benefit, but does increase memory and compute cost.

Proposal

I’d like to propose an optional submap culling mechanism:

  • Detect when a new submap sufficiently overlaps with existing submaps
  • Remove or retire older submaps in the overlapping region
  • Keep this feature disabled by default to preserve current behavior

Potential controls could include:

  • Overlap threshold (e.g., spatial / keyframe-based)
  • Minimum age or distance before a submap is eligible for removal
  • Option to retain a sparse global structure while culling dense local data

Implementation (WIP)

I’ve implemented a proof-of-concept in a private fork that identifies overlapping submaps based on spatial proximity and removes older submaps once sufficient overlap is detected.

So far this has significantly reduced memory growth in long-duration runs. I'm still evaluating the overall performance.

Questions

  • Has submap culling (or a similar memory management strategy) been considered before?
  • Would you be open to a contribution implementing this as an optional feature?
  • Are there specific design constraints I should be aware of (e.g., interaction with loop closure / optimization)?

Happy to clean up the implementation and submit a PR if this aligns with the project direction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions