Update warehouse digital twin and robot fleet optimization
This commit is contained in:
+64
-4
@@ -176,11 +176,11 @@ A dedicated test suite was added in `tests/unit/test_assets_validation.py` and `
|
||||
.venv/bin/pytest tests/ -v
|
||||
```
|
||||
|
||||
- **Total Unit Tests Executed**: 164
|
||||
- **Passed**: 164
|
||||
- **Total Unit Tests Executed**: 186
|
||||
- **Passed**: 186
|
||||
- **Failed**: 0
|
||||
- **Pass Rate**: 100.0%
|
||||
- **Execution Time**: ~2.53 seconds
|
||||
- **Execution Time**: ~3.23 seconds
|
||||
|
||||
```
|
||||
tests/unit/test_assets_validation.py::test_asset_manifest_structure_and_completeness PASSED [ 1%]
|
||||
@@ -191,5 +191,65 @@ tests/unit/test_realistic_3d_assets.py::test_asset_loader_creates_valid_referenc
|
||||
tests/unit/test_realistic_3d_assets.py::test_warehouse_builder_generates_valid_scene PASSED[ 60%]
|
||||
tests/unit/test_realistic_3d_assets.py::test_robot_animator_single_and_multi_robot PASSED [ 61%]
|
||||
...
|
||||
============================= 164 passed in 2.53s ==============================
|
||||
============================= 186 passed in 3.23s ==============================
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 8. Warehouse Navigation, Rack-Side Picking, Layout & Collision Architecture
|
||||
|
||||
### 8.1 Audit and Diagnosis of Previous Behavior
|
||||
During simulation execution, the following root causes were identified and resolved:
|
||||
1. **Under-Rack Waypoints**: The previous navigation graph placed rack target waypoints at geometric rack centers $(x_{\text{center}}, y_{\text{center}}, 0.0)$, causing AMRs to travel directly into/underneath solid physical rack geometry.
|
||||
2. **Missing Approach Offsets**: AMRs lacked designated aisle presentation waypoints, causing orders to be "picked" while AMRs were located inside shelf structures.
|
||||
3. **Rack-Clipping on Departure**: Upon completing a pick, AMRs routed directly toward destination docks through adjacent racks because they had not moved away into the traversable aisle.
|
||||
4. **Concentrated Charging**: All charging berths were clustered along a single wall without approach spurs or headway buffers.
|
||||
5. **Aisle Collisions**: Visual animation did not prevent spatial overlaps between AMRs traversing shared narrow aisles or intersections.
|
||||
|
||||
### 8.2 Rack-Side Picking Points & Shelf Approach Geometry
|
||||
Storage racks now expose explicit `PickingPoint` domain entities located strictly in traversable aisles outside rack footprints:
|
||||
- For a rack of dimensions $(L, D, H)$ centered at $(x_c, y_c)$ with clearance $c = 0.8\,\text{m}$:
|
||||
- **South-Facing**: $(x_c, y_c - (D/2 + c))$, approach yaw $= 90^\circ$ (facing North).
|
||||
- **North-Facing**: $(x_c, y_c + (D/2 + c))$, approach yaw $= -90^\circ$ (facing South).
|
||||
- **West-Facing**: $(x_c - (L/2 + c), y_c)$, approach yaw $= 0^\circ$ (facing East).
|
||||
- **East-Facing**: $(x_c + (L/2 + c), y_c)$, approach yaw $= 180^\circ$ (facing West).
|
||||
- The picking point is instantiated in the navigation graph as `pick_{rack_id}` connected to the aisle network. The solid rack center remains marked as an impassable obstacle (`_rack_nodes`).
|
||||
- **Post-Pick Departure**: The AMR transitions to the aisle waypoint via `get_rack_aisle_waypoint` prior to initiating loaded transit.
|
||||
|
||||
### 8.3 Configurable Discrete Grid (`WarehouseGrid`)
|
||||
Located in [`warehouse_twin/layout/grid.py`](file:///home/dmhai/warehouse-digital-twin/src/warehouse_twin/layout/grid.py):
|
||||
- Grid resolution: $0.5\,\text{m}$ (configurable).
|
||||
- Cell types: `FREE`, `RACK_FOOTPRINT`, `AISLE`, `PICKING_POSITION`, `CHARGING_POSITION`, `INTERSECTION`, `RESTRICTED`, `OBSTACLE`.
|
||||
- Bi-directional continuous-to-discrete coordinate transformation:
|
||||
$$\text{col} = \lfloor x / \text{cell\_size} \rfloor, \quad \text{row} = \lfloor y / \text{cell\_size} \rfloor$$
|
||||
$$x = (\text{col} + 0.5) \times \text{cell\_size}, \quad y = (\text{row} + 0.5) \times \text{cell\_size}$$
|
||||
|
||||
### 8.4 Multi-Row Procedural Warehouse Layout Generator & Validator
|
||||
Located in [`warehouse_twin/layout/layout_generator.py`](file:///home/dmhai/warehouse-digital-twin/src/warehouse_twin/layout/layout_generator.py):
|
||||
- Procedural generation of multiple parallel rack rows with repeated modules, bay gaps, clear aisles, and connecting cross-aisles.
|
||||
- Centralized configuration file: [`config/warehouse_layout_config.json`](file:///home/dmhai/warehouse-digital-twin/config/warehouse_layout_config.json).
|
||||
- `LayoutValidator`: Generates `LayoutValidationReport` auditing boundary limits, AABB rack overlaps, charger isolation, and graph reachability.
|
||||
|
||||
### 8.5 Distributed Charging-Station Planner
|
||||
Located in [`warehouse_twin/layout/charging_planner.py`](file:///home/dmhai/warehouse-digital-twin/src/warehouse_twin/layout/charging_planner.py):
|
||||
- 6-step spatial placement strategy identifying non-obstructive perimeter alcoves.
|
||||
- Prevents charging berths from blocking primary aisles, rack faces, and intersections.
|
||||
- Enforces single-berth capacity (`capacity = 1`) and minimum separation between chargers ($3.0\,\text{m}$).
|
||||
|
||||
### 8.6 Multi-Robot Collision Avoidance & Deadlock Management
|
||||
- **Footprint-Aware Spatial Clearance**: `TimeSpaceReservationGrid` checks distance between concurrently reserved waypoints:
|
||||
$$\text{dist}(P_a, P_b) \ge 2 \times R_{\text{footprint}}$$
|
||||
- **Time-Space Edge Reservations**: Enforces headway buffers ($1.0\,\text{s}$ safety buffer) and prevents opposite-direction traversal of single-lane corridors.
|
||||
- **Deadlock Cycle Resolution** ([`warehouse_twin/routing/deadlock_manager.py`](file:///home/dmhai/warehouse-digital-twin/src/warehouse_twin/routing/deadlock_manager.py)):
|
||||
- Directed wait-for dependency graph.
|
||||
- Cycle detection using NetworkX: detects circular wait dependencies ($A \rightarrow B \rightarrow A$).
|
||||
- Resolves circular wait immediately by commanding the deterministic victim robot to replan around the contested edge.
|
||||
- Tracks prolonged waits exceeding the deadlock timeout ($30.0\,\text{s}$).
|
||||
|
||||
### 8.7 OpenUSD Scene Integration
|
||||
- Synchronized OpenUSD stage export referencing verified 3D assets.
|
||||
- Dedicated `def Scope "PickingPoints"` containing `/World/Warehouse/PickingPoints/{loc_id}_Front` with visual `ApproachMarker` indicators and shelf metadata.
|
||||
- Generated scenes:
|
||||
- Static: `omniverse/scenes/warehouse_realistic.usda`
|
||||
- Animated: `omniverse/scenes/warehouse_realistic_animated.usda`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user