Skip to content

feat: add traffic rules to enable driving for areas#104

Merged
mitsudome-r merged 8 commits intoautowarefoundation:mainfrom
emmeyteja:feat/add-area-support-for-route-search-thru-lanelet-area-lanelet
Apr 17, 2026
Merged

feat: add traffic rules to enable driving for areas#104
mitsudome-r merged 8 commits intoautowarefoundation:mainfrom
emmeyteja:feat/add-area-support-for-route-search-thru-lanelet-area-lanelet

Conversation

@emmeyteja
Copy link
Copy Markdown
Contributor

@emmeyteja emmeyteja commented Mar 24, 2026

Description

  • Enables Lanelet2 routing / mission planning to consider paths that traverse lanelet → Area → lanelet by extending traffic rules so Areas can be treated as drivable where appropriate.
  • Adds RViz visualization for Lanelet2 area layer: filled polygon + outline markers (namespaces such as lanelet_routing_area / lanelet_routing_area_outline) so multipolygon Areas are easy to see on the map (14f99356).

How was this PR tested?

  • colcon build / colcon test for autoware_lanelet2_extension (and packages that depend on it).
  • Loaded a Lanelet2 map that includes Area relations and confirmed shortest path including areas is accepted when used together with matching autoware_core / route_handler changes (if this PR is paired with those).
  • RViz: subscribed to lanelet map markers and confirmed area fill + outline render as expected.

Notes for reviewers

  • Visualization changes are largely in visualization.cpp (e.g. areaOuterToPolygon3d, laneletAreasAsMarkerArray); traffic-rule changes should be reviewed for consistency with Lanelet2 RoutingGraph::shortestPathIncludingAreas and existing rule sets.

Related Links

Related PRs

Issues

Design Dcouments

Effects on system behavior

  • Routing: With a compatible route_handler / map, routes may include Area segments instead of failing when the only feasible connection is lanelet–area–lanelet.
  • Visualization: Maps with an area layer show filled + outlined area polygons in RViz (behavior for operators; default driving policy still depends on traffic rules + planner).

Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 24, 2026

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 26, 2026

Codecov Report

❌ Patch coverage is 35.63218% with 56 lines in your changes missing coverage. Please review.
✅ Project coverage is 19.11%. Comparing base (5a32788) to head (887a2d2).
⚠️ Report is 51 commits behind head on main.

Files with missing lines Patch % Lines
autoware_lanelet2_extension/lib/visualization.cpp 0.00% 32 Missing and 18 partials ⚠️
...lanelet2_extension/test/src/test_route_checker.cpp 87.09% 0 Missing and 4 partials ⚠️
...extension/traffic_rules/autoware_traffic_rules.hpp 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #104      +/-   ##
==========================================
+ Coverage   16.31%   19.11%   +2.79%     
==========================================
  Files          42       44       +2     
  Lines        3089     3594     +505     
  Branches     1397     2040     +643     
==========================================
+ Hits          504      687     +183     
+ Misses       2490     1904     -586     
- Partials       95     1003     +908     
Flag Coverage Δ
differential 18.94% <35.63%> (+2.20%) ⬆️
total ?

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@emmeyteja
Copy link
Copy Markdown
Contributor Author

@mitsudome-r @soblin Could you please review this PR?

Comment thread autoware_lanelet2_extension/lib/route_checker.cpp Outdated
@mitsudome-r
Copy link
Copy Markdown
Member

Also, please make sure to add tests for the functions that you add.

emmeyteja and others added 3 commits April 17, 2026 12:30
@emmeyteja
Copy link
Copy Markdown
Contributor Author

@mitsudome-r I added a boolean argument "allow_area" and added tests. Please confirm, if it looks good, I will enable squash-merge.

@mitsudome-r mitsudome-r merged commit 8421dfb into autowarefoundation:main Apr 17, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants