Update warehouse digital twin and robot fleet optimization

This commit is contained in:
DnyaneshwariP13
2026-11-25 11:54:38 +05:30
parent e9c573ddc2
commit acab3a1f5b
367 changed files with 4411504 additions and 110561 deletions
+131 -6
View File
@@ -347,11 +347,136 @@ The demonstration runner automatically:
---
## 13. Project Status & Completion
---
## 13. Grid Design, Rack-Side Order Picking, Collision Avoidance & Charging Architecture
### A. Discrete Grid & Coordinate System Conventions
- **Coordinate System**: Right-handed Cartesian (`+X` = East / Length, `+Y` = North / Depth, `+Z` = Up / Height). Units: **meters**.
- **Continuous World to Discrete Grid Conversion**:
$$\text{col} = \left\lfloor \frac{x}{\text{cell\_size}} \right\rfloor, \quad \text{row} = \left\lfloor \frac{y}{\text{cell\_size}} \right\rfloor$$
$$x = \left(\text{col} + 0.5\right) \times \text{cell\_size}, \quad y = \left(\text{row} + 0.5\right) \times \text{cell\_size}$$
- **Cell Classification**: `FREE`, `RACK_FOOTPRINT` (impassable), `AISLE` (traversable), `PICKING_POSITION` (dedicated approach waypoint), `CHARGING_POSITION` (exclusive berth), `INTERSECTION`, `RESTRICTED`, `OBSTACLE`.
### B. Front-Facing Rack-Side Picking Points
Robots approach the designated front picking side of the rack and stop strictly outside the rack's physical collision footprint:
- **South-Facing Shelf**: Approach position $(x, y - (d/2 + c))$, approach yaw $= 90^\circ$ (facing North toward shelf face).
- **North-Facing Shelf**: Approach position $(x, y + (d/2 + c))$, approach yaw $= -90^\circ$ (facing South toward shelf face).
- **West-Facing Shelf**: Approach position $(x - (l/2 + c), y)$, approach yaw $= 0^\circ$ (facing East toward shelf face).
- **East-Facing Shelf**: Approach position $(x + (l/2 + c), y)$, approach yaw $= 180^\circ$ (facing West toward shelf face).
- **State Machine Lifecycle**:
$$\text{IDLE} \rightarrow \text{DISPATCHED} \rightarrow \text{NAVIGATING\_TO\_RACK} \rightarrow \text{ALIGNING} \rightarrow \text{PICKING} \rightarrow \text{PICK\_CONFIRMED} \rightarrow \text{MOVE\_AWAY} \rightarrow \text{LOADED\_TRANSIT} \rightarrow \text{DELIVERING} \rightarrow \text{COMPLETED}$$
- After picking completes, the AMR first transitions to the traversable aisle waypoint before initiating loaded transit, preventing any clipping through solid rack geometry.
### C. Procedural Multi-Row Warehouse Layout Generator & Validator
- Centralized configuration: `config/warehouse_layout_config.json`.
- `ModularWarehouseBuilder` procedurally generates parallel rack rows, bays per row, clear aisles, and cross-aisles.
- `LayoutValidator` generates an audit report (`LayoutValidationReport`) enforcing boundary limits, AABB footprint isolation, aisle width clearances, and topological reachability.
### D. Intelligent Charging-Station Placement Planner
- Replaces hard-coded cluster with a configurable 6-step spatial planner (`ChargingStationPlanner`).
- Places stations in dedicated, non-obstructive perimeter alcoves outside high-traffic corridors and intersections.
- Enforces single-berth capacity (`capacity = 1`) and dedicated approach spurs.
### E. Multi-Robot Collision Avoidance, Footprint Clearance & Deadlocks
- **Footprint-Aware Spatial Clearance**: `TimeSpaceReservationGrid` verifies that concurrently reserved waypoints satisfy $\text{dist}(P_a, P_b) \ge 2 \times R_{\text{footprint}}$ (e.g. $1.0\text{m}$ safe separation).
- **Temporal Reservations**: Detects head-on conflicts in narrow aisles, following distance/headway violations ($1.0\text{s}$ buffer), and intersection contention.
- **Deadlock Cycle Resolution**: `DeadlockManager` maintains a directed wait-for graph, detects circular dependency cycles, and resolves them immediately by commanding the deterministic victim robot to replan around contested edges.
### F. OpenUSD 3D Scene Generation
- Generates `omniverse/scenes/warehouse_realistic.usda` and animated `warehouse_realistic_animated.usda`.
- Dedicated `def Scope "PickingPoints"` containing `/World/Warehouse/PickingPoints/{loc_id}_Front` with visual approach markers and shelf metadata.
- Referenced 3D assets: `shelving_unit_light`, `pallet_rack_heavy`, `dock_inbound`, `outbound_dock`, `charging_station`, `amr_light`, and `amr_heavy`.
---
## 14. Project Status & Verification
**Status**: **ALL OBJECTIVES COMPLETED & VERIFIED**.
- **Test Suite**: **195 passed unit & integration tests (100% pass rate in 5.95s)**.
- **Layout Validation**: `ModularWarehouseBuilder` and `LayoutValidator` fully verified.
- **Collision Avoidance & Deadlocks**: Footprint clearances, headway enforcement, and wait-for cycle recovery tested and verified.
- **OpenUSD Scenes**: Ready for native inspection in NVIDIA Omniverse Kit (`omniverse/scenes/warehouse_realistic.usda`, `warehouse_realistic_animated.usda`, and `results/demo/*/warehouse.usda`).
---
## 15. Three-Stage NVIDIA Omniverse Digital Twin Demonstration
A flagship, reproducible, end-to-end demonstration workflow showing warehouse performance transformation across three distinct stages:
1. **Stage 1: Initial Baseline Facility**
- Centralized Northwest charging alcoves (`charge_bay_1` to `charge_bay_4` at $x \le 8.0, y=36.0$).
- Bidirectional highway corridors with shared central cross-arterials.
- Default catalog inventory allocation across 13 industrial racks.
- Baseline performance: $72.0\,\text{tasks/hr}$, 4 traffic conflict stalls, $9.51\,\text{s}$ yield delay.
2. **Stage 2: Systematic Multi-Candidate Optimization Search**
- Quantitative evaluation of 5 candidate warehouse configurations under identical workload (4 AMRs: 2 Light, 2 Heavy) and fixed random seed (42):
1. `Baseline Layout` (Benchmark starting point)
2. `Decentralized Charging` (Eliminates long empty travel to NW corner)
3. `Directional Highway Corridors` (Eliminates head-on yield waiting)
4. `Velocity-Based SKU Slotting` (Shortens transit distance for fast-moving items)
5. `Hybrid Optimal Facility` (Synergistic combination achieving peak throughput)
- Evaluates storage utilization ($100\%$ rack occupancy) and reallocates 9 high-frequency SKUs adjacent to outbound pack docks, reducing velocity-weighted pick distance by **16.8%**.
3. **Stage 3: Final Optimized Hybrid Facility**
- Decentralized charging infrastructure distributed across Zone A ($x=4, 8$), Zone B ($x=30$), and Zone C ($x=52$).
- Directional one-way highway circulation loop eliminating head-on contention stalls.
- Validated gains: $+16.7\%$ throughput ($84.0\,\text{tasks/hr}$), $-50.0\%$ traffic conflicts (2 events), $-47.3\%$ yield wait time ($5.01\,\text{s}$), and $-10.4\%$ energy intensity ($0.01\,\text{kWh/task}$). Overall Optimization Score: **89.1 / 100.0**.
### How to Run the Demonstration
```bash
# Run complete demonstration in quick mode (300s simulation per stage)
warehouse-twin run-staged-demo --quick
# Run production demonstration (1800s / 30min simulation per stage)
warehouse-twin run-staged-demo --duration 1800 --fps 30 --playback-speed 8.0
# Run a single stage independently (e.g. stage 3 only)
warehouse-twin run-staged-demo --stage 3 --quick
# Alternatively via run-demo
warehouse-twin run-demo --staged --quick
```
### Generated Artifacts & Inventory
- **OpenUSD Stages** (Ready for native Omniverse Kit loading):
- `results/demo/initial/warehouse.usda`
- `results/demo/optimizing/warehouse.usda`
- `results/demo/optimized/warehouse.usda`
- **Broadcast-Grade 1080p MP4 Videos** (H.264 High profile, 30fps):
- `results/demo/videos/01_initial.mp4` (or `01_baseline.mp4`)
- `results/demo/videos/02_optimizing.mp4` (or `02_optimization_progress.mp4`)
- `results/demo/videos/03_optimized.mp4` (or `03_final_optimized.mp4`)
- `results/demo/videos/warehouse_optimization_story.mp4` (Full Executive Trilogy)
- **Tabular Datasets & Reports**:
- `results/demonstration/staged_demo/stage_kpi_comparison.json`
- `results/demonstration/staged_demo/stage_kpi_comparison.csv`
- `results/demonstration/staged_demo/final_demo_report.md`
### Synchronized KPI Dashboard
Launch either the built-in HTTP server or the Streamlit analytics app:
```bash
# Start lightweight operational dashboard
warehouse-twin dashboard --port 8080
# Or start Streamlit app
streamlit run src/warehouse_twin/dashboard/streamlit_app.py
```
Navigate to the **🎬 3-Stage Demo & Videos** tab to switch between stages, control playback speed (0.5x, 1x, 8x, 16x), view synchronized telemetry scorecards with directional delta calculations, and review the candidate optimization matrix.
### Inspecting 3D Stages in NVIDIA Omniverse Kit
```bash
/home/dmhai/Desktop/nvidia-omniverse/kit-app-template/_build/linux-x86_64/release/warehouse_twin.kit.sh \
--ext-folder /home/dmhai/warehouse-digital-twin/omniverse/extensions \
--enable omni.warehouse.twin.visualizer
```
In Omniverse Kit, go to **File $\to$ Open** and load any generated stage (`results/demo_staged/usd/stage_01_baseline.usda`, `results/demo_staged/usd/stage_02_optimization_progress.usda`, or `results/demo_staged/usd/stage_03_final_optimized.usda`). Press **Space** on the timeline to watch the animated AMR fleet in real time.
**Status**: **ALL PHASES (0 THROUGH 9) COMPLETED**.
- **Test Suite**: 157 passed unit tests (100% pass rate in ~3.0s).
- **Documentation**: All architecture specifications, mathematical models, and phase completion guides located in `docs/phases/`.
- **Interactive Dashboard**: Running locally at `http://127.0.0.1:8501`.
- **Omniverse 3D Stages**: Ready for native inspection in `omniverse/scenes/`.