feat: add autoware_lanelet2_map_divider package#409
Conversation
|
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
There was a problem hiding this comment.
Pull request overview
Adds a new autoware_lanelet2_map_divider ROS 2 package to split a single Lanelet2 .osm into grid-aligned per-cell map files and emit lanelet2_map_metadata.yaml compatible with lanelet2_map_loader’s selected-map-loading mode.
Changes:
- Introduces
Lanelet2MapDividerlibrary andLanelet2MapDividerNodecomponent/executable for dividing and exporting per-cell.osmtiles + metadata. - Adds launch/config/schema + README documenting usage and output format.
- Adds a gtest suite that builds a synthetic map, runs the divider, and validates output tiles/metadata.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| map/autoware_lanelet2_map_divider/src/lanelet2_map_divider.cpp | Core map loading, grid partitioning, tile writing, and metadata generation |
| map/autoware_lanelet2_map_divider/src/lanelet2_map_divider.hpp | Public API for configuring/running the divider |
| map/autoware_lanelet2_map_divider/src/lanelet2_map_divider_node.cpp | ROS 2 node wrapper to run divider from parameters |
| map/autoware_lanelet2_map_divider/src/lanelet2_map_divider_node.hpp | Node declaration |
| map/autoware_lanelet2_map_divider/src/local_projector.hpp | Local projector helper for projector_type: Local |
| map/autoware_lanelet2_map_divider/test/test_lanelet2_map_divider.cpp | gtest coverage for tiling + metadata behaviors |
| map/autoware_lanelet2_map_divider/launch/lanelet2_map_divider.launch.xml | Launch entrypoint with args and parameter wiring |
| map/autoware_lanelet2_map_divider/config/lanelet2_map_divider.param.yaml | Default parameter file used by launch |
| map/autoware_lanelet2_map_divider/schema/lanelet2_map_divider.schema.json | Parameter schema for documentation/validation |
| map/autoware_lanelet2_map_divider/README.md | User-facing documentation and format description |
| map/autoware_lanelet2_map_divider/CMakeLists.txt | Build/test targets and component registration |
| map/autoware_lanelet2_map_divider/package.xml | Package dependencies and metadata |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp>
Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp>
Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp>
Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp>
Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp>
Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp>
Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp>
Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp>
Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp>
6196556 to
8e2fca5
Compare
Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #409 +/- ##
========================================
+ Coverage 7.02% 7.26% +0.23%
========================================
Files 497 501 +4
Lines 32735 32863 +128
Branches 3736 3819 +83
========================================
+ Hits 2301 2386 +85
- Misses 29079 29083 +4
- Partials 1355 1394 +39
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
This is part of autowarefoundation/autoware_core#887
Add a new
autoware_lanelet2_map_dividerpackage that splits a single Lanelet2 (.osm) map into grid-aligned segments and emits a metadata file compatible withlanelet2_map_loader's selected-map-loading mode.autoware_lanelet2_map_divider_nodewith a launch filemap_projector_info.yaml(MGRS,LocalCartesianUTM,LocalCartesian,TransverseMercator, andLocalsupported), computes the axis-aligned bounding box of all points, and querieslaneletLayer,areaLayer,lineStringLayer, andpointLayerper cell to build per-cellLaneletMaps.<prefix>_<gx>_<gy>.osmfile per non-empty cell under<OUTPUT_DIR>/lanelet2_map.osm/with the same projector used at load time, pluslanelet2_map_metadata.yaml(x_resolution,y_resolution, andfile: [min_x, min_y]entries).test_lanelet2_map_divider).How was this PR tested?
colcon build --packages-select autoware_lanelet2_map_divider.test_lanelet2_map_divider) viacolcon test.lanelet2_map.osm, inspecting the generatedlanelet2_map.osm/<gx>_<gy>.osmfiles andlanelet2_map_metadata.yaml, and confirminglanelet2_map_loadercan consume the output in selected-map-loading mode.Notes for reviewers
None.
Effects on system behavior
None.