feat(phase-7): implement OpenUSD animation, trajectory player, and Omniverse Kit extension

This commit is contained in:
2026-10-21 12:45:17 +05:30
parent 4c4419a06c
commit 630855252b
23 changed files with 15180 additions and 64 deletions
+43 -7
View File
@@ -1,7 +1,7 @@
# Project Status: Warehouse Robot Fleet Digital Twin
**Last Updated**: October 21, 2026
**Current Phase**: **Phase 6: Analytics and Experiment Framework (COMPLETED)**
**Current Phase**: **Phase 7: Omniverse USD Visualization (COMPLETED)**
**Status**: Ready for User Review and Approval
---
@@ -16,13 +16,46 @@
| **Phase 3** | **Discrete-event simulation** | **COMPLETED** | **72 passed** |
| **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 (100%)** |
| Phase 7 | Omniverse USD visualization | Planned (Next) | - |
| Phase 8 | Operational dashboard | Planned | - |
| **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 | - |
---
## 2. Completed Tasks (Phase 7)
- [x] Implemented Continuous Spatial Interpolation & Playback Engine (`src/warehouse_twin/visualization/trajectory_player.py`):
- Linear Cartesian interpolation between simulation waypoints.
- Shortest-arc circular angular interpolation of heading angle (`yaw_degrees`) with $-180^\circ \leftrightarrow 180^\circ$ wrap-around handling.
- Continuous battery SoC interpolation and discrete payload cargo attachment.
- Complete playback state machine (`play`, `pause`, `toggle`, `reset`, `seek`, `advance`, `set_speed`) supporting $0.5\times$ to $50.0\times$ speeds.
- Safe subscriber callback registration and leak-free unregistration.
- Unit test suite: 4 passed in `tests/unit/test_trajectory_player.py`.
- [x] Implemented Time-Sampled OpenUSD Scene Generator (`src/warehouse_twin/visualization/animated_usd.py`):
- Direct export of time-sampled OpenUSD ASCII stages (`warehouse_phase7_animated.usda`).
- Native playback support via Omniverse Kit's timeline (`omni.timeline`) without extension dependencies.
- Time-sampled translation (`xformOp:translate.timeSamples`) and rotation (`xformOp:rotateXYZ.timeSamples`).
- Dynamic status dome color samples (`primvars:displayColor.timeSamples`) reflecting robot operational states.
- Dynamic battery LED bar color samples reflecting battery health.
- Dynamic payload carton box visibility samples (`visibility.timeSamples`).
- Unit test suite: 2 passed in `tests/unit/test_animated_usd.py`.
- [x] Implemented NVIDIA Omniverse Kit 110.4 Extension (`omniverse/extensions/omni.warehouse.twin.visualizer`):
- Native Kit extension (`omni.ext.IExt`) compatible with Kit 110.4.
- Interactive UI Window (`omni.ui.Window`): trajectory file loader, playback buttons, scrub slider, speed selectors, and live AMR fleet HUD table.
- Frame-by-frame stage prim transformation updates driven by Kit's update loop (`omni.kit.app.get_app().get_update_event_stream()`).
- Clean shutdown handler guaranteeing zero dangling update callbacks or lingering subscriptions.
- Symlinked directly into Kit release `exts/` directory for automatic discovery.
- Unit test suite: 2 passed in `tests/unit/test_kit_extension.py`.
- [x] CLI Subcommands Added & Enhanced (`src/warehouse_twin/cli.py`):
- `warehouse-twin export-usd --trajectory <path> --output <path>`: Generates time-sampled animated USD scenes.
- `warehouse-twin play-trajectory <path> --step <secs>`: Validates kinematics and previews fleet playback in terminal.
- Updated `validate-env` to detect host Kit at `/home/dmhai/Desktop/nvidia-omniverse/kit-app-template`.
- [x] Documentation & Changelog: Created `docs/phases/phase_7_omniverse_usd_visualization.md`, updated `CHANGELOG.md`, `README.md`, and `omniverse/README.md`.
- [x] Test Suite: Expanded to **137 passed unit tests (100% pass rate in 1.01s)**.
---
## 2. Completed Tasks (Phase 6)
- [x] Implemented Comprehensive KPI Calculator (`src/warehouse_twin/analytics/kpi_calculator.py`):
@@ -59,10 +92,10 @@
## 3. Test & Validation Summary
- **Total Unit Tests Executed**: 129
- **Passed**: 129
- **Total Unit Tests Executed**: 137
- **Passed**: 137
- **Failed**: 0
- **Execution Time**: ~0.99 seconds
- **Execution Time**: ~1.01 seconds
- **Test Suites**:
- `test_environment.py`: 5 passed
- `test_logging.py`: 3 passed
@@ -89,6 +122,9 @@
- `test_heatmap.py`: 4 passed
- `test_experiment_runner.py`: 4 passed
- `test_scenario_comparison.py`: 2 passed
- `test_trajectory_player.py`: 4 passed
- `test_animated_usd.py`: 2 passed
- `test_kit_extension.py`: 2 passed
---