Add goto <zone> and optional zone footprints ("go to the kitchen")#46
Open
MJohnson459 wants to merge 1 commit into
Open
Add goto <zone> and optional zone footprints ("go to the kitchen")#46MJohnson459 wants to merge 1 commit into
goto <zone> and optional zone footprints ("go to the kitchen")#46MJohnson459 wants to merge 1 commit into
Conversation
Adds place-based navigation ("go to the kitchen") to the task layer. Rather
than a separate "region" concept, this treats a named place as one thing — a
**zone** — since a zone and a region are both just a named pose you navigate
to. A zone is a pose (a fetch waypoint or a `goto <zone>` target) that MAY
carry an optional area **footprint**, which turns it into a room and answers
"am I inside it". `goto` and `fetch` resolve names against the one zones table.
- mote_tasks/zones.py: load_zones returns {name: Zone(name, pose, footprint)}.
The footprint is a Circle (`radius`) today, chosen in _footprint() with a
clear seam for a Polygon once map room-detection can emit one; containing()
is the "which zone am I in" membership query. append_zone/save_zone gain an
optional --radius.
- mote_tasks/trees/goto.py + trees/common.py (shared WaitForTask + task key):
task_server hosts both the fetch and goto trees and dispatches on the command
word (fetch/goto; unknown rejected), publishing accepted/succeeded/failed.
- Sites: zones (with optional footprints) still live in the floor's zones.yaml,
resolved via sites.py; `site info` shows "N zones, M with a footprint".
- Sim worlds gain a few room zones (mote/office by hand, hospital via
gen_hospital.py — regenerated, SDF byte-identical, single zone-clearance
check). Default fallback zones config mirrors mote_world so goto works out of
the box.
- Tests: test_goto_command + test_goto_tree (mock-nav goto tick and dispatch);
test_zones covers footprints and containing(). Docs: CLAUDE.md + mote_tasks
README.
Verified: pixi run lint / build / test (97 tests) and sim-test all green;
`goto kitchen` drives the robot to the room and reports succeeded in headless
sim on office_world and mote_world. Polygon footprints and auto-segmenting a
map into room zones are tracked follow-ups.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SGJYBaS79BFJdnxf2uyCnS
MJohnson459
force-pushed
the
worktree-feat+named-regions
branch
from
July 23, 2026 22:33
ea58047 to
f22be48
Compare
goto <zone> and optional zone footprints ("go to the kitchen")
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds place-based navigation —
goto <zone>("go to the kitchen") — to the task layer.One concept: a "zone"
Review feedback on the first cut was that zones and regions were two names for the same thing — a named pose you navigate to — and that a
zones.yamlholding both was confusing. So this collapses them into a single concept:fetch(itspickup/dropoffwaypoints) andgoto <zone>both resolve names against the onezones:table —goto kitchen,goto home, any zone works.radiuscircle) that turns it into a room and answers "am I inside it?" (zones.containing()). The footprint is optional metadata on the single concept — not a second type — so there's one YAML section, one loader, one teach command.The footprint is deliberately extensible:
Zone.footprintis selected in one place (_footprint()), so apolygon:(explicit vertices, e.g. from map room-detection) slots into the same seam later — see follow-ups below.Changes
mote_tasks/zones.py—load_zones→{name: Zone(name, pose, footprint)};Circlefootprint with a clear seam for a futurePolygon;containing()membership query (nearest-pose first);append_zone/save_zonegain an optional--radius.trees/goto.py+trees/common.py(sharedWaitForTask+ thetaskblackboard key).task_serverhosts both the fetch and goto trees and dispatches on the command's first word (fetch/goto; unknown rejected), publishingaccepted/succeeded/failedontask/status.zones.yaml, resolved viasites.py;site infoshowsN zones, M with a footprint.mote_world/office_worldby hand;hospital_worldviagen_hospital.py, regenerated — SDF byte-identical, single zone-clearance assertion). The default fallbackzones.default.yamlmirrorsmote_worldsogoto kitchenworks out of the box.mote_tasks/README.mdrewritten around the single concept.Testing
pixi run lint,pixi run build,pixi run test(97 tests, 0 failures),pixi run sim-test— all green.test_goto_command(parser),test_goto_tree(full goto tick + dispatch against a mocknavigate_to_pose), andtest_zonesextended to cover footprints andcontaining().goto kitchendrove the robot to the room and reportedsucceeded: goto kitchenon two worlds —office_world.sdfandmote_world.sdf.Follow-ups (out of scope here)
🤖 Generated with Claude Code