feat(phase2): implement AMR robot state machine, task lifecycles, inventory catalog, and Phase 2 OpenUSD scene

This commit is contained in:
2026-10-19 16:16:23 +05:30
parent 0427ab273d
commit 863eda87f5
21 changed files with 2206 additions and 74 deletions
+24
View File
@@ -5,6 +5,30 @@ All notable changes to the Warehouse Robot Fleet Digital Twin will be documented
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.3.0] - 2026-10-19
### Added - Phase 2: Robot and Task Models
- Domain entity models for Autonomous Mobile Robots (`warehouse_twin.domain.robot`):
- `RobotState` enum representing operational lifecycle states (`IDLE`, `DISPATCHED`, `PICKING`, `LOADED_TRANSIT`, `DROPPING`, `TRANSIT_TO_CHARGE`, `CHARGING`, `MAINTENANCE`).
- Strict transition lookup table `LEGAL_ROBOT_TRANSITIONS` preventing illegal state transitions with `InvalidStateTransitionError`.
- `RobotTypeSpec` parsing `config/robots.json` specifications for light and heavy AMRs.
- `Robot` model managing kinematics, battery capacity, linear energy consumption (idle, moving, loaded), fast-charging, active tasks, routes, and allowed zones.
- Pre-assignment validation `Robot.validate_task_compatibility(task)` enforcing payload capacity and zone restrictions (`IncompatibleRobotTaskError`).
- Domain models for warehouse tasks (`warehouse_twin.domain.task`):
- `TaskType` enum (`INBOUND_TRANSPORT`, `OUTBOUND_PICKING`, `PRODUCTION_FEED`, `REPLENISHMENT`, `CHARGING`).
- `TaskStatus` enum (`PENDING`, `ASSIGNED`, `IN_PROGRESS`, `COMPLETED`, `CANCELLED`, `FAILED`) enforced by `LEGAL_TASK_TRANSITIONS`.
- `Task` dataclass tracking creation time, assignment time, start/completion times, turnaround time, queue wait time, execution duration, and SLA deadline overdue checks.
- Inventory item and catalog models (`warehouse_twin.domain.inventory`):
- `InventoryItem` with available/reserved quantities, unit weight, reorder threshold, and restocking amounts.
- `InventoryCatalog` loading 13 SKUs from `config/inventory.json` with stock reservation, consumption, and replenishment trigger checks.
- Event telemetry models (`warehouse_twin.domain.events`):
- `SimulationEventType` and `SimulationEvent` dataclass with ISO8601 formatting and JSONL serialization.
- OpenUSD generator enhancements (`warehouse_twin.interfaces.usd_generator`):
- `WarehouseUSDGenerator.from_config_bundle` now renders the active AMR fleet with realistic geometry (pearl white for light AMRs, industrial amber for heavy AMRs, with illuminated status domes).
- Exported OpenUSD 3D stage `omniverse/scenes/warehouse_phase2.usda`.
- 30 new unit tests covering robot states, task lifecycles, inventory dynamics, telemetry events, and USD robot generation (56 total unit tests passing in 0.24s).
- Implementation report in `docs/phases/phase_2_robot_and_task_models.md`.
## [0.2.0] - 2026-10-19
### Added - Phase 1: Warehouse Model