Skip to content

Add GoToZone task-sequence event#136

Open
chart-singapore wants to merge 1 commit into
open-rmf:mainfrom
chart-sg:feat/post_arrival_goal
Open

Add GoToZone task-sequence event#136
chart-singapore wants to merge 1 commit into
open-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 GoToZone to rmf_task_sequence::events — a task-level description that constructs a GoToPlace activity model over all zone internal vertices, wrapped in a ZoneGuardModel for bidding protection (prevent bidding from the robot already in the target zone). This is the task-planner-side entry point for zone tasks.

Implementation description

GoToZone::Description

Factory: GoToZone::Description::make(zone_name, modifiers), where modifiers is std::optional<Modifiers> (default std::nullopt). The Modifiers struct carries group_hint, orientation_hint, and preferred_waypoints.

  • make_model() — looks up the zone via Graph::find_known_zone, collects waypoint indices for every internal vertex resolvable via graph.find_waypoint(name), builds a GoToPlace::Description::make_for_one_of(goals) activity model, and wraps it in ZoneGuardModel. Returns nullptr if the zone is unknown, if every internal-vertex name fails to resolve to a waypoint, or if the inner GoToPlace model fails to build.
  • generate_header() — produces the task header (category, description, duration).

ZoneGuardModel

Wraps an inner Activity::ConstModelPtr, purpose is to override estimate_finish(). For each candidate robot: if the robot's current waypoint is already one of the zone's internal-vertex waypoints, returns std::nullopt (purpose: excluding that robot from bidding on this zone task while keeping it available for every other task type).

This guard works at the estimate_finish level (per-robot) rather than at make_model (per-task) because the per-candidate robot state is only available on each estimate_finish call.

GenAI Use

We follow OSRA's policy on GenAI tools

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

Signed-off-by: kjchee <keai_jiang_chee@cgh.com.sg>
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.

3 participants