feat(phase-8): implement operational web dashboard, rest api, and telemetry data provider
This commit is contained in:
+48
-11
@@ -1,7 +1,7 @@
|
||||
# Project Status: Warehouse Robot Fleet Digital Twin
|
||||
|
||||
**Last Updated**: October 21, 2026
|
||||
**Current Phase**: **Phase 7: Omniverse USD Visualization (COMPLETED)**
|
||||
**Current Phase**: **Phase 8: Operational Dashboard (COMPLETED)**
|
||||
**Status**: Ready for User Review and Approval
|
||||
|
||||
---
|
||||
@@ -17,13 +17,47 @@
|
||||
| **Phase 4** | **Routing and fleet assignment** | **COMPLETED** | **95 passed** |
|
||||
| **Phase 5** | **Charging and operational constraints** | **COMPLETED** | **110 passed** |
|
||||
| **Phase 6** | **Analytics and experiment framework** | **COMPLETED** | **129 passed** |
|
||||
| **Phase 7** | **Omniverse USD visualization** | **COMPLETED** | **137 passed (100%)** |
|
||||
| Phase 8 | Operational dashboard | Planned (Next) | - |
|
||||
| Phase 9 | Optimization and final demonstration | Planned | - |
|
||||
| **Phase 7** | **Omniverse USD visualization** | **COMPLETED** | **137 passed** |
|
||||
| **Phase 8** | **Operational dashboard** | **COMPLETED** | **144 passed (100%)** |
|
||||
| Phase 9 | Optimization and final demonstration | Planned (Next) | - |
|
||||
|
||||
---
|
||||
|
||||
## 2. Completed Tasks (Phase 7)
|
||||
## 2. Completed Tasks (Phase 8)
|
||||
|
||||
- [x] Implemented Dashboard Telemetry & Data Provider (`src/warehouse_twin/dashboard/data_provider.py`):
|
||||
- Strictly read-only file scanner scanning `results/experiments/` and `results/reports/`.
|
||||
- Typed parsing of `kpi_summary.json`, `config.json`, `robots.csv`, `tasks.csv`, and `aisle_congestion.csv`.
|
||||
- Dynamic Markdown scenario comparison table parser (`fleet_size_comparison.md`, `dispatch_policy_comparison.md`).
|
||||
- Raw SVG vector extractor for spatial congestion heatmaps (`congestion_heatmap.svg`).
|
||||
- Unit test suite: 3 passed in `tests/unit/test_dashboard_data_provider.py`.
|
||||
- [x] Implemented Multi-Threaded HTTP Server & REST API (`src/warehouse_twin/dashboard/server.py`):
|
||||
- Zero-external-dependency web server built on standard library `http.server.ThreadingHTTPServer`.
|
||||
- REST API endpoints:
|
||||
- `GET /api/health`: Health status & version check.
|
||||
- `GET /api/experiments`: Enumerates simulation runs with high-level KPI previews.
|
||||
- `GET /api/experiments/<id>`: Full experiment payload (config, KPIs, robot states, task distributions, bottlenecks).
|
||||
- `GET /api/experiments/<id>/heatmap.svg`: Scalable vector congestion heatmap (`image/svg+xml`).
|
||||
- `GET /api/experiments/<id>/report`: Raw markdown simulation report text.
|
||||
- `GET /api/scenarios`: Multi-parameter scenario comparison tables (fleet sizing & dispatch heuristics).
|
||||
- Production-grade HTTP headers: CORS (`Access-Control-Allow-Origin: *`), cache control, error handling (404/500 JSON payloads).
|
||||
- Unit test suite: 2 passed in `tests/unit/test_dashboard_server.py`.
|
||||
- [x] Built Interactive Single-Page Application (`src/warehouse_twin/dashboard/static/`):
|
||||
- `index.html`: Semantic layout with navigation bar, live polling status pill, tab controls, KPI card grid, AMR fleet table, congestion visualizer, scenario comparison matrix, and full report markdown viewer.
|
||||
- `app.css`: Custom Vanilla CSS dark-mode glassmorphic theme (`Inter`, `JetBrains Mono`, gradient accents, glowing indicators, responsive flex/grid layouts, state badge pills).
|
||||
- `app.js`: Reactive SPA controller with dynamic run switching, 5-second automatic telemetry polling, interactive SVG embedding, battery gauge indicators, and report download support.
|
||||
- [x] Optional Streamlit Web Interface (`src/warehouse_twin/dashboard/streamlit_app.py`):
|
||||
- Alternate Streamlit dashboard guarded by lazy import checks (`try ... except ImportError`).
|
||||
- Runs cleanly if Streamlit is installed; fails gracefully with install instructions if not.
|
||||
- Unit test suite: 2 passed in `tests/unit/test_optional_dependencies.py`.
|
||||
- [x] CLI Subcommand Added (`src/warehouse_twin/cli.py`):
|
||||
- `warehouse-twin dashboard [--host HOST] [--port PORT] [--results-dir DIR]`: One-command dashboard server launch.
|
||||
- [x] Documentation & Changelog: Created `docs/phases/phase_8_operational_dashboard.md`, updated `CHANGELOG.md`, `README.md`, and `PROJECT_STATUS.md`.
|
||||
- [x] Test Suite: Expanded to **144 passed unit tests (100% pass rate in 2.49s)**.
|
||||
|
||||
---
|
||||
|
||||
## 3. Completed Tasks (Phase 7)
|
||||
|
||||
- [x] Implemented Continuous Spatial Interpolation & Playback Engine (`src/warehouse_twin/visualization/trajectory_player.py`):
|
||||
- Linear Cartesian interpolation between simulation waypoints.
|
||||
@@ -56,7 +90,7 @@
|
||||
|
||||
---
|
||||
|
||||
## 2. Completed Tasks (Phase 6)
|
||||
## 4. Completed Tasks (Phase 6)
|
||||
|
||||
- [x] Implemented Comprehensive KPI Calculator (`src/warehouse_twin/analytics/kpi_calculator.py`):
|
||||
- Linear rank-interpolated percentile calculation ($p_{50}$, $p_{90}$, $p_{95}$, $p_{99}$) and `DistributionStats` computation.
|
||||
@@ -90,12 +124,12 @@
|
||||
|
||||
---
|
||||
|
||||
## 3. Test & Validation Summary
|
||||
## 5. Test & Validation Summary
|
||||
|
||||
- **Total Unit Tests Executed**: 137
|
||||
- **Passed**: 137
|
||||
- **Total Unit Tests Executed**: 144
|
||||
- **Passed**: 144
|
||||
- **Failed**: 0
|
||||
- **Execution Time**: ~1.01 seconds
|
||||
- **Execution Time**: ~2.49 seconds
|
||||
- **Test Suites**:
|
||||
- `test_environment.py`: 5 passed
|
||||
- `test_logging.py`: 3 passed
|
||||
@@ -125,10 +159,13 @@
|
||||
- `test_trajectory_player.py`: 4 passed
|
||||
- `test_animated_usd.py`: 2 passed
|
||||
- `test_kit_extension.py`: 2 passed
|
||||
- `test_dashboard_data_provider.py`: 3 passed
|
||||
- `test_dashboard_server.py`: 2 passed
|
||||
- `test_optional_dependencies.py`: 2 passed
|
||||
|
||||
---
|
||||
|
||||
## 4. Benchmark Performance (Baseline 1-Hour Run vs. Fleet Sweep)
|
||||
## 6. Benchmark Performance (Baseline 1-Hour Run vs. Fleet Sweep)
|
||||
|
||||
### Baseline 1-Hour Run (4 AMRs, Seed 42)
|
||||
- **Simulated Duration**: 3,600.0s (1.00 hour)
|
||||
|
||||
Reference in New Issue
Block a user