Files
Warehouse-Digital-Twin-and-…/README.md
T

7.9 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 (Phase 0)

  • 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 and validate-config.
  • Comprehensive unit test suite (17 passed in 0.09s).
  • Low-disk-space mitigation strategy (WAREHOUSE_TWIN_SECONDARY_DRIVE).

Planned Roadmap

  • Phase 1: Warehouse topological graph, Zone A/B/C nodes, docks, and connectivity validation.
  • Phase 2: AMR state machine, payload validation, and task models.
  • Phase 3: SimPy discrete-event simulation engine and order generation.
  • Phase 4: NetworkX shortest-path routing, fleet dispatching, and aisle reservations.
  • Phase 5: Battery discharge/recharge dynamics, charging queues, and production deadlines.
  • Phase 6: Analytics, KPI calculations, and congestion heatmaps.
  • Phase 7: NVIDIA Omniverse USD 3D visualization and trajectory playback.
  • Phase 8: Interactive operational dashboard.
  • Phase 9: Optimization scenarios, fleet-size benchmarking, 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: simpy 4.1.2, networkx 3.7, pytest 9.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/nvidia-omniverse/kit-app-template).
  • Isaac Sim: NOT required. The core simulation operates completely independently of Isaac Sim.

5. Installation & Setup

  1. Clone or enter the project directory:

    cd /home/dmhai/warehouse-digital-twin
    
  2. Activate the virtual environment:

    source .venv/bin/activate
    
  3. Install the package in editable mode:

    pip install -e .
    
  4. 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

Run Automated Tests

./scripts/run_tests.sh
# Or directly with pytest:
pytest tests/ -v

8. Low-Disk-Space Protection

The primary drive (/) has constrained free space (~8.9 GB free). To prevent disk exhaustion:

  1. All application logs use rotating file handlers capped at 10 MB.
  2. Large trajectory recordings and experiment results are ignored by .gitignore.
  3. 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 Preview)

The visualizer connects via file-based trajectory playback:

  • Simulation writes time-stamped Cartesian coordinates to results/trajectories/.
  • Omniverse Kit 110.4 loads the warehouse USD stage (omniverse/scenes/) and moves robot prims along the scheduled trajectory.
  • Run command (available in Phase 7):
    /home/dmhai/nvidia-omniverse/kit-app-template/_build/linux-x86_64/release/kit/kit /home/dmhai/nvidia-omniverse/kit-app-template/_build/linux-x86_64/release/apps/warehouse_twin.kit --ext-folder omniverse/extensions
    

10. Current Implementation Phase

Current Phase: Phase 0: Environment and Project Foundation (Completed).
Next Phase: Phase 1: Warehouse Model (Awaiting user confirmation).