15 KiB
Warehouse Robot Fleet Digital Twin
A modular, scalable discrete-event simulation and digital twin for Autonomous Mobile Robot (AMR) warehouse operations, featuring multi-zone inventory logistics, traffic congestion management, opportunity charging, and 3D visualization via NVIDIA Omniverse and OpenUSD.
1. Project Overview & Objectives
In modern automated distribution and manufacturing hubs, coordinating heterogeneous AMR fleets across mixed inventory velocities is a primary operational challenge. This project models, simulates, and optimizes fleet performance across three distinct operational zones:
- Zone A (Fast-moving inventory): Frequent order arrivals, high-speed agile robots, short transit paths, and peak-demand prioritization (Filters, Belts, Fasteners, Fluid Lines, Tractor Panels).
- Zone B (Slow-moving & specialized inventory): Heavy-duty parts, payload constraints, wider aisle requirements, and extended handling times (Combine Transmissions, Structural Frames, Engine Pistons).
- Zone C (Raw materials & production-line supply): Scheduled material feeds, production deadlines, stock-out tracking, and priority line delivery (Steel Coils, Control Modules, Coating Drums).
The system decouples discrete-event simulation from 3D visualization, enabling deterministic headless simulation and KPI benchmarking, while supporting OpenUSD trajectory visualization in NVIDIA Omniverse Kit.
2. Architecture Overview
+-----------------------------------------------------------------------------------+
| CONFIG & SPECIFICATION LAYER |
| config/warehouse.json config/robots.json |
| config/inventory.json config/simulation.json |
| config/dispatch_policies.json |
+-----------------------------------------------------------------------------------+
|
v
+-----------------------------------------------------------------------------------+
| SIMULATION ENGINE (Headless & Deterministic) |
| - SimPy Discrete-Event Scheduler - Multi-Zone Order Generator |
| - NetworkX Graph & Path Planning - Dynamic Time-Space Traffic Resv. |
| - Pluggable Fleet Dispatching - Battery State & Opportunity Charging |
+-----------------------------------------------------------------------------------+
|
v
+-----------------------------------------------------------------------------------+
| OUTPUTS & STORAGE |
| logs/simulation.log results/trajectories/ results/experiments/ |
+-----------------------------------------------------------------------------------+
| |
v v
+-----------------------------------------+ +-------------------------------------+
| NVIDIA OMNIVERSE VISUALIZATION | | ANALYTICS & METRICS |
| Kit 110.4 + OpenUSD Scene Playback | | Throughput, Fleet Utilization, |
| Lightweight Robot Prims & Indicators | | Aisle Congestion & Latency KPIs |
+-----------------------------------------+ +-------------------------------------+
3. Features Implemented & Roadmap
Currently Implemented (Phases 0, 1, 2, 3 & 4)
- Host environment and Omniverse Kit template inspection.
- Decoupled project structure adhering to modular standards.
- Standard Python packaging (
pyproject.toml) and editable install. - Multi-target rotating file logging (
application.log,simulation.log,errors.log). - Robust configuration loader and schema validator for all 5 domains.
- Automated environment verification script (
scripts/check_environment.sh). - CLI entry point with
validate-env,validate-config,validate-graph,export-graph,export-usd, andrun-sim. - Warehouse domain models (
Position3D,WarehouseDimensions,ZoneArea,Station,StorageLocation,WarehouseModel). - Topological navigation graph builder (
WarehouseGraphBuilder) with wider aisles (4.0\text{m}) in slow-moving Zone B. - Operational stations, charging bays, and storage racks mapped to geometric grid nodes.
- Movement constraints: Zone B aisles restricted exclusively to
heavy_amr. - Strong connectivity and multi-class robot reachability validation.
- Topological graph JSON export (
results/reports/warehouse_graph.json). - Autonomous Mobile Robot (AMR) domain models (
Robot,RobotState,RobotTypeSpec,LEGAL_ROBOT_TRANSITIONS). - Task domain models (
Task,TaskType,TaskPriority,TaskStatus,LEGAL_TASK_TRANSITIONS, turnaround, execution, SLA deadline tracking). - Inventory domain models (
InventoryItem,InventoryCatalogwith 13 SKUs, stock reservation, consumption, replenishment triggers). - Event telemetry streaming models (
SimulationEvent,SimulationEventType, JSONL formatting). - OpenUSD 3D scene export with AMR fleet entities positioned at charging bays (
omniverse/scenes/warehouse_phase2.usda). - SimPy discrete-event simulation engine (
SimulationEnvironment, master clock execution). - Stochastic and scheduled multi-zone order generator (
OrderGenerator, Poisson Zone A, wide-aisle Gaussian Zone B, scheduled Zone C, replenishment). - Priority-based fleet dispatcher (
FleetDispatcher, shortest-path distance scoring, capability filtering). - Robot mission lifecycle execution (empty transit, picking, loaded transit, dropoff, opportunity charging).
- NetworkX spatial shortest-path planner (
PathPlanner, Dijkstra/A*, congestion-aware edge costs, capability checks). - Time-space reservation grid (
TimeSpaceReservationGrid, head-on conflict prevention,1.0\text{s}headway safety buffer, intersection occupancy). - Cooperative traffic management (
TrafficManager, right-of-way arbitration, priority yielding, deadlock timeout rerouting). - Trajectory generation & export (
results/trajectories/trajectory_sim.jsonwith(t, x, y, z, \text{yaw}, \text{state})coordinates). - OpenUSD Phase 4 3D scene with navigation corridor overlays (
omniverse/scenes/warehouse_phase4.usda). - Physics-informed battery model (
BatteryModel, load-dependent scaling,20\%reserve threshold, mission feasibility validation). - Capacity-constrained charging management (
ChargingManager,ChargingBaywith SimPyResource, queue tracking, opportunistic/mandatory charging). - Production-line delivery deadlines (Zone C
300\,\text{s}lead time SLA, lateness tracking, overdue detection). - Inventory stock-out monitoring (
STOCKOUT_OCCURREDtelemetry and emergency replenishment). - Safe task reassignment and priority preemption (
TaskReassigner). - OpenUSD Phase 5 3D scene (
omniverse/scenes/warehouse_phase5.usda). - Comprehensive KPI calculation engine (
KPICalculator, latency percentiles, loaded/empty distance ratios, SLA compliance). - Structured telemetry store (
EventStore,events.jsonl,tasks.csv,robots.csv,aisle_congestion.csv,kpi_summary.json). - Spatial 2D congestion heatmaps (
CongestionHeatmapGenerator, interactive SVG, ASCII floorplans, automated bottleneck diagnosis). - Executive Markdown report generator (
ExperimentReportGenerator,report.md). - Experiment execution & scenario comparison framework (
ExperimentRunner,ScenarioComparator, Monte Carlo multi-seed execution, fleet size sweeps). - Comprehensive unit test suite (129 passed in 0.97s).
Completed - Phase 7: NVIDIA Omniverse USD 3D Visualization
- Time-sampled OpenUSD animation stage generator (
AnimatedUSDGenerator,warehouse_phase7_animated.usda). - Native timeline scrubbing and playback in Omniverse Kit with zero extension dependencies.
- Continuous trajectory player and spatial interpolator (
TrajectoryPlayer, angular wrap-around handling, continuous battery SoC). - Interactive Omniverse Kit 110.4 extension (
omni.warehouse.twin.visualizer,omni.ui.Window, live fleet HUD, playback controls). - Synchronized visual indicators (Status dome glow, battery health LED, cargo box attachment).
- Comprehensive unit test suite (137 passed in 1.01s).
Completed - Phase 8: Operational Dashboard
- Zero-dependency decoupled dashboard server (
DashboardServer, standard libraryhttp.server). - Fast telemetry data provider & CSV parser (
DashboardDataProvider, read-only safety guarantees). - Sleek dark-mode Single Page Web Application (
index.html,app.css,app.js). - 6 Executive KPI cards (Throughput, Turnaround p50/p95, SLA %, Fleet Util %, Energy, Contention).
- Latency distribution percentile matrix (
p_{50}, p_{90}, p_{95}, p_{99}, mean, max). - Real-time AMR fleet telemetry matrix with dynamic battery health bars.
- Embedded 2D spatial SVG congestion heatmap viewer and top corridor bottleneck diagnosis table.
- Scenario comparison matrices for fleet sizing (
2, 4, 6, 8AMRs) and dispatch policies. - Audit-ready executive Markdown report viewer with instant download.
- Optional Streamlit interface (
streamlit_app.py). - Comprehensive unit test suite (144 passed in 2.43s).
Planned Roadmap
- Phase 9: Optimization scenarios, layout variations, and final demonstration.
4. Supported Environment
- Operating System: Ubuntu 24.04.3 LTS (x86_64).
- Python: Python 3.12 (Host has 3.12.3; compatible with >= 3.10).
- Core Dependencies:
simpy4.1.2,networkx3.7,pytest9.1.1. - NVIDIA GPU: NVIDIA GeForce RTX 5090 (Driver 580.178.04, CUDA 13.0).
- NVIDIA Omniverse Kit: Kit 110.4.0 (located at
/home/dmhai/Desktop/nvidia-omniverse/kit-app-template). - Isaac Sim: NOT required. The core simulation operates completely independently of Isaac Sim.
5. Installation & Setup
-
Clone or enter the project directory:
cd /home/dmhai/warehouse-digital-twin -
Activate the virtual environment:
source .venv/bin/activate -
Install the package in editable mode:
pip install -e . -
Run environment verification:
./scripts/check_environment.sh
6. Configuration Instructions
All parameters are externalized in config/:
config/warehouse.json: Facility dimensions (60m x 40m), Zone A/B/C bounds, docks, stations, and charging bays.config/robots.json: Robot types (Light AMR, Heavy AMR), speeds, payloads, battery capacities, and fleet composition.config/inventory.json: Item catalogs for Zones A, B, and C with stock counts, weights, and replenishment parameters.config/simulation.json: Duration (3600s), tick resolution, random seed, and arrival rates.config/dispatch_policies.json: Dispatch policies, reservation parameters, and charging thresholds.
7. Running Commands
Verify Environment
warehouse-twin validate-env
Validate Configuration Files
warehouse-twin validate-config
Validate Navigation Graph & Connectivity
warehouse-twin validate-graph
Export Warehouse Graph to JSON
warehouse-twin export-graph
# Or with custom output location:
warehouse-twin export-graph --output results/reports/custom_graph.json
Run Automated Tests
./scripts/run_tests.sh
# Or directly with pytest:
pytest tests/ -v
Run Reproducible Experiment (Phase 6)
warehouse-twin run-experiment --experiment-id baseline_1hr --duration 3600 --seed 42
Generates complete telemetry in results/experiments/baseline_1hr/:
events.jsonl,tasks.csv,robots.csv,aisle_congestion.csv,kpi_summary.jsoncongestion_heatmap.svg(2D spatial interactive heatmap)report.md(Executive summary with latency distributions and bottleneck recommendations)
Run Scenario Comparisons (Phase 6)
# Compare fleet sizing across 2, 4, 6, and 8 AMRs:
warehouse-twin compare-scenarios --scenario-type fleet_size --fleet-sizes 2 4 6 8 --duration 3600
# Benchmark dispatching heuristics under identical workloads:
warehouse-twin compare-scenarios --scenario-type dispatch_policy --policies priority_nearest_idle nearest_idle balanced_utilization --duration 3600
8. Low-Disk-Space Protection
The primary drive (/) has constrained free space (~8.9 GB free). To prevent disk exhaustion:
- All application logs use rotating file handlers capped at 10 MB.
- Large trajectory recordings and experiment results are ignored by
.gitignore. - To redirect logs and results to an external or secondary drive, set:
export WAREHOUSE_TWIN_SECONDARY_DRIVE="/path/to/external/storage"
9. Omniverse Visualization (Phase 7)
The visualizer connects via file-based trajectory playback and time-sampled OpenUSD scenes:
Option A: Native OpenUSD Timeline Playback (Zero Extensions Required)
- Generate the animated OpenUSD scene:
warehouse-twin export-usd \ --trajectory results/trajectories/trajectory_default.json \ --output omniverse/scenes/warehouse_phase7_animated.usda - Launch Omniverse Kit:
/home/dmhai/Desktop/nvidia-omniverse/kit-app-template/_build/linux-x86_64/release/warehouse_twin.kit.sh - Open
omniverse/scenes/warehouse_phase7_animated.usdaviaFile -> Openand click Play (or pressSpacebar) on the timeline toolbar!
Option B: Interactive Trajectory Playback Extension
- Launch Omniverse Kit.
- Open
omniverse/scenes/warehouse_phase7.usda. - The
omni.warehouse.twin.visualizerwindow automatically provides Play/Pause controls, time scrubbing slider, speed multipliers (0.5\timesto10.0\times), and real-time fleet telemetry HUD.
10. Operational Dashboard (Phase 8)
Launch the interactive web dashboard to explore telemetry, KPIs, heatmaps, and scenario comparisons:
warehouse-twin dashboard --port 8501 --results-dir results
Open your browser at http://127.0.0.1:8501.
Key Views:
- Overview & KPIs: Executive cards, throughput, p50/p95 turnaround latency, SLA compliance.
- AMR Fleet & Battery: Live robot status, battery gauges, loaded vs empty travel ratios, charging bay occupancy.
- Corridor Congestion: 2D spatial SVG heatmap and prioritized bottleneck recommendations.
- Tasks & SLAs: Completed, in-progress, pending counts, and task-type performance breakdowns.
- Scenario Comparison: Side-by-side comparison tables across fleet sizes (
2, 4, 6, 8AMRs) and dispatch policies. - Executive Report: Embedded audit-ready Markdown report viewer with instant file download.
11. Current Implementation Phase
Current Phase: Phase 8: Operational Dashboard (COMPLETED).
Next Phase: Phase 9: Optimization and Final Demonstration (Planned).