Skip to content

Add zone properties and zone lane events for GoToZone feature#133

Open
chart-singapore wants to merge 2 commits intoopen-rmf:mainfrom
chart-sg:feat/post_arrival_goal
Open

Add zone properties and zone lane events for GoToZone feature#133
chart-singapore wants to merge 2 commits intoopen-rmf:mainfrom
chart-sg:feat/post_arrival_goal

Conversation

@chart-singapore
Copy link
Copy Markdown

New feature implementation

Implemented feature

This is part of an 8-repo Simple GoToZone feature. Tracked in Stage A of open-rmf/rmf#726.

Adds zone concepts to rmf_traffic::agv::Graph: named zones with geometry, internal vertices (carrying priority and group metadata), and transition lanes bridging internal vertices to external waypoints. Adds Lane::ZoneEntry/Lane::ZoneExit events, to be attached as entry_event or exit_event on a lane that enters or exits a zone, and consumed by ExecutePlan.cpp when populating the phases.

Implementation description

What's added

Graph-layer zone data

Three new classes under Graph::ZoneProperties add a zone concept to the graph:

  • Graph::ZoneProperties — a named zone on a specific map (level), with geometry, a type label, internal vertices, and transition lanes.
  • ZoneProperties::InternalVertex — an internal waypoint of a zone, carrying a name, position, group, and priority.
  • ZoneProperties::TransitionLane — a lane bridging an internal vertex to an external waypoint, with is_entry_lane / is_exit_lane flags.

Top-level Graph accessors: find_known_zone(name) and all_known_zones().

Lane events

Lane::ZoneEntry(zone_name, duration) and Lane::ZoneExit(zone_name, duration) — new lane event types (both inherit from a shared ZoneSession base). Attached to nav-graph lanes as entry_event or exit_event.

GenAI Use

We follow OSRA's policy on GenAI tools

  • I used a GenAI tool in this PR.
  • I did not use GenAI

Co-authored-by: Tey Leong Teck <leong_teck_tey@cgh.com.sg>
Signed-off-by: Tey Leong Teck <leong_teck_tey@cgh.com.sg>
Signed-off-by: Loke Ji Xian <loke_ji_xian@cgh.com.sg>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

❌ Patch coverage is 0% with 118 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.56%. Comparing base (d5de7f3) to head (47754ad).

Files with missing lines Patch % Lines
rmf_traffic/src/rmf_traffic/agv/Graph.cpp 0.00% 107 Missing ⚠️
rmf_traffic/include/rmf_traffic/agv/Graph.hpp 0.00% 5 Missing ⚠️
rmf_traffic/test/unit/agv/test_Planner.cpp 0.00% 4 Missing ⚠️
..._traffic/agv/planning/DifferentialDrivePlanner.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #133      +/-   ##
==========================================
- Coverage   21.63%   21.56%   -0.08%     
==========================================
  Files         361      361              
  Lines       30466    30584     +118     
  Branches    14292    14312      +20     
==========================================
+ Hits         6592     6594       +2     
- Misses      14319    14436     +117     
+ Partials     9555     9554       -1     
Flag Coverage Δ
tests 21.56% <0.00%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
..._traffic/agv/planning/DifferentialDrivePlanner.cpp 39.16% <0.00%> (-0.09%) ⬇️
rmf_traffic/test/unit/agv/test_Planner.cpp 12.86% <0.00%> (-0.03%) ⬇️
rmf_traffic/include/rmf_traffic/agv/Graph.hpp 0.00% <0.00%> (ø)
rmf_traffic/src/rmf_traffic/agv/Graph.cpp 33.05% <0.00%> (-9.54%) ⬇️

... and 1 file with indirect coverage changes

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

@mxgrey mxgrey moved this from Inbox to In Review in PMC Board Apr 21, 2026
Copy link
Copy Markdown
Member

@xiyuoh xiyuoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm getting started on setting these PRs up for testing, running into build failure (related to CI failing I believe).

template<typename... Args>
static ZoneProperties make(Args&& ... args)
{
ZoneProperties zone;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ZoneProperties doesn't have a default constructor so this line fails. Instead of updating its Implementation separately, you can parse args into ZoneProperties itself, since it will instantiate the pimpl upon construction.

Comment on lines +1273 to +1274
vertex_name, InternalVertex::Implementation::make(
vertex_name, Eigen::Vector2d(0, 0), "", 0));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

InternalVertex's _pimpl->priority is a size_t, needs to be explicitly cast otherwise the 0 passed in is considered int

Signed-off-by: Loke Ji Xian <loke_ji_xian@cgh.com.sg>
@jixiancgh
Copy link
Copy Markdown

Hi @xiyuoh , I have done a quick fix for both issues. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

4 participants