Imported from robotics-team-1213/rosy-platform (
operations/fleet/fleet/localization/AGENTS.md). Install upstream withnpx skills add robotics-team-1213/rosy-platform --skill localization. Copyright stays with the author.
localization
Parent context: ../AGENTS.md
Updated: 2026-10-14
Purpose
D-395 Fleet localization arbiter. Scores each robot's pose candidates with bounded cues and decides only when one leads the next by a margin held for 2 s. Pure: no transport, no asyncio, no robot calls. The service loop that feeds it and sends decisions belongs to server/ (Phase 2).
Key Files
| File | Description |
|---|---|
__init__.py |
Package marker |
cues.py |
Bounded cues per hypothesis: peers, slot (10 cm / 20 deg, either way along the axis), last good pose (never after a pickup), overhead sighting (≤ 300 ms), reference square |
arbiter.py |
Weights, Context, score(), Arbiter.observe() → LocalizationDecision |
| (not in this folder) | MapPose lives in rosy.world.state.projections.map_pose. Import it directly (D-752). This folder does not re-export it. Fleet service, transaction, and admission stay in server/ |
lane_compliance.py |
D-511 2: signed lateral offset (left +), body margin `width_m/2 − ( |
For AI Agents
Working In This Directory
- Keep it pure:
test_boundaries.pyforbids httpx, websockets, rclpy, asyncio, fastapi,fleet.swarmandfleet.serverhere. - A missing input is a 0 cue, never a guess; the arbiter must work with no camera and no peers.
last_goodandoverheadweigh less than the margin on purpose: neither may decide alone (D-395 §7).
Testing Requirements
python -m pytest operations/fleet/test/test_localization_cues.py operations/fleet/test/test_localization_arbiter.py operations/fleet/test/test_boundaries.py -q
Dependencies
Internal
core_common.protocol.localization(CandidateReport,LocalizationDecision)
External
None.
