Skip to content

[Refactor] Migrate grid_map_core → nanoGrid - #16

Merged
Ikhyeon-Cho merged 3 commits into
mainfrom
refactor/nanogrid-migration
Mar 2, 2026
Merged

[Refactor] Migrate grid_map_core → nanoGrid#16
Ikhyeon-Cho merged 3 commits into
mainfrom
refactor/nanogrid-migration

Conversation

@Ikhyeon-Cho

@Ikhyeon-Cho Ikhyeon-Cho commented Mar 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace vendored grid_map_core with nanoGrid via FetchContent
  • Establish nanoGrid as shared vocabulary type (FastDEM, FastTrav, FastPlan as independent peers)
  • Replace MapIndexer with nanoGrid cells()/region()/neighbors() API

Changes

Build:

  • FetchContent(nanoGrid) replaces add_subdirectory(lib/grid_map_core)
  • cmake_minimum_required bumped to 3.14

Core:

  • Namespace: grid_map::nanogrid::
  • ElevationMap inherits nanogrid::GridMap
  • MapIndexer removed — use map.cells() + map.neighbors(cell, region) instead
  • CellMap<T> moved to fastdem namespace
  • grid_index_hash.hpp deleted (nanoGrid provides IndexHash)

Iteration migration (6 files):

File Pattern
feature_extraction.cpp cells() + region(radius) + neighbors()
uncertainty_fusion.cpp cells() + neighbors() + n.dist_sq
inpainting.cpp cells() + region(Size) + neighbors()
spatial_smoothing.hpp cells() + region(Size) + neighbors()
pcd_convert.cpp cells() + logical coord position
impl_visualization.hpp cells() + stride filter

Deleted:

  • lib/grid_map_core/ (~10k lines)
  • benchmark_postprocess_iteration.cpp (comparison target removed)

Test plan

  • 23/23 local tests pass
  • CI build (GitHub Actions)

Replace vendored grid_map_core with nanoGrid as external FetchContent
dependency. This establishes nanoGrid as the shared vocabulary type
for GridMap, enabling FastDEM, FastTrav, and FastPlan to be
independent peers.

BREAKING CHANGE: namespace grid_map:: → nanogrid::

Build:
- FetchContent(nanoGrid) replaces add_subdirectory(lib/grid_map_core)
- cmake_minimum_required bumped to 3.14

API:
- ElevationMap inherits nanogrid::GridMap (was grid_map::GridMap)
- MapIndexer removed — replaced by nanoGrid cells()/neighbors()
- CellMap alias moved from nanoGrid to fastdem namespace
- grid_index_hash.hpp deleted (nanoGrid provides IndexHash)

Iteration pattern migration (6 production files):
- feature_extraction: cells() + region(radius) + neighbors()
- uncertainty_fusion: cells() + neighbors() + n.dist_sq
- inpainting: cells() + region(Size) + neighbors()
- spatial_smoothing: cells() + region(Size) + neighbors()
- pcd_convert: cells() + logical coord position
- impl_visualization: cells() + stride filter

Deleted:
- lib/grid_map_core/ (vendored, ~10k lines)
- benchmark_postprocess_iteration.cpp (comparison target removed)

23/23 tests pass.
FetchContent requires git to clone nanoGrid.
@Ikhyeon-Cho
Ikhyeon-Cho merged commit f86ebae into main Mar 2, 2026
6 checks passed
@Ikhyeon-Cho
Ikhyeon-Cho deleted the refactor/nanogrid-migration branch March 2, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant