# Warehouse Robot Fleet Digital Twin: Architecture ## 1. Executive Overview The Warehouse Robot Fleet Digital Twin is a modular, event-driven simulation and 3D visualization platform engineered to model, analyze, and optimize autonomous mobile robot (AMR) fleet operations in multi-zone industrial facilities. The architecture strictly decouples: 1. **Core Simulation Engine**: Discrete-event logic, fleet dispatching, path reservation, battery dynamics, and inventory state. 2. **Data & Storage Layer**: Structured simulation event logs (JSONL/CSV), KPI aggregations, and trajectory records. 3. **Visualization & Digital Twin Layer**: NVIDIA Omniverse Kit, OpenUSD scene hierarchy, and trajectory playback. 4. **Analytics & Optimization Layer**: Reporting, congestion heatmaps, and scenario comparisons. This decoupling guarantees that the simulation runs headlessly and deterministically without requiring a GPU, display server, NVIDIA Isaac Sim, or Omniverse Kit. Visualization is an asynchronous consumer of simulation outputs. ``` +-----------------------------------------------------------------------------------+ | CONFIG & INPUT LAYER | | config/warehouse.json config/robots.json config/inventory.json config/... | +-----------------------------------------------------------------------------------+ | v +-----------------------------------------------------------------------------------+ | DISCRETE-EVENT SIMULATION ENGINE | | +------------------------+ +------------------------+ +---------------------+ | | | SimPy Clock & | | NetworkX Routing | | Fleet Dispatch | | | | Event Loop | | & Time-Space Resv. | | & Battery Mgr | | | +------------------------+ +------------------------+ +---------------------+ | | +------------------------+ +------------------------+ +---------------------+ | | | Order & Replenish | | Zone A, B, C Logic | | AMR State Machine | | | | Generators | | & Capacity Checks | | Controllers | | | +------------------------+ +------------------------+ +---------------------+ | +-----------------------------------------------------------------------------------+ | v +-----------------------------------------------------------------------------------+ | DATA OUTPUTS & STORAGE INTERFACE | | logs/simulation.log results/trajectories/robot_paths.json | | results/experiments/events.jsonl results/reports/kpis.json | +-----------------------------------------------------------------------------------+ | | v v +-----------------------------------------+ +-------------------------------------+ | OMNIVERSE VISUALIZATION | | ANALYTICS & KPI | | Kit 110.4 + OpenUSD Playback | | Throughput, Robot Utilization, | | USD Prims / Live Kit Extension | | Aisle Congestion, Latency Heatmaps | +-----------------------------------------+ +-------------------------------------+ ``` --- ## 2. Decoupled Subsystems ### 2.1 Domain Layer (`warehouse_twin.domain`) Defines immutable data classes, domain models, and strict type-checked enums: - **Robot**: ID, type, physical specs, payload limits, battery state, kinematics, state machine. - **Task**: ID, category (order pick, restocking, production-feed), priority, release time, deadline, status. - **Inventory**: SKU ID, category (Zone A fast, Zone B heavy, Zone C production raw), quantity, lot size, min stock. - **Warehouse**: Dimensions, nodes, coordinate system, zone definitions, docks, charging bays. - **Events**: Canonical simulation events emitted to storage and logging. ### 2.2 Simulation Engine (`warehouse_twin.simulation`) Built on `SimPy`: - Event loop with microsecond-level discrete-event scheduling. - Separate simulation clock (`sim_time`) independent of host execution wall-clock time. - Deterministic random seed propagation (`random.Random` instances, no unseeded globals). - Order generators parameterized by zone throughput and peak demand windows. ### 2.3 Routing & Traffic Management (`warehouse_twin.routing`) - Graph representation of warehouse floor using `NetworkX`. - Spatio-temporal reservation table to prevent head-on collisions and deadlocks in narrow aisles. - Kinematic path travel times calculated from acceleration, top speed, and turning constraints. ### 2.4 Fleet Management (`warehouse_twin.fleet`) - Task dispatcher with pluggable policies (`priority_nearest_idle`, `balanced_utilization`). - Battery manager monitoring state of charge (SoC) and enforcing opportunity charging thresholds. - Safe preemption and task reassignment if an AMR encounters an unexpected delay or low battery. ### 2.5 Storage & Interfaces (`warehouse_twin.storage`, `warehouse_twin.interfaces`) - Streamed JSONL event logs. - Interpolated 3D trajectory generator producing time-indexed Cartesian coordinates `(x, y, z, yaw, state)`. ### 2.6 Omniverse USD Visualization (`omniverse/`) - Utilizes NVIDIA Omniverse Kit 110.4. - Reads exported trajectory JSON and updates USD prim transforms on each Kit update tick (`omni.kit.app.get_app().get_update_event_stream()`). - Clean teardown without dangling event subscriptions. --- ## 3. Coordinate System & Measurement Units | Dimension | Unit | Description | | :--- | :--- | :--- | | **Coordinate System** | Right-Handed Cartesian | X = East (Width), Y = North (Depth), Z = Up (Height) | | **Distance** | Meters (m) | Standard SI units for all node coordinates and dimensions | | **Linear Velocity** | Meters per second (m/s) | Robot speed limits and travel rates | | **Acceleration** | Meters per second² (m/s²) | Ramp-up and braking kinematics | | **Mass / Payload** | Kilograms (kg) | Payload constraints and inventory weights | | **Energy / Battery** | Kilowatt-hours (kWh) | Battery pack capacity and residual energy | | **Power Rate** | Kilowatts (kW) | Consumption (idle, moving, lifting) and charging rate | | **Time** | Seconds (s) | Discrete-event simulation clock |