Skip to content

Reduce voxel-map memory while preserving odometry results - #4

Merged
Daehan2Lee merged 1 commit into
masterfrom
perf/reduce-voxel-map-memory
Oct 20, 2026
Merged

Daehan2Lee merged 1 commit into
masterfrom
perf/reduce-voxel-map-memory

Conversation

@Daehan2Lee

Copy link
Copy Markdown
Member

Large maps retain scan-only fields and allocate plane and threshold storage in cells that do not need them. This reduces voxel-map memory while preserving double-precision coordinates/covariances, retained geometry, matching rules, and configured map range.

Related to #2.

Changes

  • Store only world-frame position and covariance in map points; keep the full scan/query representation unchanged.
  • Release temporary samples only for frozen planar cells with retained candidates and no later refit, and avoid reserving unused candidate capacity.
  • Allocate a plane at the first fit; share immutable layer thresholds among descendants and remove unused node fields.
  • Update Python map extraction and ROS voxel visualization for compact points and unfitted cells, with a storage-lifecycle regression test.

Validation

The combined implementation was compared with the original on six complete recordings, with Python visualization disabled and the same settings and input. Poses, timestamps, per-frame pose/covariance hashes, diagnostics, and evaluation coverage matched exactly.

Sequence ATE, both versions (m) Peak RSS before → after (MiB) Reduction
GEODE Stairs 0.271480 2270.9 → 914.2 59.7%
GEODE Waterways-Short 0.790436 3722.4 → 1666.3 55.2%
NarrowWide Handheld-B-02 0.181170 5172.4 → 2055.1 60.3%
NarrowWide Tracked-01 0.124599 2819.1 → 1144.6 59.4%
ENWIDE Intersection-S 0.167685 479.4 → 226.7 52.7%
HILTI 2022 Exp-10 0.376698 1850.8 → 927.8 49.9%

Timing varied between runs; the two initial wall-time increases did not recur in reversed-order paired checks. This is a memory reduction, not a guarantee of faster execution or a fixed memory cap.

The PR core implementation matches the evaluated combined variant after removing experiment switches, instrumentation-only accessors, and comments. The final sources were rebuilt and checked: 18 core tests; 159 Python tests passed, 1 skipped; 21 ROS 1 Noetic tests; 23 ROS 2 Jazzy tests; and the storage-lifecycle test under AddressSanitizer/UndefinedBehaviorSanitizer with leak detection. The full-recording comparisons above are Python OFF runs; ROS checks here are build/unit/integration checks.

Rebuild the Python extension and ROS nodes when using this change because the internal map storage layout changes.

@Daehan2Lee
Daehan2Lee merged commit 7e653b2 into master Oct 20, 2026
14 checks passed
This was referenced Oct 20, 2026
@Daehan2Lee
Daehan2Lee deleted the perf/reduce-voxel-map-memory branch October 20, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant