Package Summary

Version 3.1.1
License GPLv3
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/MOLAorg/mola.git
VCS Type git
VCS Version develop
Last Updated 2026-08-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Advanced metric map classes, using the generic `mrpt::maps::CMetricMap` interface, for use in other MOLA odometry and SLAM modules.

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional authors.

mola_metric_maps

Advanced metric map classes for LiDAR odometry and SLAM, built on the generic mrpt::maps::CMetricMap interface. All maps are serializable, visualizable, and integrate with the mp2p_icp registration library.


Map classes

Production-quality maps

Class Header Description
mola::HashedVoxelPointCloud HashedVoxelPointCloud.h Flat sparse hash map of cubic voxels. Up to 32 points per voxel stored without heap allocation (fixed array SSO). Backend: tsl::robin_map. Implements NearestNeighborsCapable.
mola::SparseVoxelPointCloud SparseVoxelPointCloud.h Two-level voxel map: sparse outer blocks + 32³ inner FixedDenseGrid3D. Tracks per-voxel point means; supports voxel-mean ICP matching. Implements NearestNeighborsCapable. The primary workhorse map in MOLA LO/SLAM.
mola::NDT NDT.h Normal Distributions Transform map (Magnusson 2007). Fits a Gaussian per voxel; planar voxels expose NearestPlaneCapable, non-planar ones expose NearestNeighborsCapable. Enables automatic point-to-point vs. point-to-plane pairing selection.
mola::KeyframePointCloudMap KeyframePointCloudMap.h Keyframe-based map: each keyframe holds a local point cloud plus a SE(3) pose. Supports map corrections without re-inserting points (just update poses). Implements IcpPrepareCapable, NearestPointWithCovCapable, and MetricMapMergeCapable.

Experimental / work-in-progress maps

Class Header Status
mola::SparseTreesPointCloud SparseTreesPointCloud.h Coarse 3D grid of independent CSimplePointsMap sub-maps, each with its own KD-tree. Functionally complete but not benchmarked against the hash-based alternatives for typical SLAM workloads.
mola::OccGrid OccGrid.h Wraps mrpt::maps::COccupancyGridMap2D with a super-resolution likelihood cache. The cache infrastructure is in place but likelihood population is not yet implemented (// TODO). Not used in any production pipeline.

Utility / internal classes

Class Header Description
mola::index3d_t<T> index3d_t.h Discrete 3D integer index. Works as key in std::map and std::unordered_map / tsl::robin_map via the index3d_hash functor, which implements the Teschner et al. (2003) spatial hash.
mola::FixedDenseGrid3D<T,N,C> FixedDenseGrid3D.h Dense NxNxN grid (N=2^SIDE_NUM_BITS) allocated with calloc for fast zero-init. Used as the inner block in SparseVoxelPointCloud. Requires trivially-copyable cell types.

Build and install

Refer to the root MOLA repository.

License

Copyright (C) 2018-2026 Jose Luis Blanco jlblanco@ual.es, University of Almeria

This package is released under the GNU GPL v3 license as open source for research and evaluation purposes only. Commercial licenses available upon request, for this package alone or in combination with the complete SLAM system.

CHANGELOG

Changelog for package mola_metric_maps

3.1.1 (2026-08-10)

  • mola_metric_maps: fix calloc arg order and nodiscard warnings on newer GCC.
  • Give nn_search_cov2cov() a canonical pairing order. The parallel path merged per-thread correspondences in unspecified order, making ICP results non-deterministic run to run; now sorted by local_idx to match the sequential path.
  • IncrementalPointCloud: rebuild the k-d tree on a global SE(3) re-map. changeCoordinatesReference() rewrote coordinates in place without resizing, so the k-d tree kept stale split planes and nearest-neighbor queries silently returned wrong results. Fixes #186.
  • mola_metric_maps: depend on nanoflann_vendor instead of nanoflann, since the rosdep key otherwise resolves to the distro's older libnanoflann-dev.
  • fix(mola_metric_maps): don't require nanoflann>=1.5.1 for KeyframePointCloudMap covariances. Ubuntu jammy's older nanoflann made every use of mola::KeyframePointCloudMap throw on Humble; now falls back to a plain kNN truncated at the same radius, verified numerically equivalent.
  • Contributors: Jose Luis Blanco-Claraco

3.1.0 (2026-08-06)

  • Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)

  • address review comments

  • Add k-d tree baking for IncrementalPointCloud + mm-ipc-bake-kdtree tool Serializes the incremental k-d tree index alongside an IncrementalPointCloud layer's points (TCreationOptions::serialize_kdtree), so it does not have to be rebuilt (an O(N log M) bulk build) on every load. Unlike KeyframePointCloudMap's baked static trees, nanoflann's incremental index had no save/load support at all; this depends on saveIndex()/loadIndex() added upstream (nanoflann >= 1.11.0, see the companion nanoflann PR), gated behind MOLA_METRIC_MAPS_HAS_INCREMENTAL_KDTREE_BAKE so older builds keep working with the option as a documented no-op. Serialization always writes/reads the compacted (tombstone-free) point order, so baking builds a throwaway index over that exact order rather than reusing the live index (whose slots may not match after tombstones/slot recycling). Adds the mm-ipc-bake-kdtree CLI tool (analogous to mm-kf-bake-kdtrees) and a shared mm_cli_utils.h generic layer-iteration helper for it. Unit tests cover: bake/load round-trip through memory and through a real temporary file, k-d tree parameters differing between bake and load time, clearing and re-inserting into a loaded (baked) map, further insertions/trims on a loaded map, and serialize_kdtree=false remaining a no-op -- all independent of whether this build's nanoflann actually supports baking.

  • changelog

  • chore: document and fix some multithreading issues

  • Merge pull request #185 from MOLAorg/chore/remove-keyframe-map-capable Remove the KeyframeMapCapable interface

  • docs: drop the KeyframeMapCapable references left behind

  • chore: remove the KeyframeMapCapable interface This mixin was introduced to expose per-KF pose plumbing to mola_lidar_odometry's trajectory-rebake experiment, which corrected accumulated tilt by re-integrating the keyframe chain. That experiment is being removed: it was never wired in, and rotating map keyframes without transforming the trajectory consistently leaks vertical position. The interface had exactly one implementation and no callers, so it is removed along with the two methods that existed only for the rebake path, [oldestActiveKeyframeID()]{.title-ref} and [applyPivotTransform()]{.title-ref}. [keyframePoses()]{.title-ref} is kept, since the regroup tests already use it as ordinary map API, and the duplicate [cloneKFPoses()]{.title-ref} (whose only difference was not being the virtual one) is folded into it.

  • Merge pull request #184 from MOLAorg/feat/incremental-pointcloud-map feat(metric_maps): add mola::IncrementalPointCloud (incremental k-d tree local map)

  • docs: correct the trySetCreationOptions contract The k-d tree parameters used to require an empty map, with trySetCreationOptions() returning false rather than discarding points. It now compacts and rebuilds instead, so it always succeeds and keeps the map contents; only the previously returned point indices are invalidated. The TCreationOptions docs still described the old behaviour.

  • style: apply clang-format-14

  • feat(metric_maps): degrade gracefully on distros with an old nanoflann The incremental k-d tree index needs nanoflann >= 1.10.0.

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_metric_maps at Robotics Stack Exchange

Package Summary

Version 3.1.1
License GPLv3
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/MOLAorg/mola.git
VCS Type git
VCS Version develop
Last Updated 2026-08-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Advanced metric map classes, using the generic `mrpt::maps::CMetricMap` interface, for use in other MOLA odometry and SLAM modules.

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional authors.

mola_metric_maps

Advanced metric map classes for LiDAR odometry and SLAM, built on the generic mrpt::maps::CMetricMap interface. All maps are serializable, visualizable, and integrate with the mp2p_icp registration library.


Map classes

Production-quality maps

Class Header Description
mola::HashedVoxelPointCloud HashedVoxelPointCloud.h Flat sparse hash map of cubic voxels. Up to 32 points per voxel stored without heap allocation (fixed array SSO). Backend: tsl::robin_map. Implements NearestNeighborsCapable.
mola::SparseVoxelPointCloud SparseVoxelPointCloud.h Two-level voxel map: sparse outer blocks + 32³ inner FixedDenseGrid3D. Tracks per-voxel point means; supports voxel-mean ICP matching. Implements NearestNeighborsCapable. The primary workhorse map in MOLA LO/SLAM.
mola::NDT NDT.h Normal Distributions Transform map (Magnusson 2007). Fits a Gaussian per voxel; planar voxels expose NearestPlaneCapable, non-planar ones expose NearestNeighborsCapable. Enables automatic point-to-point vs. point-to-plane pairing selection.
mola::KeyframePointCloudMap KeyframePointCloudMap.h Keyframe-based map: each keyframe holds a local point cloud plus a SE(3) pose. Supports map corrections without re-inserting points (just update poses). Implements IcpPrepareCapable, NearestPointWithCovCapable, and MetricMapMergeCapable.

Experimental / work-in-progress maps

Class Header Status
mola::SparseTreesPointCloud SparseTreesPointCloud.h Coarse 3D grid of independent CSimplePointsMap sub-maps, each with its own KD-tree. Functionally complete but not benchmarked against the hash-based alternatives for typical SLAM workloads.
mola::OccGrid OccGrid.h Wraps mrpt::maps::COccupancyGridMap2D with a super-resolution likelihood cache. The cache infrastructure is in place but likelihood population is not yet implemented (// TODO). Not used in any production pipeline.

Utility / internal classes

Class Header Description
mola::index3d_t<T> index3d_t.h Discrete 3D integer index. Works as key in std::map and std::unordered_map / tsl::robin_map via the index3d_hash functor, which implements the Teschner et al. (2003) spatial hash.
mola::FixedDenseGrid3D<T,N,C> FixedDenseGrid3D.h Dense NxNxN grid (N=2^SIDE_NUM_BITS) allocated with calloc for fast zero-init. Used as the inner block in SparseVoxelPointCloud. Requires trivially-copyable cell types.

Build and install

Refer to the root MOLA repository.

License

Copyright (C) 2018-2026 Jose Luis Blanco jlblanco@ual.es, University of Almeria

This package is released under the GNU GPL v3 license as open source for research and evaluation purposes only. Commercial licenses available upon request, for this package alone or in combination with the complete SLAM system.

CHANGELOG

Changelog for package mola_metric_maps

3.1.1 (2026-08-10)

  • mola_metric_maps: fix calloc arg order and nodiscard warnings on newer GCC.
  • Give nn_search_cov2cov() a canonical pairing order. The parallel path merged per-thread correspondences in unspecified order, making ICP results non-deterministic run to run; now sorted by local_idx to match the sequential path.
  • IncrementalPointCloud: rebuild the k-d tree on a global SE(3) re-map. changeCoordinatesReference() rewrote coordinates in place without resizing, so the k-d tree kept stale split planes and nearest-neighbor queries silently returned wrong results. Fixes #186.
  • mola_metric_maps: depend on nanoflann_vendor instead of nanoflann, since the rosdep key otherwise resolves to the distro's older libnanoflann-dev.
  • fix(mola_metric_maps): don't require nanoflann>=1.5.1 for KeyframePointCloudMap covariances. Ubuntu jammy's older nanoflann made every use of mola::KeyframePointCloudMap throw on Humble; now falls back to a plain kNN truncated at the same radius, verified numerically equivalent.
  • Contributors: Jose Luis Blanco-Claraco

3.1.0 (2026-08-06)

  • Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)

  • address review comments

  • Add k-d tree baking for IncrementalPointCloud + mm-ipc-bake-kdtree tool Serializes the incremental k-d tree index alongside an IncrementalPointCloud layer's points (TCreationOptions::serialize_kdtree), so it does not have to be rebuilt (an O(N log M) bulk build) on every load. Unlike KeyframePointCloudMap's baked static trees, nanoflann's incremental index had no save/load support at all; this depends on saveIndex()/loadIndex() added upstream (nanoflann >= 1.11.0, see the companion nanoflann PR), gated behind MOLA_METRIC_MAPS_HAS_INCREMENTAL_KDTREE_BAKE so older builds keep working with the option as a documented no-op. Serialization always writes/reads the compacted (tombstone-free) point order, so baking builds a throwaway index over that exact order rather than reusing the live index (whose slots may not match after tombstones/slot recycling). Adds the mm-ipc-bake-kdtree CLI tool (analogous to mm-kf-bake-kdtrees) and a shared mm_cli_utils.h generic layer-iteration helper for it. Unit tests cover: bake/load round-trip through memory and through a real temporary file, k-d tree parameters differing between bake and load time, clearing and re-inserting into a loaded (baked) map, further insertions/trims on a loaded map, and serialize_kdtree=false remaining a no-op -- all independent of whether this build's nanoflann actually supports baking.

  • changelog

  • chore: document and fix some multithreading issues

  • Merge pull request #185 from MOLAorg/chore/remove-keyframe-map-capable Remove the KeyframeMapCapable interface

  • docs: drop the KeyframeMapCapable references left behind

  • chore: remove the KeyframeMapCapable interface This mixin was introduced to expose per-KF pose plumbing to mola_lidar_odometry's trajectory-rebake experiment, which corrected accumulated tilt by re-integrating the keyframe chain. That experiment is being removed: it was never wired in, and rotating map keyframes without transforming the trajectory consistently leaks vertical position. The interface had exactly one implementation and no callers, so it is removed along with the two methods that existed only for the rebake path, [oldestActiveKeyframeID()]{.title-ref} and [applyPivotTransform()]{.title-ref}. [keyframePoses()]{.title-ref} is kept, since the regroup tests already use it as ordinary map API, and the duplicate [cloneKFPoses()]{.title-ref} (whose only difference was not being the virtual one) is folded into it.

  • Merge pull request #184 from MOLAorg/feat/incremental-pointcloud-map feat(metric_maps): add mola::IncrementalPointCloud (incremental k-d tree local map)

  • docs: correct the trySetCreationOptions contract The k-d tree parameters used to require an empty map, with trySetCreationOptions() returning false rather than discarding points. It now compacts and rebuilds instead, so it always succeeds and keeps the map contents; only the previously returned point indices are invalidated. The TCreationOptions docs still described the old behaviour.

  • style: apply clang-format-14

  • feat(metric_maps): degrade gracefully on distros with an old nanoflann The incremental k-d tree index needs nanoflann >= 1.10.0.

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_metric_maps at Robotics Stack Exchange

Package Summary

Version 3.1.1
License GPLv3
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/MOLAorg/mola.git
VCS Type git
VCS Version develop
Last Updated 2026-08-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Advanced metric map classes, using the generic `mrpt::maps::CMetricMap` interface, for use in other MOLA odometry and SLAM modules.

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional authors.

mola_metric_maps

Advanced metric map classes for LiDAR odometry and SLAM, built on the generic mrpt::maps::CMetricMap interface. All maps are serializable, visualizable, and integrate with the mp2p_icp registration library.


Map classes

Production-quality maps

Class Header Description
mola::HashedVoxelPointCloud HashedVoxelPointCloud.h Flat sparse hash map of cubic voxels. Up to 32 points per voxel stored without heap allocation (fixed array SSO). Backend: tsl::robin_map. Implements NearestNeighborsCapable.
mola::SparseVoxelPointCloud SparseVoxelPointCloud.h Two-level voxel map: sparse outer blocks + 32³ inner FixedDenseGrid3D. Tracks per-voxel point means; supports voxel-mean ICP matching. Implements NearestNeighborsCapable. The primary workhorse map in MOLA LO/SLAM.
mola::NDT NDT.h Normal Distributions Transform map (Magnusson 2007). Fits a Gaussian per voxel; planar voxels expose NearestPlaneCapable, non-planar ones expose NearestNeighborsCapable. Enables automatic point-to-point vs. point-to-plane pairing selection.
mola::KeyframePointCloudMap KeyframePointCloudMap.h Keyframe-based map: each keyframe holds a local point cloud plus a SE(3) pose. Supports map corrections without re-inserting points (just update poses). Implements IcpPrepareCapable, NearestPointWithCovCapable, and MetricMapMergeCapable.

Experimental / work-in-progress maps

Class Header Status
mola::SparseTreesPointCloud SparseTreesPointCloud.h Coarse 3D grid of independent CSimplePointsMap sub-maps, each with its own KD-tree. Functionally complete but not benchmarked against the hash-based alternatives for typical SLAM workloads.
mola::OccGrid OccGrid.h Wraps mrpt::maps::COccupancyGridMap2D with a super-resolution likelihood cache. The cache infrastructure is in place but likelihood population is not yet implemented (// TODO). Not used in any production pipeline.

Utility / internal classes

Class Header Description
mola::index3d_t<T> index3d_t.h Discrete 3D integer index. Works as key in std::map and std::unordered_map / tsl::robin_map via the index3d_hash functor, which implements the Teschner et al. (2003) spatial hash.
mola::FixedDenseGrid3D<T,N,C> FixedDenseGrid3D.h Dense NxNxN grid (N=2^SIDE_NUM_BITS) allocated with calloc for fast zero-init. Used as the inner block in SparseVoxelPointCloud. Requires trivially-copyable cell types.

Build and install

Refer to the root MOLA repository.

License

Copyright (C) 2018-2026 Jose Luis Blanco jlblanco@ual.es, University of Almeria

This package is released under the GNU GPL v3 license as open source for research and evaluation purposes only. Commercial licenses available upon request, for this package alone or in combination with the complete SLAM system.

CHANGELOG

Changelog for package mola_metric_maps

3.1.1 (2026-08-10)

  • mola_metric_maps: fix calloc arg order and nodiscard warnings on newer GCC.
  • Give nn_search_cov2cov() a canonical pairing order. The parallel path merged per-thread correspondences in unspecified order, making ICP results non-deterministic run to run; now sorted by local_idx to match the sequential path.
  • IncrementalPointCloud: rebuild the k-d tree on a global SE(3) re-map. changeCoordinatesReference() rewrote coordinates in place without resizing, so the k-d tree kept stale split planes and nearest-neighbor queries silently returned wrong results. Fixes #186.
  • mola_metric_maps: depend on nanoflann_vendor instead of nanoflann, since the rosdep key otherwise resolves to the distro's older libnanoflann-dev.
  • fix(mola_metric_maps): don't require nanoflann>=1.5.1 for KeyframePointCloudMap covariances. Ubuntu jammy's older nanoflann made every use of mola::KeyframePointCloudMap throw on Humble; now falls back to a plain kNN truncated at the same radius, verified numerically equivalent.
  • Contributors: Jose Luis Blanco-Claraco

3.1.0 (2026-08-06)

  • Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)

  • address review comments

  • Add k-d tree baking for IncrementalPointCloud + mm-ipc-bake-kdtree tool Serializes the incremental k-d tree index alongside an IncrementalPointCloud layer's points (TCreationOptions::serialize_kdtree), so it does not have to be rebuilt (an O(N log M) bulk build) on every load. Unlike KeyframePointCloudMap's baked static trees, nanoflann's incremental index had no save/load support at all; this depends on saveIndex()/loadIndex() added upstream (nanoflann >= 1.11.0, see the companion nanoflann PR), gated behind MOLA_METRIC_MAPS_HAS_INCREMENTAL_KDTREE_BAKE so older builds keep working with the option as a documented no-op. Serialization always writes/reads the compacted (tombstone-free) point order, so baking builds a throwaway index over that exact order rather than reusing the live index (whose slots may not match after tombstones/slot recycling). Adds the mm-ipc-bake-kdtree CLI tool (analogous to mm-kf-bake-kdtrees) and a shared mm_cli_utils.h generic layer-iteration helper for it. Unit tests cover: bake/load round-trip through memory and through a real temporary file, k-d tree parameters differing between bake and load time, clearing and re-inserting into a loaded (baked) map, further insertions/trims on a loaded map, and serialize_kdtree=false remaining a no-op -- all independent of whether this build's nanoflann actually supports baking.

  • changelog

  • chore: document and fix some multithreading issues

  • Merge pull request #185 from MOLAorg/chore/remove-keyframe-map-capable Remove the KeyframeMapCapable interface

  • docs: drop the KeyframeMapCapable references left behind

  • chore: remove the KeyframeMapCapable interface This mixin was introduced to expose per-KF pose plumbing to mola_lidar_odometry's trajectory-rebake experiment, which corrected accumulated tilt by re-integrating the keyframe chain. That experiment is being removed: it was never wired in, and rotating map keyframes without transforming the trajectory consistently leaks vertical position. The interface had exactly one implementation and no callers, so it is removed along with the two methods that existed only for the rebake path, [oldestActiveKeyframeID()]{.title-ref} and [applyPivotTransform()]{.title-ref}. [keyframePoses()]{.title-ref} is kept, since the regroup tests already use it as ordinary map API, and the duplicate [cloneKFPoses()]{.title-ref} (whose only difference was not being the virtual one) is folded into it.

  • Merge pull request #184 from MOLAorg/feat/incremental-pointcloud-map feat(metric_maps): add mola::IncrementalPointCloud (incremental k-d tree local map)

  • docs: correct the trySetCreationOptions contract The k-d tree parameters used to require an empty map, with trySetCreationOptions() returning false rather than discarding points. It now compacts and rebuilds instead, so it always succeeds and keeps the map contents; only the previously returned point indices are invalidated. The TCreationOptions docs still described the old behaviour.

  • style: apply clang-format-14

  • feat(metric_maps): degrade gracefully on distros with an old nanoflann The incremental k-d tree index needs nanoflann >= 1.10.0.

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_metric_maps at Robotics Stack Exchange

Package Summary

Version 3.1.1
License GPLv3
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/MOLAorg/mola.git
VCS Type git
VCS Version develop
Last Updated 2026-08-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Advanced metric map classes, using the generic `mrpt::maps::CMetricMap` interface, for use in other MOLA odometry and SLAM modules.

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional authors.

mola_metric_maps

Advanced metric map classes for LiDAR odometry and SLAM, built on the generic mrpt::maps::CMetricMap interface. All maps are serializable, visualizable, and integrate with the mp2p_icp registration library.


Map classes

Production-quality maps

Class Header Description
mola::HashedVoxelPointCloud HashedVoxelPointCloud.h Flat sparse hash map of cubic voxels. Up to 32 points per voxel stored without heap allocation (fixed array SSO). Backend: tsl::robin_map. Implements NearestNeighborsCapable.
mola::SparseVoxelPointCloud SparseVoxelPointCloud.h Two-level voxel map: sparse outer blocks + 32³ inner FixedDenseGrid3D. Tracks per-voxel point means; supports voxel-mean ICP matching. Implements NearestNeighborsCapable. The primary workhorse map in MOLA LO/SLAM.
mola::NDT NDT.h Normal Distributions Transform map (Magnusson 2007). Fits a Gaussian per voxel; planar voxels expose NearestPlaneCapable, non-planar ones expose NearestNeighborsCapable. Enables automatic point-to-point vs. point-to-plane pairing selection.
mola::KeyframePointCloudMap KeyframePointCloudMap.h Keyframe-based map: each keyframe holds a local point cloud plus a SE(3) pose. Supports map corrections without re-inserting points (just update poses). Implements IcpPrepareCapable, NearestPointWithCovCapable, and MetricMapMergeCapable.

Experimental / work-in-progress maps

Class Header Status
mola::SparseTreesPointCloud SparseTreesPointCloud.h Coarse 3D grid of independent CSimplePointsMap sub-maps, each with its own KD-tree. Functionally complete but not benchmarked against the hash-based alternatives for typical SLAM workloads.
mola::OccGrid OccGrid.h Wraps mrpt::maps::COccupancyGridMap2D with a super-resolution likelihood cache. The cache infrastructure is in place but likelihood population is not yet implemented (// TODO). Not used in any production pipeline.

Utility / internal classes

Class Header Description
mola::index3d_t<T> index3d_t.h Discrete 3D integer index. Works as key in std::map and std::unordered_map / tsl::robin_map via the index3d_hash functor, which implements the Teschner et al. (2003) spatial hash.
mola::FixedDenseGrid3D<T,N,C> FixedDenseGrid3D.h Dense NxNxN grid (N=2^SIDE_NUM_BITS) allocated with calloc for fast zero-init. Used as the inner block in SparseVoxelPointCloud. Requires trivially-copyable cell types.

Build and install

Refer to the root MOLA repository.

License

Copyright (C) 2018-2026 Jose Luis Blanco jlblanco@ual.es, University of Almeria

This package is released under the GNU GPL v3 license as open source for research and evaluation purposes only. Commercial licenses available upon request, for this package alone or in combination with the complete SLAM system.

CHANGELOG

Changelog for package mola_metric_maps

3.1.1 (2026-08-10)

  • mola_metric_maps: fix calloc arg order and nodiscard warnings on newer GCC.
  • Give nn_search_cov2cov() a canonical pairing order. The parallel path merged per-thread correspondences in unspecified order, making ICP results non-deterministic run to run; now sorted by local_idx to match the sequential path.
  • IncrementalPointCloud: rebuild the k-d tree on a global SE(3) re-map. changeCoordinatesReference() rewrote coordinates in place without resizing, so the k-d tree kept stale split planes and nearest-neighbor queries silently returned wrong results. Fixes #186.
  • mola_metric_maps: depend on nanoflann_vendor instead of nanoflann, since the rosdep key otherwise resolves to the distro's older libnanoflann-dev.
  • fix(mola_metric_maps): don't require nanoflann>=1.5.1 for KeyframePointCloudMap covariances. Ubuntu jammy's older nanoflann made every use of mola::KeyframePointCloudMap throw on Humble; now falls back to a plain kNN truncated at the same radius, verified numerically equivalent.
  • Contributors: Jose Luis Blanco-Claraco

3.1.0 (2026-08-06)

  • Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)

  • address review comments

  • Add k-d tree baking for IncrementalPointCloud + mm-ipc-bake-kdtree tool Serializes the incremental k-d tree index alongside an IncrementalPointCloud layer's points (TCreationOptions::serialize_kdtree), so it does not have to be rebuilt (an O(N log M) bulk build) on every load. Unlike KeyframePointCloudMap's baked static trees, nanoflann's incremental index had no save/load support at all; this depends on saveIndex()/loadIndex() added upstream (nanoflann >= 1.11.0, see the companion nanoflann PR), gated behind MOLA_METRIC_MAPS_HAS_INCREMENTAL_KDTREE_BAKE so older builds keep working with the option as a documented no-op. Serialization always writes/reads the compacted (tombstone-free) point order, so baking builds a throwaway index over that exact order rather than reusing the live index (whose slots may not match after tombstones/slot recycling). Adds the mm-ipc-bake-kdtree CLI tool (analogous to mm-kf-bake-kdtrees) and a shared mm_cli_utils.h generic layer-iteration helper for it. Unit tests cover: bake/load round-trip through memory and through a real temporary file, k-d tree parameters differing between bake and load time, clearing and re-inserting into a loaded (baked) map, further insertions/trims on a loaded map, and serialize_kdtree=false remaining a no-op -- all independent of whether this build's nanoflann actually supports baking.

  • changelog

  • chore: document and fix some multithreading issues

  • Merge pull request #185 from MOLAorg/chore/remove-keyframe-map-capable Remove the KeyframeMapCapable interface

  • docs: drop the KeyframeMapCapable references left behind

  • chore: remove the KeyframeMapCapable interface This mixin was introduced to expose per-KF pose plumbing to mola_lidar_odometry's trajectory-rebake experiment, which corrected accumulated tilt by re-integrating the keyframe chain. That experiment is being removed: it was never wired in, and rotating map keyframes without transforming the trajectory consistently leaks vertical position. The interface had exactly one implementation and no callers, so it is removed along with the two methods that existed only for the rebake path, [oldestActiveKeyframeID()]{.title-ref} and [applyPivotTransform()]{.title-ref}. [keyframePoses()]{.title-ref} is kept, since the regroup tests already use it as ordinary map API, and the duplicate [cloneKFPoses()]{.title-ref} (whose only difference was not being the virtual one) is folded into it.

  • Merge pull request #184 from MOLAorg/feat/incremental-pointcloud-map feat(metric_maps): add mola::IncrementalPointCloud (incremental k-d tree local map)

  • docs: correct the trySetCreationOptions contract The k-d tree parameters used to require an empty map, with trySetCreationOptions() returning false rather than discarding points. It now compacts and rebuilds instead, so it always succeeds and keeps the map contents; only the previously returned point indices are invalidated. The TCreationOptions docs still described the old behaviour.

  • style: apply clang-format-14

  • feat(metric_maps): degrade gracefully on distros with an old nanoflann The incremental k-d tree index needs nanoflann >= 1.10.0.

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_metric_maps at Robotics Stack Exchange

Package Summary

Version 3.1.1
License GPLv3
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/MOLAorg/mola.git
VCS Type git
VCS Version develop
Last Updated 2026-08-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Advanced metric map classes, using the generic `mrpt::maps::CMetricMap` interface, for use in other MOLA odometry and SLAM modules.

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional authors.

mola_metric_maps

Advanced metric map classes for LiDAR odometry and SLAM, built on the generic mrpt::maps::CMetricMap interface. All maps are serializable, visualizable, and integrate with the mp2p_icp registration library.


Map classes

Production-quality maps

Class Header Description
mola::HashedVoxelPointCloud HashedVoxelPointCloud.h Flat sparse hash map of cubic voxels. Up to 32 points per voxel stored without heap allocation (fixed array SSO). Backend: tsl::robin_map. Implements NearestNeighborsCapable.
mola::SparseVoxelPointCloud SparseVoxelPointCloud.h Two-level voxel map: sparse outer blocks + 32³ inner FixedDenseGrid3D. Tracks per-voxel point means; supports voxel-mean ICP matching. Implements NearestNeighborsCapable. The primary workhorse map in MOLA LO/SLAM.
mola::NDT NDT.h Normal Distributions Transform map (Magnusson 2007). Fits a Gaussian per voxel; planar voxels expose NearestPlaneCapable, non-planar ones expose NearestNeighborsCapable. Enables automatic point-to-point vs. point-to-plane pairing selection.
mola::KeyframePointCloudMap KeyframePointCloudMap.h Keyframe-based map: each keyframe holds a local point cloud plus a SE(3) pose. Supports map corrections without re-inserting points (just update poses). Implements IcpPrepareCapable, NearestPointWithCovCapable, and MetricMapMergeCapable.

Experimental / work-in-progress maps

Class Header Status
mola::SparseTreesPointCloud SparseTreesPointCloud.h Coarse 3D grid of independent CSimplePointsMap sub-maps, each with its own KD-tree. Functionally complete but not benchmarked against the hash-based alternatives for typical SLAM workloads.
mola::OccGrid OccGrid.h Wraps mrpt::maps::COccupancyGridMap2D with a super-resolution likelihood cache. The cache infrastructure is in place but likelihood population is not yet implemented (// TODO). Not used in any production pipeline.

Utility / internal classes

Class Header Description
mola::index3d_t<T> index3d_t.h Discrete 3D integer index. Works as key in std::map and std::unordered_map / tsl::robin_map via the index3d_hash functor, which implements the Teschner et al. (2003) spatial hash.
mola::FixedDenseGrid3D<T,N,C> FixedDenseGrid3D.h Dense NxNxN grid (N=2^SIDE_NUM_BITS) allocated with calloc for fast zero-init. Used as the inner block in SparseVoxelPointCloud. Requires trivially-copyable cell types.

Build and install

Refer to the root MOLA repository.

License

Copyright (C) 2018-2026 Jose Luis Blanco jlblanco@ual.es, University of Almeria

This package is released under the GNU GPL v3 license as open source for research and evaluation purposes only. Commercial licenses available upon request, for this package alone or in combination with the complete SLAM system.

CHANGELOG

Changelog for package mola_metric_maps

3.1.1 (2026-08-10)

  • mola_metric_maps: fix calloc arg order and nodiscard warnings on newer GCC.
  • Give nn_search_cov2cov() a canonical pairing order. The parallel path merged per-thread correspondences in unspecified order, making ICP results non-deterministic run to run; now sorted by local_idx to match the sequential path.
  • IncrementalPointCloud: rebuild the k-d tree on a global SE(3) re-map. changeCoordinatesReference() rewrote coordinates in place without resizing, so the k-d tree kept stale split planes and nearest-neighbor queries silently returned wrong results. Fixes #186.
  • mola_metric_maps: depend on nanoflann_vendor instead of nanoflann, since the rosdep key otherwise resolves to the distro's older libnanoflann-dev.
  • fix(mola_metric_maps): don't require nanoflann>=1.5.1 for KeyframePointCloudMap covariances. Ubuntu jammy's older nanoflann made every use of mola::KeyframePointCloudMap throw on Humble; now falls back to a plain kNN truncated at the same radius, verified numerically equivalent.
  • Contributors: Jose Luis Blanco-Claraco

3.1.0 (2026-08-06)

  • Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)

  • address review comments

  • Add k-d tree baking for IncrementalPointCloud + mm-ipc-bake-kdtree tool Serializes the incremental k-d tree index alongside an IncrementalPointCloud layer's points (TCreationOptions::serialize_kdtree), so it does not have to be rebuilt (an O(N log M) bulk build) on every load. Unlike KeyframePointCloudMap's baked static trees, nanoflann's incremental index had no save/load support at all; this depends on saveIndex()/loadIndex() added upstream (nanoflann >= 1.11.0, see the companion nanoflann PR), gated behind MOLA_METRIC_MAPS_HAS_INCREMENTAL_KDTREE_BAKE so older builds keep working with the option as a documented no-op. Serialization always writes/reads the compacted (tombstone-free) point order, so baking builds a throwaway index over that exact order rather than reusing the live index (whose slots may not match after tombstones/slot recycling). Adds the mm-ipc-bake-kdtree CLI tool (analogous to mm-kf-bake-kdtrees) and a shared mm_cli_utils.h generic layer-iteration helper for it. Unit tests cover: bake/load round-trip through memory and through a real temporary file, k-d tree parameters differing between bake and load time, clearing and re-inserting into a loaded (baked) map, further insertions/trims on a loaded map, and serialize_kdtree=false remaining a no-op -- all independent of whether this build's nanoflann actually supports baking.

  • changelog

  • chore: document and fix some multithreading issues

  • Merge pull request #185 from MOLAorg/chore/remove-keyframe-map-capable Remove the KeyframeMapCapable interface

  • docs: drop the KeyframeMapCapable references left behind

  • chore: remove the KeyframeMapCapable interface This mixin was introduced to expose per-KF pose plumbing to mola_lidar_odometry's trajectory-rebake experiment, which corrected accumulated tilt by re-integrating the keyframe chain. That experiment is being removed: it was never wired in, and rotating map keyframes without transforming the trajectory consistently leaks vertical position. The interface had exactly one implementation and no callers, so it is removed along with the two methods that existed only for the rebake path, [oldestActiveKeyframeID()]{.title-ref} and [applyPivotTransform()]{.title-ref}. [keyframePoses()]{.title-ref} is kept, since the regroup tests already use it as ordinary map API, and the duplicate [cloneKFPoses()]{.title-ref} (whose only difference was not being the virtual one) is folded into it.

  • Merge pull request #184 from MOLAorg/feat/incremental-pointcloud-map feat(metric_maps): add mola::IncrementalPointCloud (incremental k-d tree local map)

  • docs: correct the trySetCreationOptions contract The k-d tree parameters used to require an empty map, with trySetCreationOptions() returning false rather than discarding points. It now compacts and rebuilds instead, so it always succeeds and keeps the map contents; only the previously returned point indices are invalidated. The TCreationOptions docs still described the old behaviour.

  • style: apply clang-format-14

  • feat(metric_maps): degrade gracefully on distros with an old nanoflann The incremental k-d tree index needs nanoflann >= 1.10.0.

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_metric_maps at Robotics Stack Exchange

No version for distro ardent showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.1.1
License GPLv3
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/MOLAorg/mola.git
VCS Type git
VCS Version develop
Last Updated 2026-08-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Advanced metric map classes, using the generic `mrpt::maps::CMetricMap` interface, for use in other MOLA odometry and SLAM modules.

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional authors.

mola_metric_maps

Advanced metric map classes for LiDAR odometry and SLAM, built on the generic mrpt::maps::CMetricMap interface. All maps are serializable, visualizable, and integrate with the mp2p_icp registration library.


Map classes

Production-quality maps

Class Header Description
mola::HashedVoxelPointCloud HashedVoxelPointCloud.h Flat sparse hash map of cubic voxels. Up to 32 points per voxel stored without heap allocation (fixed array SSO). Backend: tsl::robin_map. Implements NearestNeighborsCapable.
mola::SparseVoxelPointCloud SparseVoxelPointCloud.h Two-level voxel map: sparse outer blocks + 32³ inner FixedDenseGrid3D. Tracks per-voxel point means; supports voxel-mean ICP matching. Implements NearestNeighborsCapable. The primary workhorse map in MOLA LO/SLAM.
mola::NDT NDT.h Normal Distributions Transform map (Magnusson 2007). Fits a Gaussian per voxel; planar voxels expose NearestPlaneCapable, non-planar ones expose NearestNeighborsCapable. Enables automatic point-to-point vs. point-to-plane pairing selection.
mola::KeyframePointCloudMap KeyframePointCloudMap.h Keyframe-based map: each keyframe holds a local point cloud plus a SE(3) pose. Supports map corrections without re-inserting points (just update poses). Implements IcpPrepareCapable, NearestPointWithCovCapable, and MetricMapMergeCapable.

Experimental / work-in-progress maps

Class Header Status
mola::SparseTreesPointCloud SparseTreesPointCloud.h Coarse 3D grid of independent CSimplePointsMap sub-maps, each with its own KD-tree. Functionally complete but not benchmarked against the hash-based alternatives for typical SLAM workloads.
mola::OccGrid OccGrid.h Wraps mrpt::maps::COccupancyGridMap2D with a super-resolution likelihood cache. The cache infrastructure is in place but likelihood population is not yet implemented (// TODO). Not used in any production pipeline.

Utility / internal classes

Class Header Description
mola::index3d_t<T> index3d_t.h Discrete 3D integer index. Works as key in std::map and std::unordered_map / tsl::robin_map via the index3d_hash functor, which implements the Teschner et al. (2003) spatial hash.
mola::FixedDenseGrid3D<T,N,C> FixedDenseGrid3D.h Dense NxNxN grid (N=2^SIDE_NUM_BITS) allocated with calloc for fast zero-init. Used as the inner block in SparseVoxelPointCloud. Requires trivially-copyable cell types.

Build and install

Refer to the root MOLA repository.

License

Copyright (C) 2018-2026 Jose Luis Blanco jlblanco@ual.es, University of Almeria

This package is released under the GNU GPL v3 license as open source for research and evaluation purposes only. Commercial licenses available upon request, for this package alone or in combination with the complete SLAM system.

CHANGELOG

Changelog for package mola_metric_maps

3.1.1 (2026-08-10)

  • mola_metric_maps: fix calloc arg order and nodiscard warnings on newer GCC.
  • Give nn_search_cov2cov() a canonical pairing order. The parallel path merged per-thread correspondences in unspecified order, making ICP results non-deterministic run to run; now sorted by local_idx to match the sequential path.
  • IncrementalPointCloud: rebuild the k-d tree on a global SE(3) re-map. changeCoordinatesReference() rewrote coordinates in place without resizing, so the k-d tree kept stale split planes and nearest-neighbor queries silently returned wrong results. Fixes #186.
  • mola_metric_maps: depend on nanoflann_vendor instead of nanoflann, since the rosdep key otherwise resolves to the distro's older libnanoflann-dev.
  • fix(mola_metric_maps): don't require nanoflann>=1.5.1 for KeyframePointCloudMap covariances. Ubuntu jammy's older nanoflann made every use of mola::KeyframePointCloudMap throw on Humble; now falls back to a plain kNN truncated at the same radius, verified numerically equivalent.
  • Contributors: Jose Luis Blanco-Claraco

3.1.0 (2026-08-06)

  • Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)

  • address review comments

  • Add k-d tree baking for IncrementalPointCloud + mm-ipc-bake-kdtree tool Serializes the incremental k-d tree index alongside an IncrementalPointCloud layer's points (TCreationOptions::serialize_kdtree), so it does not have to be rebuilt (an O(N log M) bulk build) on every load. Unlike KeyframePointCloudMap's baked static trees, nanoflann's incremental index had no save/load support at all; this depends on saveIndex()/loadIndex() added upstream (nanoflann >= 1.11.0, see the companion nanoflann PR), gated behind MOLA_METRIC_MAPS_HAS_INCREMENTAL_KDTREE_BAKE so older builds keep working with the option as a documented no-op. Serialization always writes/reads the compacted (tombstone-free) point order, so baking builds a throwaway index over that exact order rather than reusing the live index (whose slots may not match after tombstones/slot recycling). Adds the mm-ipc-bake-kdtree CLI tool (analogous to mm-kf-bake-kdtrees) and a shared mm_cli_utils.h generic layer-iteration helper for it. Unit tests cover: bake/load round-trip through memory and through a real temporary file, k-d tree parameters differing between bake and load time, clearing and re-inserting into a loaded (baked) map, further insertions/trims on a loaded map, and serialize_kdtree=false remaining a no-op -- all independent of whether this build's nanoflann actually supports baking.

  • changelog

  • chore: document and fix some multithreading issues

  • Merge pull request #185 from MOLAorg/chore/remove-keyframe-map-capable Remove the KeyframeMapCapable interface

  • docs: drop the KeyframeMapCapable references left behind

  • chore: remove the KeyframeMapCapable interface This mixin was introduced to expose per-KF pose plumbing to mola_lidar_odometry's trajectory-rebake experiment, which corrected accumulated tilt by re-integrating the keyframe chain. That experiment is being removed: it was never wired in, and rotating map keyframes without transforming the trajectory consistently leaks vertical position. The interface had exactly one implementation and no callers, so it is removed along with the two methods that existed only for the rebake path, [oldestActiveKeyframeID()]{.title-ref} and [applyPivotTransform()]{.title-ref}. [keyframePoses()]{.title-ref} is kept, since the regroup tests already use it as ordinary map API, and the duplicate [cloneKFPoses()]{.title-ref} (whose only difference was not being the virtual one) is folded into it.

  • Merge pull request #184 from MOLAorg/feat/incremental-pointcloud-map feat(metric_maps): add mola::IncrementalPointCloud (incremental k-d tree local map)

  • docs: correct the trySetCreationOptions contract The k-d tree parameters used to require an empty map, with trySetCreationOptions() returning false rather than discarding points. It now compacts and rebuilds instead, so it always succeeds and keeps the map contents; only the previously returned point indices are invalidated. The TCreationOptions docs still described the old behaviour.

  • style: apply clang-format-14

  • feat(metric_maps): degrade gracefully on distros with an old nanoflann The incremental k-d tree index needs nanoflann >= 1.10.0.

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_metric_maps at Robotics Stack Exchange

No version for distro bouncy showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.1.1
License GPLv3
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/MOLAorg/mola.git
VCS Type git
VCS Version develop
Last Updated 2026-08-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Advanced metric map classes, using the generic `mrpt::maps::CMetricMap` interface, for use in other MOLA odometry and SLAM modules.

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional authors.

mola_metric_maps

Advanced metric map classes for LiDAR odometry and SLAM, built on the generic mrpt::maps::CMetricMap interface. All maps are serializable, visualizable, and integrate with the mp2p_icp registration library.


Map classes

Production-quality maps

Class Header Description
mola::HashedVoxelPointCloud HashedVoxelPointCloud.h Flat sparse hash map of cubic voxels. Up to 32 points per voxel stored without heap allocation (fixed array SSO). Backend: tsl::robin_map. Implements NearestNeighborsCapable.
mola::SparseVoxelPointCloud SparseVoxelPointCloud.h Two-level voxel map: sparse outer blocks + 32³ inner FixedDenseGrid3D. Tracks per-voxel point means; supports voxel-mean ICP matching. Implements NearestNeighborsCapable. The primary workhorse map in MOLA LO/SLAM.
mola::NDT NDT.h Normal Distributions Transform map (Magnusson 2007). Fits a Gaussian per voxel; planar voxels expose NearestPlaneCapable, non-planar ones expose NearestNeighborsCapable. Enables automatic point-to-point vs. point-to-plane pairing selection.
mola::KeyframePointCloudMap KeyframePointCloudMap.h Keyframe-based map: each keyframe holds a local point cloud plus a SE(3) pose. Supports map corrections without re-inserting points (just update poses). Implements IcpPrepareCapable, NearestPointWithCovCapable, and MetricMapMergeCapable.

Experimental / work-in-progress maps

Class Header Status
mola::SparseTreesPointCloud SparseTreesPointCloud.h Coarse 3D grid of independent CSimplePointsMap sub-maps, each with its own KD-tree. Functionally complete but not benchmarked against the hash-based alternatives for typical SLAM workloads.
mola::OccGrid OccGrid.h Wraps mrpt::maps::COccupancyGridMap2D with a super-resolution likelihood cache. The cache infrastructure is in place but likelihood population is not yet implemented (// TODO). Not used in any production pipeline.

Utility / internal classes

Class Header Description
mola::index3d_t<T> index3d_t.h Discrete 3D integer index. Works as key in std::map and std::unordered_map / tsl::robin_map via the index3d_hash functor, which implements the Teschner et al. (2003) spatial hash.
mola::FixedDenseGrid3D<T,N,C> FixedDenseGrid3D.h Dense NxNxN grid (N=2^SIDE_NUM_BITS) allocated with calloc for fast zero-init. Used as the inner block in SparseVoxelPointCloud. Requires trivially-copyable cell types.

Build and install

Refer to the root MOLA repository.

License

Copyright (C) 2018-2026 Jose Luis Blanco jlblanco@ual.es, University of Almeria

This package is released under the GNU GPL v3 license as open source for research and evaluation purposes only. Commercial licenses available upon request, for this package alone or in combination with the complete SLAM system.

CHANGELOG

Changelog for package mola_metric_maps

3.1.1 (2026-08-10)

  • mola_metric_maps: fix calloc arg order and nodiscard warnings on newer GCC.
  • Give nn_search_cov2cov() a canonical pairing order. The parallel path merged per-thread correspondences in unspecified order, making ICP results non-deterministic run to run; now sorted by local_idx to match the sequential path.
  • IncrementalPointCloud: rebuild the k-d tree on a global SE(3) re-map. changeCoordinatesReference() rewrote coordinates in place without resizing, so the k-d tree kept stale split planes and nearest-neighbor queries silently returned wrong results. Fixes #186.
  • mola_metric_maps: depend on nanoflann_vendor instead of nanoflann, since the rosdep key otherwise resolves to the distro's older libnanoflann-dev.
  • fix(mola_metric_maps): don't require nanoflann>=1.5.1 for KeyframePointCloudMap covariances. Ubuntu jammy's older nanoflann made every use of mola::KeyframePointCloudMap throw on Humble; now falls back to a plain kNN truncated at the same radius, verified numerically equivalent.
  • Contributors: Jose Luis Blanco-Claraco

3.1.0 (2026-08-06)

  • Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)

  • address review comments

  • Add k-d tree baking for IncrementalPointCloud + mm-ipc-bake-kdtree tool Serializes the incremental k-d tree index alongside an IncrementalPointCloud layer's points (TCreationOptions::serialize_kdtree), so it does not have to be rebuilt (an O(N log M) bulk build) on every load. Unlike KeyframePointCloudMap's baked static trees, nanoflann's incremental index had no save/load support at all; this depends on saveIndex()/loadIndex() added upstream (nanoflann >= 1.11.0, see the companion nanoflann PR), gated behind MOLA_METRIC_MAPS_HAS_INCREMENTAL_KDTREE_BAKE so older builds keep working with the option as a documented no-op. Serialization always writes/reads the compacted (tombstone-free) point order, so baking builds a throwaway index over that exact order rather than reusing the live index (whose slots may not match after tombstones/slot recycling). Adds the mm-ipc-bake-kdtree CLI tool (analogous to mm-kf-bake-kdtrees) and a shared mm_cli_utils.h generic layer-iteration helper for it. Unit tests cover: bake/load round-trip through memory and through a real temporary file, k-d tree parameters differing between bake and load time, clearing and re-inserting into a loaded (baked) map, further insertions/trims on a loaded map, and serialize_kdtree=false remaining a no-op -- all independent of whether this build's nanoflann actually supports baking.

  • changelog

  • chore: document and fix some multithreading issues

  • Merge pull request #185 from MOLAorg/chore/remove-keyframe-map-capable Remove the KeyframeMapCapable interface

  • docs: drop the KeyframeMapCapable references left behind

  • chore: remove the KeyframeMapCapable interface This mixin was introduced to expose per-KF pose plumbing to mola_lidar_odometry's trajectory-rebake experiment, which corrected accumulated tilt by re-integrating the keyframe chain. That experiment is being removed: it was never wired in, and rotating map keyframes without transforming the trajectory consistently leaks vertical position. The interface had exactly one implementation and no callers, so it is removed along with the two methods that existed only for the rebake path, [oldestActiveKeyframeID()]{.title-ref} and [applyPivotTransform()]{.title-ref}. [keyframePoses()]{.title-ref} is kept, since the regroup tests already use it as ordinary map API, and the duplicate [cloneKFPoses()]{.title-ref} (whose only difference was not being the virtual one) is folded into it.

  • Merge pull request #184 from MOLAorg/feat/incremental-pointcloud-map feat(metric_maps): add mola::IncrementalPointCloud (incremental k-d tree local map)

  • docs: correct the trySetCreationOptions contract The k-d tree parameters used to require an empty map, with trySetCreationOptions() returning false rather than discarding points. It now compacts and rebuilds instead, so it always succeeds and keeps the map contents; only the previously returned point indices are invalidated. The TCreationOptions docs still described the old behaviour.

  • style: apply clang-format-14

  • feat(metric_maps): degrade gracefully on distros with an old nanoflann The incremental k-d tree index needs nanoflann >= 1.10.0.

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_metric_maps at Robotics Stack Exchange

No version for distro crystal showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.1.1
License GPLv3
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/MOLAorg/mola.git
VCS Type git
VCS Version develop
Last Updated 2026-08-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Advanced metric map classes, using the generic `mrpt::maps::CMetricMap` interface, for use in other MOLA odometry and SLAM modules.

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional authors.

mola_metric_maps

Advanced metric map classes for LiDAR odometry and SLAM, built on the generic mrpt::maps::CMetricMap interface. All maps are serializable, visualizable, and integrate with the mp2p_icp registration library.


Map classes

Production-quality maps

Class Header Description
mola::HashedVoxelPointCloud HashedVoxelPointCloud.h Flat sparse hash map of cubic voxels. Up to 32 points per voxel stored without heap allocation (fixed array SSO). Backend: tsl::robin_map. Implements NearestNeighborsCapable.
mola::SparseVoxelPointCloud SparseVoxelPointCloud.h Two-level voxel map: sparse outer blocks + 32³ inner FixedDenseGrid3D. Tracks per-voxel point means; supports voxel-mean ICP matching. Implements NearestNeighborsCapable. The primary workhorse map in MOLA LO/SLAM.
mola::NDT NDT.h Normal Distributions Transform map (Magnusson 2007). Fits a Gaussian per voxel; planar voxels expose NearestPlaneCapable, non-planar ones expose NearestNeighborsCapable. Enables automatic point-to-point vs. point-to-plane pairing selection.
mola::KeyframePointCloudMap KeyframePointCloudMap.h Keyframe-based map: each keyframe holds a local point cloud plus a SE(3) pose. Supports map corrections without re-inserting points (just update poses). Implements IcpPrepareCapable, NearestPointWithCovCapable, and MetricMapMergeCapable.

Experimental / work-in-progress maps

Class Header Status
mola::SparseTreesPointCloud SparseTreesPointCloud.h Coarse 3D grid of independent CSimplePointsMap sub-maps, each with its own KD-tree. Functionally complete but not benchmarked against the hash-based alternatives for typical SLAM workloads.
mola::OccGrid OccGrid.h Wraps mrpt::maps::COccupancyGridMap2D with a super-resolution likelihood cache. The cache infrastructure is in place but likelihood population is not yet implemented (// TODO). Not used in any production pipeline.

Utility / internal classes

Class Header Description
mola::index3d_t<T> index3d_t.h Discrete 3D integer index. Works as key in std::map and std::unordered_map / tsl::robin_map via the index3d_hash functor, which implements the Teschner et al. (2003) spatial hash.
mola::FixedDenseGrid3D<T,N,C> FixedDenseGrid3D.h Dense NxNxN grid (N=2^SIDE_NUM_BITS) allocated with calloc for fast zero-init. Used as the inner block in SparseVoxelPointCloud. Requires trivially-copyable cell types.

Build and install

Refer to the root MOLA repository.

License

Copyright (C) 2018-2026 Jose Luis Blanco jlblanco@ual.es, University of Almeria

This package is released under the GNU GPL v3 license as open source for research and evaluation purposes only. Commercial licenses available upon request, for this package alone or in combination with the complete SLAM system.

CHANGELOG

Changelog for package mola_metric_maps

3.1.1 (2026-08-10)

  • mola_metric_maps: fix calloc arg order and nodiscard warnings on newer GCC.
  • Give nn_search_cov2cov() a canonical pairing order. The parallel path merged per-thread correspondences in unspecified order, making ICP results non-deterministic run to run; now sorted by local_idx to match the sequential path.
  • IncrementalPointCloud: rebuild the k-d tree on a global SE(3) re-map. changeCoordinatesReference() rewrote coordinates in place without resizing, so the k-d tree kept stale split planes and nearest-neighbor queries silently returned wrong results. Fixes #186.
  • mola_metric_maps: depend on nanoflann_vendor instead of nanoflann, since the rosdep key otherwise resolves to the distro's older libnanoflann-dev.
  • fix(mola_metric_maps): don't require nanoflann>=1.5.1 for KeyframePointCloudMap covariances. Ubuntu jammy's older nanoflann made every use of mola::KeyframePointCloudMap throw on Humble; now falls back to a plain kNN truncated at the same radius, verified numerically equivalent.
  • Contributors: Jose Luis Blanco-Claraco

3.1.0 (2026-08-06)

  • Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)

  • address review comments

  • Add k-d tree baking for IncrementalPointCloud + mm-ipc-bake-kdtree tool Serializes the incremental k-d tree index alongside an IncrementalPointCloud layer's points (TCreationOptions::serialize_kdtree), so it does not have to be rebuilt (an O(N log M) bulk build) on every load. Unlike KeyframePointCloudMap's baked static trees, nanoflann's incremental index had no save/load support at all; this depends on saveIndex()/loadIndex() added upstream (nanoflann >= 1.11.0, see the companion nanoflann PR), gated behind MOLA_METRIC_MAPS_HAS_INCREMENTAL_KDTREE_BAKE so older builds keep working with the option as a documented no-op. Serialization always writes/reads the compacted (tombstone-free) point order, so baking builds a throwaway index over that exact order rather than reusing the live index (whose slots may not match after tombstones/slot recycling). Adds the mm-ipc-bake-kdtree CLI tool (analogous to mm-kf-bake-kdtrees) and a shared mm_cli_utils.h generic layer-iteration helper for it. Unit tests cover: bake/load round-trip through memory and through a real temporary file, k-d tree parameters differing between bake and load time, clearing and re-inserting into a loaded (baked) map, further insertions/trims on a loaded map, and serialize_kdtree=false remaining a no-op -- all independent of whether this build's nanoflann actually supports baking.

  • changelog

  • chore: document and fix some multithreading issues

  • Merge pull request #185 from MOLAorg/chore/remove-keyframe-map-capable Remove the KeyframeMapCapable interface

  • docs: drop the KeyframeMapCapable references left behind

  • chore: remove the KeyframeMapCapable interface This mixin was introduced to expose per-KF pose plumbing to mola_lidar_odometry's trajectory-rebake experiment, which corrected accumulated tilt by re-integrating the keyframe chain. That experiment is being removed: it was never wired in, and rotating map keyframes without transforming the trajectory consistently leaks vertical position. The interface had exactly one implementation and no callers, so it is removed along with the two methods that existed only for the rebake path, [oldestActiveKeyframeID()]{.title-ref} and [applyPivotTransform()]{.title-ref}. [keyframePoses()]{.title-ref} is kept, since the regroup tests already use it as ordinary map API, and the duplicate [cloneKFPoses()]{.title-ref} (whose only difference was not being the virtual one) is folded into it.

  • Merge pull request #184 from MOLAorg/feat/incremental-pointcloud-map feat(metric_maps): add mola::IncrementalPointCloud (incremental k-d tree local map)

  • docs: correct the trySetCreationOptions contract The k-d tree parameters used to require an empty map, with trySetCreationOptions() returning false rather than discarding points. It now compacts and rebuilds instead, so it always succeeds and keeps the map contents; only the previously returned point indices are invalidated. The TCreationOptions docs still described the old behaviour.

  • style: apply clang-format-14

  • feat(metric_maps): degrade gracefully on distros with an old nanoflann The incremental k-d tree index needs nanoflann >= 1.10.0.

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_metric_maps at Robotics Stack Exchange

No version for distro eloquent showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.1.1
License GPLv3
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/MOLAorg/mola.git
VCS Type git
VCS Version develop
Last Updated 2026-08-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Advanced metric map classes, using the generic `mrpt::maps::CMetricMap` interface, for use in other MOLA odometry and SLAM modules.

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional authors.

mola_metric_maps

Advanced metric map classes for LiDAR odometry and SLAM, built on the generic mrpt::maps::CMetricMap interface. All maps are serializable, visualizable, and integrate with the mp2p_icp registration library.


Map classes

Production-quality maps

Class Header Description
mola::HashedVoxelPointCloud HashedVoxelPointCloud.h Flat sparse hash map of cubic voxels. Up to 32 points per voxel stored without heap allocation (fixed array SSO). Backend: tsl::robin_map. Implements NearestNeighborsCapable.
mola::SparseVoxelPointCloud SparseVoxelPointCloud.h Two-level voxel map: sparse outer blocks + 32³ inner FixedDenseGrid3D. Tracks per-voxel point means; supports voxel-mean ICP matching. Implements NearestNeighborsCapable. The primary workhorse map in MOLA LO/SLAM.
mola::NDT NDT.h Normal Distributions Transform map (Magnusson 2007). Fits a Gaussian per voxel; planar voxels expose NearestPlaneCapable, non-planar ones expose NearestNeighborsCapable. Enables automatic point-to-point vs. point-to-plane pairing selection.
mola::KeyframePointCloudMap KeyframePointCloudMap.h Keyframe-based map: each keyframe holds a local point cloud plus a SE(3) pose. Supports map corrections without re-inserting points (just update poses). Implements IcpPrepareCapable, NearestPointWithCovCapable, and MetricMapMergeCapable.

Experimental / work-in-progress maps

Class Header Status
mola::SparseTreesPointCloud SparseTreesPointCloud.h Coarse 3D grid of independent CSimplePointsMap sub-maps, each with its own KD-tree. Functionally complete but not benchmarked against the hash-based alternatives for typical SLAM workloads.
mola::OccGrid OccGrid.h Wraps mrpt::maps::COccupancyGridMap2D with a super-resolution likelihood cache. The cache infrastructure is in place but likelihood population is not yet implemented (// TODO). Not used in any production pipeline.

Utility / internal classes

Class Header Description
mola::index3d_t<T> index3d_t.h Discrete 3D integer index. Works as key in std::map and std::unordered_map / tsl::robin_map via the index3d_hash functor, which implements the Teschner et al. (2003) spatial hash.
mola::FixedDenseGrid3D<T,N,C> FixedDenseGrid3D.h Dense NxNxN grid (N=2^SIDE_NUM_BITS) allocated with calloc for fast zero-init. Used as the inner block in SparseVoxelPointCloud. Requires trivially-copyable cell types.

Build and install

Refer to the root MOLA repository.

License

Copyright (C) 2018-2026 Jose Luis Blanco jlblanco@ual.es, University of Almeria

This package is released under the GNU GPL v3 license as open source for research and evaluation purposes only. Commercial licenses available upon request, for this package alone or in combination with the complete SLAM system.

CHANGELOG

Changelog for package mola_metric_maps

3.1.1 (2026-08-10)

  • mola_metric_maps: fix calloc arg order and nodiscard warnings on newer GCC.
  • Give nn_search_cov2cov() a canonical pairing order. The parallel path merged per-thread correspondences in unspecified order, making ICP results non-deterministic run to run; now sorted by local_idx to match the sequential path.
  • IncrementalPointCloud: rebuild the k-d tree on a global SE(3) re-map. changeCoordinatesReference() rewrote coordinates in place without resizing, so the k-d tree kept stale split planes and nearest-neighbor queries silently returned wrong results. Fixes #186.
  • mola_metric_maps: depend on nanoflann_vendor instead of nanoflann, since the rosdep key otherwise resolves to the distro's older libnanoflann-dev.
  • fix(mola_metric_maps): don't require nanoflann>=1.5.1 for KeyframePointCloudMap covariances. Ubuntu jammy's older nanoflann made every use of mola::KeyframePointCloudMap throw on Humble; now falls back to a plain kNN truncated at the same radius, verified numerically equivalent.
  • Contributors: Jose Luis Blanco-Claraco

3.1.0 (2026-08-06)

  • Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)

  • address review comments

  • Add k-d tree baking for IncrementalPointCloud + mm-ipc-bake-kdtree tool Serializes the incremental k-d tree index alongside an IncrementalPointCloud layer's points (TCreationOptions::serialize_kdtree), so it does not have to be rebuilt (an O(N log M) bulk build) on every load. Unlike KeyframePointCloudMap's baked static trees, nanoflann's incremental index had no save/load support at all; this depends on saveIndex()/loadIndex() added upstream (nanoflann >= 1.11.0, see the companion nanoflann PR), gated behind MOLA_METRIC_MAPS_HAS_INCREMENTAL_KDTREE_BAKE so older builds keep working with the option as a documented no-op. Serialization always writes/reads the compacted (tombstone-free) point order, so baking builds a throwaway index over that exact order rather than reusing the live index (whose slots may not match after tombstones/slot recycling). Adds the mm-ipc-bake-kdtree CLI tool (analogous to mm-kf-bake-kdtrees) and a shared mm_cli_utils.h generic layer-iteration helper for it. Unit tests cover: bake/load round-trip through memory and through a real temporary file, k-d tree parameters differing between bake and load time, clearing and re-inserting into a loaded (baked) map, further insertions/trims on a loaded map, and serialize_kdtree=false remaining a no-op -- all independent of whether this build's nanoflann actually supports baking.

  • changelog

  • chore: document and fix some multithreading issues

  • Merge pull request #185 from MOLAorg/chore/remove-keyframe-map-capable Remove the KeyframeMapCapable interface

  • docs: drop the KeyframeMapCapable references left behind

  • chore: remove the KeyframeMapCapable interface This mixin was introduced to expose per-KF pose plumbing to mola_lidar_odometry's trajectory-rebake experiment, which corrected accumulated tilt by re-integrating the keyframe chain. That experiment is being removed: it was never wired in, and rotating map keyframes without transforming the trajectory consistently leaks vertical position. The interface had exactly one implementation and no callers, so it is removed along with the two methods that existed only for the rebake path, [oldestActiveKeyframeID()]{.title-ref} and [applyPivotTransform()]{.title-ref}. [keyframePoses()]{.title-ref} is kept, since the regroup tests already use it as ordinary map API, and the duplicate [cloneKFPoses()]{.title-ref} (whose only difference was not being the virtual one) is folded into it.

  • Merge pull request #184 from MOLAorg/feat/incremental-pointcloud-map feat(metric_maps): add mola::IncrementalPointCloud (incremental k-d tree local map)

  • docs: correct the trySetCreationOptions contract The k-d tree parameters used to require an empty map, with trySetCreationOptions() returning false rather than discarding points. It now compacts and rebuilds instead, so it always succeeds and keeps the map contents; only the previously returned point indices are invalidated. The TCreationOptions docs still described the old behaviour.

  • style: apply clang-format-14

  • feat(metric_maps): degrade gracefully on distros with an old nanoflann The incremental k-d tree index needs nanoflann >= 1.10.0.

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_metric_maps at Robotics Stack Exchange

No version for distro dashing showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.1.1
License GPLv3
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/MOLAorg/mola.git
VCS Type git
VCS Version develop
Last Updated 2026-08-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Advanced metric map classes, using the generic `mrpt::maps::CMetricMap` interface, for use in other MOLA odometry and SLAM modules.

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional authors.

mola_metric_maps

Advanced metric map classes for LiDAR odometry and SLAM, built on the generic mrpt::maps::CMetricMap interface. All maps are serializable, visualizable, and integrate with the mp2p_icp registration library.


Map classes

Production-quality maps

Class Header Description
mola::HashedVoxelPointCloud HashedVoxelPointCloud.h Flat sparse hash map of cubic voxels. Up to 32 points per voxel stored without heap allocation (fixed array SSO). Backend: tsl::robin_map. Implements NearestNeighborsCapable.
mola::SparseVoxelPointCloud SparseVoxelPointCloud.h Two-level voxel map: sparse outer blocks + 32³ inner FixedDenseGrid3D. Tracks per-voxel point means; supports voxel-mean ICP matching. Implements NearestNeighborsCapable. The primary workhorse map in MOLA LO/SLAM.
mola::NDT NDT.h Normal Distributions Transform map (Magnusson 2007). Fits a Gaussian per voxel; planar voxels expose NearestPlaneCapable, non-planar ones expose NearestNeighborsCapable. Enables automatic point-to-point vs. point-to-plane pairing selection.
mola::KeyframePointCloudMap KeyframePointCloudMap.h Keyframe-based map: each keyframe holds a local point cloud plus a SE(3) pose. Supports map corrections without re-inserting points (just update poses). Implements IcpPrepareCapable, NearestPointWithCovCapable, and MetricMapMergeCapable.

Experimental / work-in-progress maps

Class Header Status
mola::SparseTreesPointCloud SparseTreesPointCloud.h Coarse 3D grid of independent CSimplePointsMap sub-maps, each with its own KD-tree. Functionally complete but not benchmarked against the hash-based alternatives for typical SLAM workloads.
mola::OccGrid OccGrid.h Wraps mrpt::maps::COccupancyGridMap2D with a super-resolution likelihood cache. The cache infrastructure is in place but likelihood population is not yet implemented (// TODO). Not used in any production pipeline.

Utility / internal classes

Class Header Description
mola::index3d_t<T> index3d_t.h Discrete 3D integer index. Works as key in std::map and std::unordered_map / tsl::robin_map via the index3d_hash functor, which implements the Teschner et al. (2003) spatial hash.
mola::FixedDenseGrid3D<T,N,C> FixedDenseGrid3D.h Dense NxNxN grid (N=2^SIDE_NUM_BITS) allocated with calloc for fast zero-init. Used as the inner block in SparseVoxelPointCloud. Requires trivially-copyable cell types.

Build and install

Refer to the root MOLA repository.

License

Copyright (C) 2018-2026 Jose Luis Blanco jlblanco@ual.es, University of Almeria

This package is released under the GNU GPL v3 license as open source for research and evaluation purposes only. Commercial licenses available upon request, for this package alone or in combination with the complete SLAM system.

CHANGELOG

Changelog for package mola_metric_maps

3.1.1 (2026-08-10)

  • mola_metric_maps: fix calloc arg order and nodiscard warnings on newer GCC.
  • Give nn_search_cov2cov() a canonical pairing order. The parallel path merged per-thread correspondences in unspecified order, making ICP results non-deterministic run to run; now sorted by local_idx to match the sequential path.
  • IncrementalPointCloud: rebuild the k-d tree on a global SE(3) re-map. changeCoordinatesReference() rewrote coordinates in place without resizing, so the k-d tree kept stale split planes and nearest-neighbor queries silently returned wrong results. Fixes #186.
  • mola_metric_maps: depend on nanoflann_vendor instead of nanoflann, since the rosdep key otherwise resolves to the distro's older libnanoflann-dev.
  • fix(mola_metric_maps): don't require nanoflann>=1.5.1 for KeyframePointCloudMap covariances. Ubuntu jammy's older nanoflann made every use of mola::KeyframePointCloudMap throw on Humble; now falls back to a plain kNN truncated at the same radius, verified numerically equivalent.
  • Contributors: Jose Luis Blanco-Claraco

3.1.0 (2026-08-06)

  • Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)

  • address review comments

  • Add k-d tree baking for IncrementalPointCloud + mm-ipc-bake-kdtree tool Serializes the incremental k-d tree index alongside an IncrementalPointCloud layer's points (TCreationOptions::serialize_kdtree), so it does not have to be rebuilt (an O(N log M) bulk build) on every load. Unlike KeyframePointCloudMap's baked static trees, nanoflann's incremental index had no save/load support at all; this depends on saveIndex()/loadIndex() added upstream (nanoflann >= 1.11.0, see the companion nanoflann PR), gated behind MOLA_METRIC_MAPS_HAS_INCREMENTAL_KDTREE_BAKE so older builds keep working with the option as a documented no-op. Serialization always writes/reads the compacted (tombstone-free) point order, so baking builds a throwaway index over that exact order rather than reusing the live index (whose slots may not match after tombstones/slot recycling). Adds the mm-ipc-bake-kdtree CLI tool (analogous to mm-kf-bake-kdtrees) and a shared mm_cli_utils.h generic layer-iteration helper for it. Unit tests cover: bake/load round-trip through memory and through a real temporary file, k-d tree parameters differing between bake and load time, clearing and re-inserting into a loaded (baked) map, further insertions/trims on a loaded map, and serialize_kdtree=false remaining a no-op -- all independent of whether this build's nanoflann actually supports baking.

  • changelog

  • chore: document and fix some multithreading issues

  • Merge pull request #185 from MOLAorg/chore/remove-keyframe-map-capable Remove the KeyframeMapCapable interface

  • docs: drop the KeyframeMapCapable references left behind

  • chore: remove the KeyframeMapCapable interface This mixin was introduced to expose per-KF pose plumbing to mola_lidar_odometry's trajectory-rebake experiment, which corrected accumulated tilt by re-integrating the keyframe chain. That experiment is being removed: it was never wired in, and rotating map keyframes without transforming the trajectory consistently leaks vertical position. The interface had exactly one implementation and no callers, so it is removed along with the two methods that existed only for the rebake path, [oldestActiveKeyframeID()]{.title-ref} and [applyPivotTransform()]{.title-ref}. [keyframePoses()]{.title-ref} is kept, since the regroup tests already use it as ordinary map API, and the duplicate [cloneKFPoses()]{.title-ref} (whose only difference was not being the virtual one) is folded into it.

  • Merge pull request #184 from MOLAorg/feat/incremental-pointcloud-map feat(metric_maps): add mola::IncrementalPointCloud (incremental k-d tree local map)

  • docs: correct the trySetCreationOptions contract The k-d tree parameters used to require an empty map, with trySetCreationOptions() returning false rather than discarding points. It now compacts and rebuilds instead, so it always succeeds and keeps the map contents; only the previously returned point indices are invalidated. The TCreationOptions docs still described the old behaviour.

  • style: apply clang-format-14

  • feat(metric_maps): degrade gracefully on distros with an old nanoflann The incremental k-d tree index needs nanoflann >= 1.10.0.

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_metric_maps at Robotics Stack Exchange

No version for distro galactic showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.1.1
License GPLv3
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/MOLAorg/mola.git
VCS Type git
VCS Version develop
Last Updated 2026-08-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Advanced metric map classes, using the generic `mrpt::maps::CMetricMap` interface, for use in other MOLA odometry and SLAM modules.

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional authors.

mola_metric_maps

Advanced metric map classes for LiDAR odometry and SLAM, built on the generic mrpt::maps::CMetricMap interface. All maps are serializable, visualizable, and integrate with the mp2p_icp registration library.


Map classes

Production-quality maps

Class Header Description
mola::HashedVoxelPointCloud HashedVoxelPointCloud.h Flat sparse hash map of cubic voxels. Up to 32 points per voxel stored without heap allocation (fixed array SSO). Backend: tsl::robin_map. Implements NearestNeighborsCapable.
mola::SparseVoxelPointCloud SparseVoxelPointCloud.h Two-level voxel map: sparse outer blocks + 32³ inner FixedDenseGrid3D. Tracks per-voxel point means; supports voxel-mean ICP matching. Implements NearestNeighborsCapable. The primary workhorse map in MOLA LO/SLAM.
mola::NDT NDT.h Normal Distributions Transform map (Magnusson 2007). Fits a Gaussian per voxel; planar voxels expose NearestPlaneCapable, non-planar ones expose NearestNeighborsCapable. Enables automatic point-to-point vs. point-to-plane pairing selection.
mola::KeyframePointCloudMap KeyframePointCloudMap.h Keyframe-based map: each keyframe holds a local point cloud plus a SE(3) pose. Supports map corrections without re-inserting points (just update poses). Implements IcpPrepareCapable, NearestPointWithCovCapable, and MetricMapMergeCapable.

Experimental / work-in-progress maps

Class Header Status
mola::SparseTreesPointCloud SparseTreesPointCloud.h Coarse 3D grid of independent CSimplePointsMap sub-maps, each with its own KD-tree. Functionally complete but not benchmarked against the hash-based alternatives for typical SLAM workloads.
mola::OccGrid OccGrid.h Wraps mrpt::maps::COccupancyGridMap2D with a super-resolution likelihood cache. The cache infrastructure is in place but likelihood population is not yet implemented (// TODO). Not used in any production pipeline.

Utility / internal classes

Class Header Description
mola::index3d_t<T> index3d_t.h Discrete 3D integer index. Works as key in std::map and std::unordered_map / tsl::robin_map via the index3d_hash functor, which implements the Teschner et al. (2003) spatial hash.
mola::FixedDenseGrid3D<T,N,C> FixedDenseGrid3D.h Dense NxNxN grid (N=2^SIDE_NUM_BITS) allocated with calloc for fast zero-init. Used as the inner block in SparseVoxelPointCloud. Requires trivially-copyable cell types.

Build and install

Refer to the root MOLA repository.

License

Copyright (C) 2018-2026 Jose Luis Blanco jlblanco@ual.es, University of Almeria

This package is released under the GNU GPL v3 license as open source for research and evaluation purposes only. Commercial licenses available upon request, for this package alone or in combination with the complete SLAM system.

CHANGELOG

Changelog for package mola_metric_maps

3.1.1 (2026-08-10)

  • mola_metric_maps: fix calloc arg order and nodiscard warnings on newer GCC.
  • Give nn_search_cov2cov() a canonical pairing order. The parallel path merged per-thread correspondences in unspecified order, making ICP results non-deterministic run to run; now sorted by local_idx to match the sequential path.
  • IncrementalPointCloud: rebuild the k-d tree on a global SE(3) re-map. changeCoordinatesReference() rewrote coordinates in place without resizing, so the k-d tree kept stale split planes and nearest-neighbor queries silently returned wrong results. Fixes #186.
  • mola_metric_maps: depend on nanoflann_vendor instead of nanoflann, since the rosdep key otherwise resolves to the distro's older libnanoflann-dev.
  • fix(mola_metric_maps): don't require nanoflann>=1.5.1 for KeyframePointCloudMap covariances. Ubuntu jammy's older nanoflann made every use of mola::KeyframePointCloudMap throw on Humble; now falls back to a plain kNN truncated at the same radius, verified numerically equivalent.
  • Contributors: Jose Luis Blanco-Claraco

3.1.0 (2026-08-06)

  • Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)

  • address review comments

  • Add k-d tree baking for IncrementalPointCloud + mm-ipc-bake-kdtree tool Serializes the incremental k-d tree index alongside an IncrementalPointCloud layer's points (TCreationOptions::serialize_kdtree), so it does not have to be rebuilt (an O(N log M) bulk build) on every load. Unlike KeyframePointCloudMap's baked static trees, nanoflann's incremental index had no save/load support at all; this depends on saveIndex()/loadIndex() added upstream (nanoflann >= 1.11.0, see the companion nanoflann PR), gated behind MOLA_METRIC_MAPS_HAS_INCREMENTAL_KDTREE_BAKE so older builds keep working with the option as a documented no-op. Serialization always writes/reads the compacted (tombstone-free) point order, so baking builds a throwaway index over that exact order rather than reusing the live index (whose slots may not match after tombstones/slot recycling). Adds the mm-ipc-bake-kdtree CLI tool (analogous to mm-kf-bake-kdtrees) and a shared mm_cli_utils.h generic layer-iteration helper for it. Unit tests cover: bake/load round-trip through memory and through a real temporary file, k-d tree parameters differing between bake and load time, clearing and re-inserting into a loaded (baked) map, further insertions/trims on a loaded map, and serialize_kdtree=false remaining a no-op -- all independent of whether this build's nanoflann actually supports baking.

  • changelog

  • chore: document and fix some multithreading issues

  • Merge pull request #185 from MOLAorg/chore/remove-keyframe-map-capable Remove the KeyframeMapCapable interface

  • docs: drop the KeyframeMapCapable references left behind

  • chore: remove the KeyframeMapCapable interface This mixin was introduced to expose per-KF pose plumbing to mola_lidar_odometry's trajectory-rebake experiment, which corrected accumulated tilt by re-integrating the keyframe chain. That experiment is being removed: it was never wired in, and rotating map keyframes without transforming the trajectory consistently leaks vertical position. The interface had exactly one implementation and no callers, so it is removed along with the two methods that existed only for the rebake path, [oldestActiveKeyframeID()]{.title-ref} and [applyPivotTransform()]{.title-ref}. [keyframePoses()]{.title-ref} is kept, since the regroup tests already use it as ordinary map API, and the duplicate [cloneKFPoses()]{.title-ref} (whose only difference was not being the virtual one) is folded into it.

  • Merge pull request #184 from MOLAorg/feat/incremental-pointcloud-map feat(metric_maps): add mola::IncrementalPointCloud (incremental k-d tree local map)

  • docs: correct the trySetCreationOptions contract The k-d tree parameters used to require an empty map, with trySetCreationOptions() returning false rather than discarding points. It now compacts and rebuilds instead, so it always succeeds and keeps the map contents; only the previously returned point indices are invalidated. The TCreationOptions docs still described the old behaviour.

  • style: apply clang-format-14

  • feat(metric_maps): degrade gracefully on distros with an old nanoflann The incremental k-d tree index needs nanoflann >= 1.10.0.

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_metric_maps at Robotics Stack Exchange

No version for distro foxy showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.1.1
License GPLv3
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/MOLAorg/mola.git
VCS Type git
VCS Version develop
Last Updated 2026-08-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Advanced metric map classes, using the generic `mrpt::maps::CMetricMap` interface, for use in other MOLA odometry and SLAM modules.

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional authors.

mola_metric_maps

Advanced metric map classes for LiDAR odometry and SLAM, built on the generic mrpt::maps::CMetricMap interface. All maps are serializable, visualizable, and integrate with the mp2p_icp registration library.


Map classes

Production-quality maps

Class Header Description
mola::HashedVoxelPointCloud HashedVoxelPointCloud.h Flat sparse hash map of cubic voxels. Up to 32 points per voxel stored without heap allocation (fixed array SSO). Backend: tsl::robin_map. Implements NearestNeighborsCapable.
mola::SparseVoxelPointCloud SparseVoxelPointCloud.h Two-level voxel map: sparse outer blocks + 32³ inner FixedDenseGrid3D. Tracks per-voxel point means; supports voxel-mean ICP matching. Implements NearestNeighborsCapable. The primary workhorse map in MOLA LO/SLAM.
mola::NDT NDT.h Normal Distributions Transform map (Magnusson 2007). Fits a Gaussian per voxel; planar voxels expose NearestPlaneCapable, non-planar ones expose NearestNeighborsCapable. Enables automatic point-to-point vs. point-to-plane pairing selection.
mola::KeyframePointCloudMap KeyframePointCloudMap.h Keyframe-based map: each keyframe holds a local point cloud plus a SE(3) pose. Supports map corrections without re-inserting points (just update poses). Implements IcpPrepareCapable, NearestPointWithCovCapable, and MetricMapMergeCapable.

Experimental / work-in-progress maps

Class Header Status
mola::SparseTreesPointCloud SparseTreesPointCloud.h Coarse 3D grid of independent CSimplePointsMap sub-maps, each with its own KD-tree. Functionally complete but not benchmarked against the hash-based alternatives for typical SLAM workloads.
mola::OccGrid OccGrid.h Wraps mrpt::maps::COccupancyGridMap2D with a super-resolution likelihood cache. The cache infrastructure is in place but likelihood population is not yet implemented (// TODO). Not used in any production pipeline.

Utility / internal classes

Class Header Description
mola::index3d_t<T> index3d_t.h Discrete 3D integer index. Works as key in std::map and std::unordered_map / tsl::robin_map via the index3d_hash functor, which implements the Teschner et al. (2003) spatial hash.
mola::FixedDenseGrid3D<T,N,C> FixedDenseGrid3D.h Dense NxNxN grid (N=2^SIDE_NUM_BITS) allocated with calloc for fast zero-init. Used as the inner block in SparseVoxelPointCloud. Requires trivially-copyable cell types.

Build and install

Refer to the root MOLA repository.

License

Copyright (C) 2018-2026 Jose Luis Blanco jlblanco@ual.es, University of Almeria

This package is released under the GNU GPL v3 license as open source for research and evaluation purposes only. Commercial licenses available upon request, for this package alone or in combination with the complete SLAM system.

CHANGELOG

Changelog for package mola_metric_maps

3.1.1 (2026-08-10)

  • mola_metric_maps: fix calloc arg order and nodiscard warnings on newer GCC.
  • Give nn_search_cov2cov() a canonical pairing order. The parallel path merged per-thread correspondences in unspecified order, making ICP results non-deterministic run to run; now sorted by local_idx to match the sequential path.
  • IncrementalPointCloud: rebuild the k-d tree on a global SE(3) re-map. changeCoordinatesReference() rewrote coordinates in place without resizing, so the k-d tree kept stale split planes and nearest-neighbor queries silently returned wrong results. Fixes #186.
  • mola_metric_maps: depend on nanoflann_vendor instead of nanoflann, since the rosdep key otherwise resolves to the distro's older libnanoflann-dev.
  • fix(mola_metric_maps): don't require nanoflann>=1.5.1 for KeyframePointCloudMap covariances. Ubuntu jammy's older nanoflann made every use of mola::KeyframePointCloudMap throw on Humble; now falls back to a plain kNN truncated at the same radius, verified numerically equivalent.
  • Contributors: Jose Luis Blanco-Claraco

3.1.0 (2026-08-06)

  • Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)

  • address review comments

  • Add k-d tree baking for IncrementalPointCloud + mm-ipc-bake-kdtree tool Serializes the incremental k-d tree index alongside an IncrementalPointCloud layer's points (TCreationOptions::serialize_kdtree), so it does not have to be rebuilt (an O(N log M) bulk build) on every load. Unlike KeyframePointCloudMap's baked static trees, nanoflann's incremental index had no save/load support at all; this depends on saveIndex()/loadIndex() added upstream (nanoflann >= 1.11.0, see the companion nanoflann PR), gated behind MOLA_METRIC_MAPS_HAS_INCREMENTAL_KDTREE_BAKE so older builds keep working with the option as a documented no-op. Serialization always writes/reads the compacted (tombstone-free) point order, so baking builds a throwaway index over that exact order rather than reusing the live index (whose slots may not match after tombstones/slot recycling). Adds the mm-ipc-bake-kdtree CLI tool (analogous to mm-kf-bake-kdtrees) and a shared mm_cli_utils.h generic layer-iteration helper for it. Unit tests cover: bake/load round-trip through memory and through a real temporary file, k-d tree parameters differing between bake and load time, clearing and re-inserting into a loaded (baked) map, further insertions/trims on a loaded map, and serialize_kdtree=false remaining a no-op -- all independent of whether this build's nanoflann actually supports baking.

  • changelog

  • chore: document and fix some multithreading issues

  • Merge pull request #185 from MOLAorg/chore/remove-keyframe-map-capable Remove the KeyframeMapCapable interface

  • docs: drop the KeyframeMapCapable references left behind

  • chore: remove the KeyframeMapCapable interface This mixin was introduced to expose per-KF pose plumbing to mola_lidar_odometry's trajectory-rebake experiment, which corrected accumulated tilt by re-integrating the keyframe chain. That experiment is being removed: it was never wired in, and rotating map keyframes without transforming the trajectory consistently leaks vertical position. The interface had exactly one implementation and no callers, so it is removed along with the two methods that existed only for the rebake path, [oldestActiveKeyframeID()]{.title-ref} and [applyPivotTransform()]{.title-ref}. [keyframePoses()]{.title-ref} is kept, since the regroup tests already use it as ordinary map API, and the duplicate [cloneKFPoses()]{.title-ref} (whose only difference was not being the virtual one) is folded into it.

  • Merge pull request #184 from MOLAorg/feat/incremental-pointcloud-map feat(metric_maps): add mola::IncrementalPointCloud (incremental k-d tree local map)

  • docs: correct the trySetCreationOptions contract The k-d tree parameters used to require an empty map, with trySetCreationOptions() returning false rather than discarding points. It now compacts and rebuilds instead, so it always succeeds and keeps the map contents; only the previously returned point indices are invalidated. The TCreationOptions docs still described the old behaviour.

  • style: apply clang-format-14

  • feat(metric_maps): degrade gracefully on distros with an old nanoflann The incremental k-d tree index needs nanoflann >= 1.10.0.

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_metric_maps at Robotics Stack Exchange

Package Summary

Version 3.1.1
License GPLv3
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/MOLAorg/mola.git
VCS Type git
VCS Version develop
Last Updated 2026-08-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Advanced metric map classes, using the generic `mrpt::maps::CMetricMap` interface, for use in other MOLA odometry and SLAM modules.

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional authors.

mola_metric_maps

Advanced metric map classes for LiDAR odometry and SLAM, built on the generic mrpt::maps::CMetricMap interface. All maps are serializable, visualizable, and integrate with the mp2p_icp registration library.


Map classes

Production-quality maps

Class Header Description
mola::HashedVoxelPointCloud HashedVoxelPointCloud.h Flat sparse hash map of cubic voxels. Up to 32 points per voxel stored without heap allocation (fixed array SSO). Backend: tsl::robin_map. Implements NearestNeighborsCapable.
mola::SparseVoxelPointCloud SparseVoxelPointCloud.h Two-level voxel map: sparse outer blocks + 32³ inner FixedDenseGrid3D. Tracks per-voxel point means; supports voxel-mean ICP matching. Implements NearestNeighborsCapable. The primary workhorse map in MOLA LO/SLAM.
mola::NDT NDT.h Normal Distributions Transform map (Magnusson 2007). Fits a Gaussian per voxel; planar voxels expose NearestPlaneCapable, non-planar ones expose NearestNeighborsCapable. Enables automatic point-to-point vs. point-to-plane pairing selection.
mola::KeyframePointCloudMap KeyframePointCloudMap.h Keyframe-based map: each keyframe holds a local point cloud plus a SE(3) pose. Supports map corrections without re-inserting points (just update poses). Implements IcpPrepareCapable, NearestPointWithCovCapable, and MetricMapMergeCapable.

Experimental / work-in-progress maps

Class Header Status
mola::SparseTreesPointCloud SparseTreesPointCloud.h Coarse 3D grid of independent CSimplePointsMap sub-maps, each with its own KD-tree. Functionally complete but not benchmarked against the hash-based alternatives for typical SLAM workloads.
mola::OccGrid OccGrid.h Wraps mrpt::maps::COccupancyGridMap2D with a super-resolution likelihood cache. The cache infrastructure is in place but likelihood population is not yet implemented (// TODO). Not used in any production pipeline.

Utility / internal classes

Class Header Description
mola::index3d_t<T> index3d_t.h Discrete 3D integer index. Works as key in std::map and std::unordered_map / tsl::robin_map via the index3d_hash functor, which implements the Teschner et al. (2003) spatial hash.
mola::FixedDenseGrid3D<T,N,C> FixedDenseGrid3D.h Dense NxNxN grid (N=2^SIDE_NUM_BITS) allocated with calloc for fast zero-init. Used as the inner block in SparseVoxelPointCloud. Requires trivially-copyable cell types.

Build and install

Refer to the root MOLA repository.

License

Copyright (C) 2018-2026 Jose Luis Blanco jlblanco@ual.es, University of Almeria

This package is released under the GNU GPL v3 license as open source for research and evaluation purposes only. Commercial licenses available upon request, for this package alone or in combination with the complete SLAM system.

CHANGELOG

Changelog for package mola_metric_maps

3.1.1 (2026-08-10)

  • mola_metric_maps: fix calloc arg order and nodiscard warnings on newer GCC.
  • Give nn_search_cov2cov() a canonical pairing order. The parallel path merged per-thread correspondences in unspecified order, making ICP results non-deterministic run to run; now sorted by local_idx to match the sequential path.
  • IncrementalPointCloud: rebuild the k-d tree on a global SE(3) re-map. changeCoordinatesReference() rewrote coordinates in place without resizing, so the k-d tree kept stale split planes and nearest-neighbor queries silently returned wrong results. Fixes #186.
  • mola_metric_maps: depend on nanoflann_vendor instead of nanoflann, since the rosdep key otherwise resolves to the distro's older libnanoflann-dev.
  • fix(mola_metric_maps): don't require nanoflann>=1.5.1 for KeyframePointCloudMap covariances. Ubuntu jammy's older nanoflann made every use of mola::KeyframePointCloudMap throw on Humble; now falls back to a plain kNN truncated at the same radius, verified numerically equivalent.
  • Contributors: Jose Luis Blanco-Claraco

3.1.0 (2026-08-06)

  • Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)

  • address review comments

  • Add k-d tree baking for IncrementalPointCloud + mm-ipc-bake-kdtree tool Serializes the incremental k-d tree index alongside an IncrementalPointCloud layer's points (TCreationOptions::serialize_kdtree), so it does not have to be rebuilt (an O(N log M) bulk build) on every load. Unlike KeyframePointCloudMap's baked static trees, nanoflann's incremental index had no save/load support at all; this depends on saveIndex()/loadIndex() added upstream (nanoflann >= 1.11.0, see the companion nanoflann PR), gated behind MOLA_METRIC_MAPS_HAS_INCREMENTAL_KDTREE_BAKE so older builds keep working with the option as a documented no-op. Serialization always writes/reads the compacted (tombstone-free) point order, so baking builds a throwaway index over that exact order rather than reusing the live index (whose slots may not match after tombstones/slot recycling). Adds the mm-ipc-bake-kdtree CLI tool (analogous to mm-kf-bake-kdtrees) and a shared mm_cli_utils.h generic layer-iteration helper for it. Unit tests cover: bake/load round-trip through memory and through a real temporary file, k-d tree parameters differing between bake and load time, clearing and re-inserting into a loaded (baked) map, further insertions/trims on a loaded map, and serialize_kdtree=false remaining a no-op -- all independent of whether this build's nanoflann actually supports baking.

  • changelog

  • chore: document and fix some multithreading issues

  • Merge pull request #185 from MOLAorg/chore/remove-keyframe-map-capable Remove the KeyframeMapCapable interface

  • docs: drop the KeyframeMapCapable references left behind

  • chore: remove the KeyframeMapCapable interface This mixin was introduced to expose per-KF pose plumbing to mola_lidar_odometry's trajectory-rebake experiment, which corrected accumulated tilt by re-integrating the keyframe chain. That experiment is being removed: it was never wired in, and rotating map keyframes without transforming the trajectory consistently leaks vertical position. The interface had exactly one implementation and no callers, so it is removed along with the two methods that existed only for the rebake path, [oldestActiveKeyframeID()]{.title-ref} and [applyPivotTransform()]{.title-ref}. [keyframePoses()]{.title-ref} is kept, since the regroup tests already use it as ordinary map API, and the duplicate [cloneKFPoses()]{.title-ref} (whose only difference was not being the virtual one) is folded into it.

  • Merge pull request #184 from MOLAorg/feat/incremental-pointcloud-map feat(metric_maps): add mola::IncrementalPointCloud (incremental k-d tree local map)

  • docs: correct the trySetCreationOptions contract The k-d tree parameters used to require an empty map, with trySetCreationOptions() returning false rather than discarding points. It now compacts and rebuilds instead, so it always succeeds and keeps the map contents; only the previously returned point indices are invalidated. The TCreationOptions docs still described the old behaviour.

  • style: apply clang-format-14

  • feat(metric_maps): degrade gracefully on distros with an old nanoflann The incremental k-d tree index needs nanoflann >= 1.10.0.

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_metric_maps at Robotics Stack Exchange

No version for distro lunar showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.1.1
License GPLv3
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/MOLAorg/mola.git
VCS Type git
VCS Version develop
Last Updated 2026-08-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Advanced metric map classes, using the generic `mrpt::maps::CMetricMap` interface, for use in other MOLA odometry and SLAM modules.

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional authors.

mola_metric_maps

Advanced metric map classes for LiDAR odometry and SLAM, built on the generic mrpt::maps::CMetricMap interface. All maps are serializable, visualizable, and integrate with the mp2p_icp registration library.


Map classes

Production-quality maps

Class Header Description
mola::HashedVoxelPointCloud HashedVoxelPointCloud.h Flat sparse hash map of cubic voxels. Up to 32 points per voxel stored without heap allocation (fixed array SSO). Backend: tsl::robin_map. Implements NearestNeighborsCapable.
mola::SparseVoxelPointCloud SparseVoxelPointCloud.h Two-level voxel map: sparse outer blocks + 32³ inner FixedDenseGrid3D. Tracks per-voxel point means; supports voxel-mean ICP matching. Implements NearestNeighborsCapable. The primary workhorse map in MOLA LO/SLAM.
mola::NDT NDT.h Normal Distributions Transform map (Magnusson 2007). Fits a Gaussian per voxel; planar voxels expose NearestPlaneCapable, non-planar ones expose NearestNeighborsCapable. Enables automatic point-to-point vs. point-to-plane pairing selection.
mola::KeyframePointCloudMap KeyframePointCloudMap.h Keyframe-based map: each keyframe holds a local point cloud plus a SE(3) pose. Supports map corrections without re-inserting points (just update poses). Implements IcpPrepareCapable, NearestPointWithCovCapable, and MetricMapMergeCapable.

Experimental / work-in-progress maps

Class Header Status
mola::SparseTreesPointCloud SparseTreesPointCloud.h Coarse 3D grid of independent CSimplePointsMap sub-maps, each with its own KD-tree. Functionally complete but not benchmarked against the hash-based alternatives for typical SLAM workloads.
mola::OccGrid OccGrid.h Wraps mrpt::maps::COccupancyGridMap2D with a super-resolution likelihood cache. The cache infrastructure is in place but likelihood population is not yet implemented (// TODO). Not used in any production pipeline.

Utility / internal classes

Class Header Description
mola::index3d_t<T> index3d_t.h Discrete 3D integer index. Works as key in std::map and std::unordered_map / tsl::robin_map via the index3d_hash functor, which implements the Teschner et al. (2003) spatial hash.
mola::FixedDenseGrid3D<T,N,C> FixedDenseGrid3D.h Dense NxNxN grid (N=2^SIDE_NUM_BITS) allocated with calloc for fast zero-init. Used as the inner block in SparseVoxelPointCloud. Requires trivially-copyable cell types.

Build and install

Refer to the root MOLA repository.

License

Copyright (C) 2018-2026 Jose Luis Blanco jlblanco@ual.es, University of Almeria

This package is released under the GNU GPL v3 license as open source for research and evaluation purposes only. Commercial licenses available upon request, for this package alone or in combination with the complete SLAM system.

CHANGELOG

Changelog for package mola_metric_maps

3.1.1 (2026-08-10)

  • mola_metric_maps: fix calloc arg order and nodiscard warnings on newer GCC.
  • Give nn_search_cov2cov() a canonical pairing order. The parallel path merged per-thread correspondences in unspecified order, making ICP results non-deterministic run to run; now sorted by local_idx to match the sequential path.
  • IncrementalPointCloud: rebuild the k-d tree on a global SE(3) re-map. changeCoordinatesReference() rewrote coordinates in place without resizing, so the k-d tree kept stale split planes and nearest-neighbor queries silently returned wrong results. Fixes #186.
  • mola_metric_maps: depend on nanoflann_vendor instead of nanoflann, since the rosdep key otherwise resolves to the distro's older libnanoflann-dev.
  • fix(mola_metric_maps): don't require nanoflann>=1.5.1 for KeyframePointCloudMap covariances. Ubuntu jammy's older nanoflann made every use of mola::KeyframePointCloudMap throw on Humble; now falls back to a plain kNN truncated at the same radius, verified numerically equivalent.
  • Contributors: Jose Luis Blanco-Claraco

3.1.0 (2026-08-06)

  • Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)

  • address review comments

  • Add k-d tree baking for IncrementalPointCloud + mm-ipc-bake-kdtree tool Serializes the incremental k-d tree index alongside an IncrementalPointCloud layer's points (TCreationOptions::serialize_kdtree), so it does not have to be rebuilt (an O(N log M) bulk build) on every load. Unlike KeyframePointCloudMap's baked static trees, nanoflann's incremental index had no save/load support at all; this depends on saveIndex()/loadIndex() added upstream (nanoflann >= 1.11.0, see the companion nanoflann PR), gated behind MOLA_METRIC_MAPS_HAS_INCREMENTAL_KDTREE_BAKE so older builds keep working with the option as a documented no-op. Serialization always writes/reads the compacted (tombstone-free) point order, so baking builds a throwaway index over that exact order rather than reusing the live index (whose slots may not match after tombstones/slot recycling). Adds the mm-ipc-bake-kdtree CLI tool (analogous to mm-kf-bake-kdtrees) and a shared mm_cli_utils.h generic layer-iteration helper for it. Unit tests cover: bake/load round-trip through memory and through a real temporary file, k-d tree parameters differing between bake and load time, clearing and re-inserting into a loaded (baked) map, further insertions/trims on a loaded map, and serialize_kdtree=false remaining a no-op -- all independent of whether this build's nanoflann actually supports baking.

  • changelog

  • chore: document and fix some multithreading issues

  • Merge pull request #185 from MOLAorg/chore/remove-keyframe-map-capable Remove the KeyframeMapCapable interface

  • docs: drop the KeyframeMapCapable references left behind

  • chore: remove the KeyframeMapCapable interface This mixin was introduced to expose per-KF pose plumbing to mola_lidar_odometry's trajectory-rebake experiment, which corrected accumulated tilt by re-integrating the keyframe chain. That experiment is being removed: it was never wired in, and rotating map keyframes without transforming the trajectory consistently leaks vertical position. The interface had exactly one implementation and no callers, so it is removed along with the two methods that existed only for the rebake path, [oldestActiveKeyframeID()]{.title-ref} and [applyPivotTransform()]{.title-ref}. [keyframePoses()]{.title-ref} is kept, since the regroup tests already use it as ordinary map API, and the duplicate [cloneKFPoses()]{.title-ref} (whose only difference was not being the virtual one) is folded into it.

  • Merge pull request #184 from MOLAorg/feat/incremental-pointcloud-map feat(metric_maps): add mola::IncrementalPointCloud (incremental k-d tree local map)

  • docs: correct the trySetCreationOptions contract The k-d tree parameters used to require an empty map, with trySetCreationOptions() returning false rather than discarding points. It now compacts and rebuilds instead, so it always succeeds and keeps the map contents; only the previously returned point indices are invalidated. The TCreationOptions docs still described the old behaviour.

  • style: apply clang-format-14

  • feat(metric_maps): degrade gracefully on distros with an old nanoflann The incremental k-d tree index needs nanoflann >= 1.10.0.

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_metric_maps at Robotics Stack Exchange

No version for distro jade showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.1.1
License GPLv3
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/MOLAorg/mola.git
VCS Type git
VCS Version develop
Last Updated 2026-08-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Advanced metric map classes, using the generic `mrpt::maps::CMetricMap` interface, for use in other MOLA odometry and SLAM modules.

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional authors.

mola_metric_maps

Advanced metric map classes for LiDAR odometry and SLAM, built on the generic mrpt::maps::CMetricMap interface. All maps are serializable, visualizable, and integrate with the mp2p_icp registration library.


Map classes

Production-quality maps

Class Header Description
mola::HashedVoxelPointCloud HashedVoxelPointCloud.h Flat sparse hash map of cubic voxels. Up to 32 points per voxel stored without heap allocation (fixed array SSO). Backend: tsl::robin_map. Implements NearestNeighborsCapable.
mola::SparseVoxelPointCloud SparseVoxelPointCloud.h Two-level voxel map: sparse outer blocks + 32³ inner FixedDenseGrid3D. Tracks per-voxel point means; supports voxel-mean ICP matching. Implements NearestNeighborsCapable. The primary workhorse map in MOLA LO/SLAM.
mola::NDT NDT.h Normal Distributions Transform map (Magnusson 2007). Fits a Gaussian per voxel; planar voxels expose NearestPlaneCapable, non-planar ones expose NearestNeighborsCapable. Enables automatic point-to-point vs. point-to-plane pairing selection.
mola::KeyframePointCloudMap KeyframePointCloudMap.h Keyframe-based map: each keyframe holds a local point cloud plus a SE(3) pose. Supports map corrections without re-inserting points (just update poses). Implements IcpPrepareCapable, NearestPointWithCovCapable, and MetricMapMergeCapable.

Experimental / work-in-progress maps

Class Header Status
mola::SparseTreesPointCloud SparseTreesPointCloud.h Coarse 3D grid of independent CSimplePointsMap sub-maps, each with its own KD-tree. Functionally complete but not benchmarked against the hash-based alternatives for typical SLAM workloads.
mola::OccGrid OccGrid.h Wraps mrpt::maps::COccupancyGridMap2D with a super-resolution likelihood cache. The cache infrastructure is in place but likelihood population is not yet implemented (// TODO). Not used in any production pipeline.

Utility / internal classes

Class Header Description
mola::index3d_t<T> index3d_t.h Discrete 3D integer index. Works as key in std::map and std::unordered_map / tsl::robin_map via the index3d_hash functor, which implements the Teschner et al. (2003) spatial hash.
mola::FixedDenseGrid3D<T,N,C> FixedDenseGrid3D.h Dense NxNxN grid (N=2^SIDE_NUM_BITS) allocated with calloc for fast zero-init. Used as the inner block in SparseVoxelPointCloud. Requires trivially-copyable cell types.

Build and install

Refer to the root MOLA repository.

License

Copyright (C) 2018-2026 Jose Luis Blanco jlblanco@ual.es, University of Almeria

This package is released under the GNU GPL v3 license as open source for research and evaluation purposes only. Commercial licenses available upon request, for this package alone or in combination with the complete SLAM system.

CHANGELOG

Changelog for package mola_metric_maps

3.1.1 (2026-08-10)

  • mola_metric_maps: fix calloc arg order and nodiscard warnings on newer GCC.
  • Give nn_search_cov2cov() a canonical pairing order. The parallel path merged per-thread correspondences in unspecified order, making ICP results non-deterministic run to run; now sorted by local_idx to match the sequential path.
  • IncrementalPointCloud: rebuild the k-d tree on a global SE(3) re-map. changeCoordinatesReference() rewrote coordinates in place without resizing, so the k-d tree kept stale split planes and nearest-neighbor queries silently returned wrong results. Fixes #186.
  • mola_metric_maps: depend on nanoflann_vendor instead of nanoflann, since the rosdep key otherwise resolves to the distro's older libnanoflann-dev.
  • fix(mola_metric_maps): don't require nanoflann>=1.5.1 for KeyframePointCloudMap covariances. Ubuntu jammy's older nanoflann made every use of mola::KeyframePointCloudMap throw on Humble; now falls back to a plain kNN truncated at the same radius, verified numerically equivalent.
  • Contributors: Jose Luis Blanco-Claraco

3.1.0 (2026-08-06)

  • Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)

  • address review comments

  • Add k-d tree baking for IncrementalPointCloud + mm-ipc-bake-kdtree tool Serializes the incremental k-d tree index alongside an IncrementalPointCloud layer's points (TCreationOptions::serialize_kdtree), so it does not have to be rebuilt (an O(N log M) bulk build) on every load. Unlike KeyframePointCloudMap's baked static trees, nanoflann's incremental index had no save/load support at all; this depends on saveIndex()/loadIndex() added upstream (nanoflann >= 1.11.0, see the companion nanoflann PR), gated behind MOLA_METRIC_MAPS_HAS_INCREMENTAL_KDTREE_BAKE so older builds keep working with the option as a documented no-op. Serialization always writes/reads the compacted (tombstone-free) point order, so baking builds a throwaway index over that exact order rather than reusing the live index (whose slots may not match after tombstones/slot recycling). Adds the mm-ipc-bake-kdtree CLI tool (analogous to mm-kf-bake-kdtrees) and a shared mm_cli_utils.h generic layer-iteration helper for it. Unit tests cover: bake/load round-trip through memory and through a real temporary file, k-d tree parameters differing between bake and load time, clearing and re-inserting into a loaded (baked) map, further insertions/trims on a loaded map, and serialize_kdtree=false remaining a no-op -- all independent of whether this build's nanoflann actually supports baking.

  • changelog

  • chore: document and fix some multithreading issues

  • Merge pull request #185 from MOLAorg/chore/remove-keyframe-map-capable Remove the KeyframeMapCapable interface

  • docs: drop the KeyframeMapCapable references left behind

  • chore: remove the KeyframeMapCapable interface This mixin was introduced to expose per-KF pose plumbing to mola_lidar_odometry's trajectory-rebake experiment, which corrected accumulated tilt by re-integrating the keyframe chain. That experiment is being removed: it was never wired in, and rotating map keyframes without transforming the trajectory consistently leaks vertical position. The interface had exactly one implementation and no callers, so it is removed along with the two methods that existed only for the rebake path, [oldestActiveKeyframeID()]{.title-ref} and [applyPivotTransform()]{.title-ref}. [keyframePoses()]{.title-ref} is kept, since the regroup tests already use it as ordinary map API, and the duplicate [cloneKFPoses()]{.title-ref} (whose only difference was not being the virtual one) is folded into it.

  • Merge pull request #184 from MOLAorg/feat/incremental-pointcloud-map feat(metric_maps): add mola::IncrementalPointCloud (incremental k-d tree local map)

  • docs: correct the trySetCreationOptions contract The k-d tree parameters used to require an empty map, with trySetCreationOptions() returning false rather than discarding points. It now compacts and rebuilds instead, so it always succeeds and keeps the map contents; only the previously returned point indices are invalidated. The TCreationOptions docs still described the old behaviour.

  • style: apply clang-format-14

  • feat(metric_maps): degrade gracefully on distros with an old nanoflann The incremental k-d tree index needs nanoflann >= 1.10.0.

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_metric_maps at Robotics Stack Exchange

No version for distro indigo showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.1.1
License GPLv3
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/MOLAorg/mola.git
VCS Type git
VCS Version develop
Last Updated 2026-08-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Advanced metric map classes, using the generic `mrpt::maps::CMetricMap` interface, for use in other MOLA odometry and SLAM modules.

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional authors.

mola_metric_maps

Advanced metric map classes for LiDAR odometry and SLAM, built on the generic mrpt::maps::CMetricMap interface. All maps are serializable, visualizable, and integrate with the mp2p_icp registration library.


Map classes

Production-quality maps

Class Header Description
mola::HashedVoxelPointCloud HashedVoxelPointCloud.h Flat sparse hash map of cubic voxels. Up to 32 points per voxel stored without heap allocation (fixed array SSO). Backend: tsl::robin_map. Implements NearestNeighborsCapable.
mola::SparseVoxelPointCloud SparseVoxelPointCloud.h Two-level voxel map: sparse outer blocks + 32³ inner FixedDenseGrid3D. Tracks per-voxel point means; supports voxel-mean ICP matching. Implements NearestNeighborsCapable. The primary workhorse map in MOLA LO/SLAM.
mola::NDT NDT.h Normal Distributions Transform map (Magnusson 2007). Fits a Gaussian per voxel; planar voxels expose NearestPlaneCapable, non-planar ones expose NearestNeighborsCapable. Enables automatic point-to-point vs. point-to-plane pairing selection.
mola::KeyframePointCloudMap KeyframePointCloudMap.h Keyframe-based map: each keyframe holds a local point cloud plus a SE(3) pose. Supports map corrections without re-inserting points (just update poses). Implements IcpPrepareCapable, NearestPointWithCovCapable, and MetricMapMergeCapable.

Experimental / work-in-progress maps

Class Header Status
mola::SparseTreesPointCloud SparseTreesPointCloud.h Coarse 3D grid of independent CSimplePointsMap sub-maps, each with its own KD-tree. Functionally complete but not benchmarked against the hash-based alternatives for typical SLAM workloads.
mola::OccGrid OccGrid.h Wraps mrpt::maps::COccupancyGridMap2D with a super-resolution likelihood cache. The cache infrastructure is in place but likelihood population is not yet implemented (// TODO). Not used in any production pipeline.

Utility / internal classes

Class Header Description
mola::index3d_t<T> index3d_t.h Discrete 3D integer index. Works as key in std::map and std::unordered_map / tsl::robin_map via the index3d_hash functor, which implements the Teschner et al. (2003) spatial hash.
mola::FixedDenseGrid3D<T,N,C> FixedDenseGrid3D.h Dense NxNxN grid (N=2^SIDE_NUM_BITS) allocated with calloc for fast zero-init. Used as the inner block in SparseVoxelPointCloud. Requires trivially-copyable cell types.

Build and install

Refer to the root MOLA repository.

License

Copyright (C) 2018-2026 Jose Luis Blanco jlblanco@ual.es, University of Almeria

This package is released under the GNU GPL v3 license as open source for research and evaluation purposes only. Commercial licenses available upon request, for this package alone or in combination with the complete SLAM system.

CHANGELOG

Changelog for package mola_metric_maps

3.1.1 (2026-08-10)

  • mola_metric_maps: fix calloc arg order and nodiscard warnings on newer GCC.
  • Give nn_search_cov2cov() a canonical pairing order. The parallel path merged per-thread correspondences in unspecified order, making ICP results non-deterministic run to run; now sorted by local_idx to match the sequential path.
  • IncrementalPointCloud: rebuild the k-d tree on a global SE(3) re-map. changeCoordinatesReference() rewrote coordinates in place without resizing, so the k-d tree kept stale split planes and nearest-neighbor queries silently returned wrong results. Fixes #186.
  • mola_metric_maps: depend on nanoflann_vendor instead of nanoflann, since the rosdep key otherwise resolves to the distro's older libnanoflann-dev.
  • fix(mola_metric_maps): don't require nanoflann>=1.5.1 for KeyframePointCloudMap covariances. Ubuntu jammy's older nanoflann made every use of mola::KeyframePointCloudMap throw on Humble; now falls back to a plain kNN truncated at the same radius, verified numerically equivalent.
  • Contributors: Jose Luis Blanco-Claraco

3.1.0 (2026-08-06)

  • Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)

  • address review comments

  • Add k-d tree baking for IncrementalPointCloud + mm-ipc-bake-kdtree tool Serializes the incremental k-d tree index alongside an IncrementalPointCloud layer's points (TCreationOptions::serialize_kdtree), so it does not have to be rebuilt (an O(N log M) bulk build) on every load. Unlike KeyframePointCloudMap's baked static trees, nanoflann's incremental index had no save/load support at all; this depends on saveIndex()/loadIndex() added upstream (nanoflann >= 1.11.0, see the companion nanoflann PR), gated behind MOLA_METRIC_MAPS_HAS_INCREMENTAL_KDTREE_BAKE so older builds keep working with the option as a documented no-op. Serialization always writes/reads the compacted (tombstone-free) point order, so baking builds a throwaway index over that exact order rather than reusing the live index (whose slots may not match after tombstones/slot recycling). Adds the mm-ipc-bake-kdtree CLI tool (analogous to mm-kf-bake-kdtrees) and a shared mm_cli_utils.h generic layer-iteration helper for it. Unit tests cover: bake/load round-trip through memory and through a real temporary file, k-d tree parameters differing between bake and load time, clearing and re-inserting into a loaded (baked) map, further insertions/trims on a loaded map, and serialize_kdtree=false remaining a no-op -- all independent of whether this build's nanoflann actually supports baking.

  • changelog

  • chore: document and fix some multithreading issues

  • Merge pull request #185 from MOLAorg/chore/remove-keyframe-map-capable Remove the KeyframeMapCapable interface

  • docs: drop the KeyframeMapCapable references left behind

  • chore: remove the KeyframeMapCapable interface This mixin was introduced to expose per-KF pose plumbing to mola_lidar_odometry's trajectory-rebake experiment, which corrected accumulated tilt by re-integrating the keyframe chain. That experiment is being removed: it was never wired in, and rotating map keyframes without transforming the trajectory consistently leaks vertical position. The interface had exactly one implementation and no callers, so it is removed along with the two methods that existed only for the rebake path, [oldestActiveKeyframeID()]{.title-ref} and [applyPivotTransform()]{.title-ref}. [keyframePoses()]{.title-ref} is kept, since the regroup tests already use it as ordinary map API, and the duplicate [cloneKFPoses()]{.title-ref} (whose only difference was not being the virtual one) is folded into it.

  • Merge pull request #184 from MOLAorg/feat/incremental-pointcloud-map feat(metric_maps): add mola::IncrementalPointCloud (incremental k-d tree local map)

  • docs: correct the trySetCreationOptions contract The k-d tree parameters used to require an empty map, with trySetCreationOptions() returning false rather than discarding points. It now compacts and rebuilds instead, so it always succeeds and keeps the map contents; only the previously returned point indices are invalidated. The TCreationOptions docs still described the old behaviour.

  • style: apply clang-format-14

  • feat(metric_maps): degrade gracefully on distros with an old nanoflann The incremental k-d tree index needs nanoflann >= 1.10.0.

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_metric_maps at Robotics Stack Exchange

No version for distro hydro showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.1.1
License GPLv3
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/MOLAorg/mola.git
VCS Type git
VCS Version develop
Last Updated 2026-08-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Advanced metric map classes, using the generic `mrpt::maps::CMetricMap` interface, for use in other MOLA odometry and SLAM modules.

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional authors.

mola_metric_maps

Advanced metric map classes for LiDAR odometry and SLAM, built on the generic mrpt::maps::CMetricMap interface. All maps are serializable, visualizable, and integrate with the mp2p_icp registration library.


Map classes

Production-quality maps

Class Header Description
mola::HashedVoxelPointCloud HashedVoxelPointCloud.h Flat sparse hash map of cubic voxels. Up to 32 points per voxel stored without heap allocation (fixed array SSO). Backend: tsl::robin_map. Implements NearestNeighborsCapable.
mola::SparseVoxelPointCloud SparseVoxelPointCloud.h Two-level voxel map: sparse outer blocks + 32³ inner FixedDenseGrid3D. Tracks per-voxel point means; supports voxel-mean ICP matching. Implements NearestNeighborsCapable. The primary workhorse map in MOLA LO/SLAM.
mola::NDT NDT.h Normal Distributions Transform map (Magnusson 2007). Fits a Gaussian per voxel; planar voxels expose NearestPlaneCapable, non-planar ones expose NearestNeighborsCapable. Enables automatic point-to-point vs. point-to-plane pairing selection.
mola::KeyframePointCloudMap KeyframePointCloudMap.h Keyframe-based map: each keyframe holds a local point cloud plus a SE(3) pose. Supports map corrections without re-inserting points (just update poses). Implements IcpPrepareCapable, NearestPointWithCovCapable, and MetricMapMergeCapable.

Experimental / work-in-progress maps

Class Header Status
mola::SparseTreesPointCloud SparseTreesPointCloud.h Coarse 3D grid of independent CSimplePointsMap sub-maps, each with its own KD-tree. Functionally complete but not benchmarked against the hash-based alternatives for typical SLAM workloads.
mola::OccGrid OccGrid.h Wraps mrpt::maps::COccupancyGridMap2D with a super-resolution likelihood cache. The cache infrastructure is in place but likelihood population is not yet implemented (// TODO). Not used in any production pipeline.

Utility / internal classes

Class Header Description
mola::index3d_t<T> index3d_t.h Discrete 3D integer index. Works as key in std::map and std::unordered_map / tsl::robin_map via the index3d_hash functor, which implements the Teschner et al. (2003) spatial hash.
mola::FixedDenseGrid3D<T,N,C> FixedDenseGrid3D.h Dense NxNxN grid (N=2^SIDE_NUM_BITS) allocated with calloc for fast zero-init. Used as the inner block in SparseVoxelPointCloud. Requires trivially-copyable cell types.

Build and install

Refer to the root MOLA repository.

License

Copyright (C) 2018-2026 Jose Luis Blanco jlblanco@ual.es, University of Almeria

This package is released under the GNU GPL v3 license as open source for research and evaluation purposes only. Commercial licenses available upon request, for this package alone or in combination with the complete SLAM system.

CHANGELOG

Changelog for package mola_metric_maps

3.1.1 (2026-08-10)

  • mola_metric_maps: fix calloc arg order and nodiscard warnings on newer GCC.
  • Give nn_search_cov2cov() a canonical pairing order. The parallel path merged per-thread correspondences in unspecified order, making ICP results non-deterministic run to run; now sorted by local_idx to match the sequential path.
  • IncrementalPointCloud: rebuild the k-d tree on a global SE(3) re-map. changeCoordinatesReference() rewrote coordinates in place without resizing, so the k-d tree kept stale split planes and nearest-neighbor queries silently returned wrong results. Fixes #186.
  • mola_metric_maps: depend on nanoflann_vendor instead of nanoflann, since the rosdep key otherwise resolves to the distro's older libnanoflann-dev.
  • fix(mola_metric_maps): don't require nanoflann>=1.5.1 for KeyframePointCloudMap covariances. Ubuntu jammy's older nanoflann made every use of mola::KeyframePointCloudMap throw on Humble; now falls back to a plain kNN truncated at the same radius, verified numerically equivalent.
  • Contributors: Jose Luis Blanco-Claraco

3.1.0 (2026-08-06)

  • Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)

  • address review comments

  • Add k-d tree baking for IncrementalPointCloud + mm-ipc-bake-kdtree tool Serializes the incremental k-d tree index alongside an IncrementalPointCloud layer's points (TCreationOptions::serialize_kdtree), so it does not have to be rebuilt (an O(N log M) bulk build) on every load. Unlike KeyframePointCloudMap's baked static trees, nanoflann's incremental index had no save/load support at all; this depends on saveIndex()/loadIndex() added upstream (nanoflann >= 1.11.0, see the companion nanoflann PR), gated behind MOLA_METRIC_MAPS_HAS_INCREMENTAL_KDTREE_BAKE so older builds keep working with the option as a documented no-op. Serialization always writes/reads the compacted (tombstone-free) point order, so baking builds a throwaway index over that exact order rather than reusing the live index (whose slots may not match after tombstones/slot recycling). Adds the mm-ipc-bake-kdtree CLI tool (analogous to mm-kf-bake-kdtrees) and a shared mm_cli_utils.h generic layer-iteration helper for it. Unit tests cover: bake/load round-trip through memory and through a real temporary file, k-d tree parameters differing between bake and load time, clearing and re-inserting into a loaded (baked) map, further insertions/trims on a loaded map, and serialize_kdtree=false remaining a no-op -- all independent of whether this build's nanoflann actually supports baking.

  • changelog

  • chore: document and fix some multithreading issues

  • Merge pull request #185 from MOLAorg/chore/remove-keyframe-map-capable Remove the KeyframeMapCapable interface

  • docs: drop the KeyframeMapCapable references left behind

  • chore: remove the KeyframeMapCapable interface This mixin was introduced to expose per-KF pose plumbing to mola_lidar_odometry's trajectory-rebake experiment, which corrected accumulated tilt by re-integrating the keyframe chain. That experiment is being removed: it was never wired in, and rotating map keyframes without transforming the trajectory consistently leaks vertical position. The interface had exactly one implementation and no callers, so it is removed along with the two methods that existed only for the rebake path, [oldestActiveKeyframeID()]{.title-ref} and [applyPivotTransform()]{.title-ref}. [keyframePoses()]{.title-ref} is kept, since the regroup tests already use it as ordinary map API, and the duplicate [cloneKFPoses()]{.title-ref} (whose only difference was not being the virtual one) is folded into it.

  • Merge pull request #184 from MOLAorg/feat/incremental-pointcloud-map feat(metric_maps): add mola::IncrementalPointCloud (incremental k-d tree local map)

  • docs: correct the trySetCreationOptions contract The k-d tree parameters used to require an empty map, with trySetCreationOptions() returning false rather than discarding points. It now compacts and rebuilds instead, so it always succeeds and keeps the map contents; only the previously returned point indices are invalidated. The TCreationOptions docs still described the old behaviour.

  • style: apply clang-format-14

  • feat(metric_maps): degrade gracefully on distros with an old nanoflann The incremental k-d tree index needs nanoflann >= 1.10.0.

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_metric_maps at Robotics Stack Exchange

No version for distro kinetic showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.1.1
License GPLv3
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/MOLAorg/mola.git
VCS Type git
VCS Version develop
Last Updated 2026-08-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Advanced metric map classes, using the generic `mrpt::maps::CMetricMap` interface, for use in other MOLA odometry and SLAM modules.

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional authors.

mola_metric_maps

Advanced metric map classes for LiDAR odometry and SLAM, built on the generic mrpt::maps::CMetricMap interface. All maps are serializable, visualizable, and integrate with the mp2p_icp registration library.


Map classes

Production-quality maps

Class Header Description
mola::HashedVoxelPointCloud HashedVoxelPointCloud.h Flat sparse hash map of cubic voxels. Up to 32 points per voxel stored without heap allocation (fixed array SSO). Backend: tsl::robin_map. Implements NearestNeighborsCapable.
mola::SparseVoxelPointCloud SparseVoxelPointCloud.h Two-level voxel map: sparse outer blocks + 32³ inner FixedDenseGrid3D. Tracks per-voxel point means; supports voxel-mean ICP matching. Implements NearestNeighborsCapable. The primary workhorse map in MOLA LO/SLAM.
mola::NDT NDT.h Normal Distributions Transform map (Magnusson 2007). Fits a Gaussian per voxel; planar voxels expose NearestPlaneCapable, non-planar ones expose NearestNeighborsCapable. Enables automatic point-to-point vs. point-to-plane pairing selection.
mola::KeyframePointCloudMap KeyframePointCloudMap.h Keyframe-based map: each keyframe holds a local point cloud plus a SE(3) pose. Supports map corrections without re-inserting points (just update poses). Implements IcpPrepareCapable, NearestPointWithCovCapable, and MetricMapMergeCapable.

Experimental / work-in-progress maps

Class Header Status
mola::SparseTreesPointCloud SparseTreesPointCloud.h Coarse 3D grid of independent CSimplePointsMap sub-maps, each with its own KD-tree. Functionally complete but not benchmarked against the hash-based alternatives for typical SLAM workloads.
mola::OccGrid OccGrid.h Wraps mrpt::maps::COccupancyGridMap2D with a super-resolution likelihood cache. The cache infrastructure is in place but likelihood population is not yet implemented (// TODO). Not used in any production pipeline.

Utility / internal classes

Class Header Description
mola::index3d_t<T> index3d_t.h Discrete 3D integer index. Works as key in std::map and std::unordered_map / tsl::robin_map via the index3d_hash functor, which implements the Teschner et al. (2003) spatial hash.
mola::FixedDenseGrid3D<T,N,C> FixedDenseGrid3D.h Dense NxNxN grid (N=2^SIDE_NUM_BITS) allocated with calloc for fast zero-init. Used as the inner block in SparseVoxelPointCloud. Requires trivially-copyable cell types.

Build and install

Refer to the root MOLA repository.

License

Copyright (C) 2018-2026 Jose Luis Blanco jlblanco@ual.es, University of Almeria

This package is released under the GNU GPL v3 license as open source for research and evaluation purposes only. Commercial licenses available upon request, for this package alone or in combination with the complete SLAM system.

CHANGELOG

Changelog for package mola_metric_maps

3.1.1 (2026-08-10)

  • mola_metric_maps: fix calloc arg order and nodiscard warnings on newer GCC.
  • Give nn_search_cov2cov() a canonical pairing order. The parallel path merged per-thread correspondences in unspecified order, making ICP results non-deterministic run to run; now sorted by local_idx to match the sequential path.
  • IncrementalPointCloud: rebuild the k-d tree on a global SE(3) re-map. changeCoordinatesReference() rewrote coordinates in place without resizing, so the k-d tree kept stale split planes and nearest-neighbor queries silently returned wrong results. Fixes #186.
  • mola_metric_maps: depend on nanoflann_vendor instead of nanoflann, since the rosdep key otherwise resolves to the distro's older libnanoflann-dev.
  • fix(mola_metric_maps): don't require nanoflann>=1.5.1 for KeyframePointCloudMap covariances. Ubuntu jammy's older nanoflann made every use of mola::KeyframePointCloudMap throw on Humble; now falls back to a plain kNN truncated at the same radius, verified numerically equivalent.
  • Contributors: Jose Luis Blanco-Claraco

3.1.0 (2026-08-06)

  • Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)

  • address review comments

  • Add k-d tree baking for IncrementalPointCloud + mm-ipc-bake-kdtree tool Serializes the incremental k-d tree index alongside an IncrementalPointCloud layer's points (TCreationOptions::serialize_kdtree), so it does not have to be rebuilt (an O(N log M) bulk build) on every load. Unlike KeyframePointCloudMap's baked static trees, nanoflann's incremental index had no save/load support at all; this depends on saveIndex()/loadIndex() added upstream (nanoflann >= 1.11.0, see the companion nanoflann PR), gated behind MOLA_METRIC_MAPS_HAS_INCREMENTAL_KDTREE_BAKE so older builds keep working with the option as a documented no-op. Serialization always writes/reads the compacted (tombstone-free) point order, so baking builds a throwaway index over that exact order rather than reusing the live index (whose slots may not match after tombstones/slot recycling). Adds the mm-ipc-bake-kdtree CLI tool (analogous to mm-kf-bake-kdtrees) and a shared mm_cli_utils.h generic layer-iteration helper for it. Unit tests cover: bake/load round-trip through memory and through a real temporary file, k-d tree parameters differing between bake and load time, clearing and re-inserting into a loaded (baked) map, further insertions/trims on a loaded map, and serialize_kdtree=false remaining a no-op -- all independent of whether this build's nanoflann actually supports baking.

  • changelog

  • chore: document and fix some multithreading issues

  • Merge pull request #185 from MOLAorg/chore/remove-keyframe-map-capable Remove the KeyframeMapCapable interface

  • docs: drop the KeyframeMapCapable references left behind

  • chore: remove the KeyframeMapCapable interface This mixin was introduced to expose per-KF pose plumbing to mola_lidar_odometry's trajectory-rebake experiment, which corrected accumulated tilt by re-integrating the keyframe chain. That experiment is being removed: it was never wired in, and rotating map keyframes without transforming the trajectory consistently leaks vertical position. The interface had exactly one implementation and no callers, so it is removed along with the two methods that existed only for the rebake path, [oldestActiveKeyframeID()]{.title-ref} and [applyPivotTransform()]{.title-ref}. [keyframePoses()]{.title-ref} is kept, since the regroup tests already use it as ordinary map API, and the duplicate [cloneKFPoses()]{.title-ref} (whose only difference was not being the virtual one) is folded into it.

  • Merge pull request #184 from MOLAorg/feat/incremental-pointcloud-map feat(metric_maps): add mola::IncrementalPointCloud (incremental k-d tree local map)

  • docs: correct the trySetCreationOptions contract The k-d tree parameters used to require an empty map, with trySetCreationOptions() returning false rather than discarding points. It now compacts and rebuilds instead, so it always succeeds and keeps the map contents; only the previously returned point indices are invalidated. The TCreationOptions docs still described the old behaviour.

  • style: apply clang-format-14

  • feat(metric_maps): degrade gracefully on distros with an old nanoflann The incremental k-d tree index needs nanoflann >= 1.10.0.

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_metric_maps at Robotics Stack Exchange

No version for distro melodic showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.1.1
License GPLv3
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/MOLAorg/mola.git
VCS Type git
VCS Version develop
Last Updated 2026-08-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Advanced metric map classes, using the generic `mrpt::maps::CMetricMap` interface, for use in other MOLA odometry and SLAM modules.

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional authors.

mola_metric_maps

Advanced metric map classes for LiDAR odometry and SLAM, built on the generic mrpt::maps::CMetricMap interface. All maps are serializable, visualizable, and integrate with the mp2p_icp registration library.


Map classes

Production-quality maps

Class Header Description
mola::HashedVoxelPointCloud HashedVoxelPointCloud.h Flat sparse hash map of cubic voxels. Up to 32 points per voxel stored without heap allocation (fixed array SSO). Backend: tsl::robin_map. Implements NearestNeighborsCapable.
mola::SparseVoxelPointCloud SparseVoxelPointCloud.h Two-level voxel map: sparse outer blocks + 32³ inner FixedDenseGrid3D. Tracks per-voxel point means; supports voxel-mean ICP matching. Implements NearestNeighborsCapable. The primary workhorse map in MOLA LO/SLAM.
mola::NDT NDT.h Normal Distributions Transform map (Magnusson 2007). Fits a Gaussian per voxel; planar voxels expose NearestPlaneCapable, non-planar ones expose NearestNeighborsCapable. Enables automatic point-to-point vs. point-to-plane pairing selection.
mola::KeyframePointCloudMap KeyframePointCloudMap.h Keyframe-based map: each keyframe holds a local point cloud plus a SE(3) pose. Supports map corrections without re-inserting points (just update poses). Implements IcpPrepareCapable, NearestPointWithCovCapable, and MetricMapMergeCapable.

Experimental / work-in-progress maps

Class Header Status
mola::SparseTreesPointCloud SparseTreesPointCloud.h Coarse 3D grid of independent CSimplePointsMap sub-maps, each with its own KD-tree. Functionally complete but not benchmarked against the hash-based alternatives for typical SLAM workloads.
mola::OccGrid OccGrid.h Wraps mrpt::maps::COccupancyGridMap2D with a super-resolution likelihood cache. The cache infrastructure is in place but likelihood population is not yet implemented (// TODO). Not used in any production pipeline.

Utility / internal classes

Class Header Description
mola::index3d_t<T> index3d_t.h Discrete 3D integer index. Works as key in std::map and std::unordered_map / tsl::robin_map via the index3d_hash functor, which implements the Teschner et al. (2003) spatial hash.
mola::FixedDenseGrid3D<T,N,C> FixedDenseGrid3D.h Dense NxNxN grid (N=2^SIDE_NUM_BITS) allocated with calloc for fast zero-init. Used as the inner block in SparseVoxelPointCloud. Requires trivially-copyable cell types.

Build and install

Refer to the root MOLA repository.

License

Copyright (C) 2018-2026 Jose Luis Blanco jlblanco@ual.es, University of Almeria

This package is released under the GNU GPL v3 license as open source for research and evaluation purposes only. Commercial licenses available upon request, for this package alone or in combination with the complete SLAM system.

CHANGELOG

Changelog for package mola_metric_maps

3.1.1 (2026-08-10)

  • mola_metric_maps: fix calloc arg order and nodiscard warnings on newer GCC.
  • Give nn_search_cov2cov() a canonical pairing order. The parallel path merged per-thread correspondences in unspecified order, making ICP results non-deterministic run to run; now sorted by local_idx to match the sequential path.
  • IncrementalPointCloud: rebuild the k-d tree on a global SE(3) re-map. changeCoordinatesReference() rewrote coordinates in place without resizing, so the k-d tree kept stale split planes and nearest-neighbor queries silently returned wrong results. Fixes #186.
  • mola_metric_maps: depend on nanoflann_vendor instead of nanoflann, since the rosdep key otherwise resolves to the distro's older libnanoflann-dev.
  • fix(mola_metric_maps): don't require nanoflann>=1.5.1 for KeyframePointCloudMap covariances. Ubuntu jammy's older nanoflann made every use of mola::KeyframePointCloudMap throw on Humble; now falls back to a plain kNN truncated at the same radius, verified numerically equivalent.
  • Contributors: Jose Luis Blanco-Claraco

3.1.0 (2026-08-06)

  • Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)

  • address review comments

  • Add k-d tree baking for IncrementalPointCloud + mm-ipc-bake-kdtree tool Serializes the incremental k-d tree index alongside an IncrementalPointCloud layer's points (TCreationOptions::serialize_kdtree), so it does not have to be rebuilt (an O(N log M) bulk build) on every load. Unlike KeyframePointCloudMap's baked static trees, nanoflann's incremental index had no save/load support at all; this depends on saveIndex()/loadIndex() added upstream (nanoflann >= 1.11.0, see the companion nanoflann PR), gated behind MOLA_METRIC_MAPS_HAS_INCREMENTAL_KDTREE_BAKE so older builds keep working with the option as a documented no-op. Serialization always writes/reads the compacted (tombstone-free) point order, so baking builds a throwaway index over that exact order rather than reusing the live index (whose slots may not match after tombstones/slot recycling). Adds the mm-ipc-bake-kdtree CLI tool (analogous to mm-kf-bake-kdtrees) and a shared mm_cli_utils.h generic layer-iteration helper for it. Unit tests cover: bake/load round-trip through memory and through a real temporary file, k-d tree parameters differing between bake and load time, clearing and re-inserting into a loaded (baked) map, further insertions/trims on a loaded map, and serialize_kdtree=false remaining a no-op -- all independent of whether this build's nanoflann actually supports baking.

  • changelog

  • chore: document and fix some multithreading issues

  • Merge pull request #185 from MOLAorg/chore/remove-keyframe-map-capable Remove the KeyframeMapCapable interface

  • docs: drop the KeyframeMapCapable references left behind

  • chore: remove the KeyframeMapCapable interface This mixin was introduced to expose per-KF pose plumbing to mola_lidar_odometry's trajectory-rebake experiment, which corrected accumulated tilt by re-integrating the keyframe chain. That experiment is being removed: it was never wired in, and rotating map keyframes without transforming the trajectory consistently leaks vertical position. The interface had exactly one implementation and no callers, so it is removed along with the two methods that existed only for the rebake path, [oldestActiveKeyframeID()]{.title-ref} and [applyPivotTransform()]{.title-ref}. [keyframePoses()]{.title-ref} is kept, since the regroup tests already use it as ordinary map API, and the duplicate [cloneKFPoses()]{.title-ref} (whose only difference was not being the virtual one) is folded into it.

  • Merge pull request #184 from MOLAorg/feat/incremental-pointcloud-map feat(metric_maps): add mola::IncrementalPointCloud (incremental k-d tree local map)

  • docs: correct the trySetCreationOptions contract The k-d tree parameters used to require an empty map, with trySetCreationOptions() returning false rather than discarding points. It now compacts and rebuilds instead, so it always succeeds and keeps the map contents; only the previously returned point indices are invalidated. The TCreationOptions docs still described the old behaviour.

  • style: apply clang-format-14

  • feat(metric_maps): degrade gracefully on distros with an old nanoflann The incremental k-d tree index needs nanoflann >= 1.10.0.

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_metric_maps at Robotics Stack Exchange

No version for distro noetic showing humble. Known supported distros are highlighted in the buttons above.

Package Summary

Version 3.1.1
License GPLv3
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/MOLAorg/mola.git
VCS Type git
VCS Version develop
Last Updated 2026-08-10
Dev Status DEVELOPED
Released RELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Advanced metric map classes, using the generic `mrpt::maps::CMetricMap` interface, for use in other MOLA odometry and SLAM modules.

Additional Links

Maintainers

  • Jose-Luis Blanco-Claraco

Authors

No additional authors.

mola_metric_maps

Advanced metric map classes for LiDAR odometry and SLAM, built on the generic mrpt::maps::CMetricMap interface. All maps are serializable, visualizable, and integrate with the mp2p_icp registration library.


Map classes

Production-quality maps

Class Header Description
mola::HashedVoxelPointCloud HashedVoxelPointCloud.h Flat sparse hash map of cubic voxels. Up to 32 points per voxel stored without heap allocation (fixed array SSO). Backend: tsl::robin_map. Implements NearestNeighborsCapable.
mola::SparseVoxelPointCloud SparseVoxelPointCloud.h Two-level voxel map: sparse outer blocks + 32³ inner FixedDenseGrid3D. Tracks per-voxel point means; supports voxel-mean ICP matching. Implements NearestNeighborsCapable. The primary workhorse map in MOLA LO/SLAM.
mola::NDT NDT.h Normal Distributions Transform map (Magnusson 2007). Fits a Gaussian per voxel; planar voxels expose NearestPlaneCapable, non-planar ones expose NearestNeighborsCapable. Enables automatic point-to-point vs. point-to-plane pairing selection.
mola::KeyframePointCloudMap KeyframePointCloudMap.h Keyframe-based map: each keyframe holds a local point cloud plus a SE(3) pose. Supports map corrections without re-inserting points (just update poses). Implements IcpPrepareCapable, NearestPointWithCovCapable, and MetricMapMergeCapable.

Experimental / work-in-progress maps

Class Header Status
mola::SparseTreesPointCloud SparseTreesPointCloud.h Coarse 3D grid of independent CSimplePointsMap sub-maps, each with its own KD-tree. Functionally complete but not benchmarked against the hash-based alternatives for typical SLAM workloads.
mola::OccGrid OccGrid.h Wraps mrpt::maps::COccupancyGridMap2D with a super-resolution likelihood cache. The cache infrastructure is in place but likelihood population is not yet implemented (// TODO). Not used in any production pipeline.

Utility / internal classes

Class Header Description
mola::index3d_t<T> index3d_t.h Discrete 3D integer index. Works as key in std::map and std::unordered_map / tsl::robin_map via the index3d_hash functor, which implements the Teschner et al. (2003) spatial hash.
mola::FixedDenseGrid3D<T,N,C> FixedDenseGrid3D.h Dense NxNxN grid (N=2^SIDE_NUM_BITS) allocated with calloc for fast zero-init. Used as the inner block in SparseVoxelPointCloud. Requires trivially-copyable cell types.

Build and install

Refer to the root MOLA repository.

License

Copyright (C) 2018-2026 Jose Luis Blanco jlblanco@ual.es, University of Almeria

This package is released under the GNU GPL v3 license as open source for research and evaluation purposes only. Commercial licenses available upon request, for this package alone or in combination with the complete SLAM system.

CHANGELOG

Changelog for package mola_metric_maps

3.1.1 (2026-08-10)

  • mola_metric_maps: fix calloc arg order and nodiscard warnings on newer GCC.
  • Give nn_search_cov2cov() a canonical pairing order. The parallel path merged per-thread correspondences in unspecified order, making ICP results non-deterministic run to run; now sorted by local_idx to match the sequential path.
  • IncrementalPointCloud: rebuild the k-d tree on a global SE(3) re-map. changeCoordinatesReference() rewrote coordinates in place without resizing, so the k-d tree kept stale split planes and nearest-neighbor queries silently returned wrong results. Fixes #186.
  • mola_metric_maps: depend on nanoflann_vendor instead of nanoflann, since the rosdep key otherwise resolves to the distro's older libnanoflann-dev.
  • fix(mola_metric_maps): don't require nanoflann>=1.5.1 for KeyframePointCloudMap covariances. Ubuntu jammy's older nanoflann made every use of mola::KeyframePointCloudMap throw on Humble; now falls back to a plain kNN truncated at the same radius, verified numerically equivalent.
  • Contributors: Jose Luis Blanco-Claraco

3.1.0 (2026-08-06)

  • Merge pull request #187 from MOLAorg/feat/incremental-point-cloud-kdtree-bake Bake IncrementalPointCloud's k-d tree index (mm-ipc-bake-kdtree)

  • address review comments

  • Add k-d tree baking for IncrementalPointCloud + mm-ipc-bake-kdtree tool Serializes the incremental k-d tree index alongside an IncrementalPointCloud layer's points (TCreationOptions::serialize_kdtree), so it does not have to be rebuilt (an O(N log M) bulk build) on every load. Unlike KeyframePointCloudMap's baked static trees, nanoflann's incremental index had no save/load support at all; this depends on saveIndex()/loadIndex() added upstream (nanoflann >= 1.11.0, see the companion nanoflann PR), gated behind MOLA_METRIC_MAPS_HAS_INCREMENTAL_KDTREE_BAKE so older builds keep working with the option as a documented no-op. Serialization always writes/reads the compacted (tombstone-free) point order, so baking builds a throwaway index over that exact order rather than reusing the live index (whose slots may not match after tombstones/slot recycling). Adds the mm-ipc-bake-kdtree CLI tool (analogous to mm-kf-bake-kdtrees) and a shared mm_cli_utils.h generic layer-iteration helper for it. Unit tests cover: bake/load round-trip through memory and through a real temporary file, k-d tree parameters differing between bake and load time, clearing and re-inserting into a loaded (baked) map, further insertions/trims on a loaded map, and serialize_kdtree=false remaining a no-op -- all independent of whether this build's nanoflann actually supports baking.

  • changelog

  • chore: document and fix some multithreading issues

  • Merge pull request #185 from MOLAorg/chore/remove-keyframe-map-capable Remove the KeyframeMapCapable interface

  • docs: drop the KeyframeMapCapable references left behind

  • chore: remove the KeyframeMapCapable interface This mixin was introduced to expose per-KF pose plumbing to mola_lidar_odometry's trajectory-rebake experiment, which corrected accumulated tilt by re-integrating the keyframe chain. That experiment is being removed: it was never wired in, and rotating map keyframes without transforming the trajectory consistently leaks vertical position. The interface had exactly one implementation and no callers, so it is removed along with the two methods that existed only for the rebake path, [oldestActiveKeyframeID()]{.title-ref} and [applyPivotTransform()]{.title-ref}. [keyframePoses()]{.title-ref} is kept, since the regroup tests already use it as ordinary map API, and the duplicate [cloneKFPoses()]{.title-ref} (whose only difference was not being the virtual one) is folded into it.

  • Merge pull request #184 from MOLAorg/feat/incremental-pointcloud-map feat(metric_maps): add mola::IncrementalPointCloud (incremental k-d tree local map)

  • docs: correct the trySetCreationOptions contract The k-d tree parameters used to require an empty map, with trySetCreationOptions() returning false rather than discarding points. It now compacts and rebuilds instead, so it always succeeds and keeps the map contents; only the previously returned point indices are invalidated. The TCreationOptions docs still described the old behaviour.

  • style: apply clang-format-14

  • feat(metric_maps): degrade gracefully on distros with an old nanoflann The incremental k-d tree index needs nanoflann >= 1.10.0.

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged mola_metric_maps at Robotics Stack Exchange