Architecture
Implementation of warehouse_system_design_doc_v2.pdf (Alternative A baseline + Alternative C learned priority
advisor). Python, MuJoCo (visual), ZeroMQ (brokerless), NumPy, PyTorch. No ROS 2.
Processes (one run)
SYSML / INTERNAL BLOCK VIEWONE SIMULATION RUN · 20 HZ LOCKSTEP

View PlantUML source
@startuml
left to right direction
skinparam backgroundColor transparent
skinparam shadowing false
skinparam roundcorner 4
skinparam defaultFontName "Inria Sans"
skinparam defaultFontSize 13
skinparam ArrowColor #168bff
skinparam packageStyle rectangle
skinparam rectangle {
BorderColor #777777
FontColor #171717
BackgroundColor #ffffff
}
skinparam package {
BorderColor #a3a3a3
FontColor #171717
BackgroundColor #f5f5f3
}
package "SIMULATION ENVIRONMENT" {
rectangle "WORLD SERVER · MuJoCo\nPhysics · sensors · WMS orders\nGround-truth metrics · lockstep clock" as WORLD
}
package "DECENTRALIZED FLEET · ONE PROCESS PER ROBOT" {
rectangle "AMR 0 AGENT\nPlanner · safety shield\nMotion + task manager" as A0
rectangle "AMR 1 AGENT\nPlanner · safety shield\nMotion + task manager" as A1
rectangle "AMR 2 AGENT\nPlanner · safety shield\nMotion + task manager" as A2
}
rectangle "BROKERLESS ZEROMQ PEER MESH\nPUB/SUB · state, intent, blockages\nDEALER/ROUTER · claims, pushes, bids" as MESH #f0f0ed
rectangle "DASHBOARD\nTelemetry only\nNo control authority" as DASH #f0f0ed
rectangle "CENTRAL PLANNER\nBenchmark only · opt-in" as BENCH #f0f0ed
WORLD --> A0 : SENSE(k)
WORLD --> A1 : SENSE(k)
WORLD --> A2 : SENSE(k)
A0 --> WORLD : CMD(k)
A1 --> WORLD : CMD(k)
A2 --> WORLD : CMD(k)
A0 <--> MESH
A1 <--> MESH
A2 <--> MESH
MESH ..> DASH : observation feed
BENCH ..> WORLD : optional benchmark interface
@enduml
Solid links carry simulation sensing/commands and peer coordination. Dashed links are observational or benchmark-only; the world server provides physics and time, not fleet routing or allocation decisions.
- World server (
world/sim_server.py): integrates MuJoCo physics for MiR100 models, emulates each robot's own
sensors (pose, 360° range ring cast with mj_multiRay, battery), applies wheel commands, releases WMS orders,
executes fault events (pallet blockages, robot crashes, dashboard kill) and records ground truth (eq. 8 distance
events, MuJoCo chassis contacts, verified pickups/deliveries). It makes no routing, priority or allocation
decision. It also acts as the hardware clock: lockstep at 20 Hz with a per-tick message-delivery barrier
(it forwards counters of peer messages sent, never their content) so runs are reproducible.
- Robot agent (
agent/), one OS process per robot, Fig. 3 decomposition:
comm adapter (comms/peer_node.py) → peer table (comms/peer_table.py) → task manager (agent/task_manager.py)
→ planner (A* agent/astar.py, decentralized PIBT + node claims agent/coord.py) → learning advisor
(agent/advisor.py, optional) → safety shield (agent/safety_shield.py) → motion controller (agent/motion.py).
Deadlock monitor agent/deadlock.py, blockage detector agent/blockage.py.
- Dashboard (
dashboard/): HTTP + Server-Sent Events, subscribes to telemetry only.
- Central reference (
benchmark/central.py): benchmark only (App. D configuration 2).
Robot model
MiR100 (Mobile Industrial Robots) — original STL meshes and URDF parameters from DFKI mir_robot (BSD-3,
assets/mir100/LICENSE). Drive wheels r = 0.0625 m, track 0.445 m, 77 kg base; four frictionless swivel casters;
sprung drive unit (vertical spring-damper, ~300 N preload/wheel) so the drive wheels keep traction like the real
robot; velocity-servo wheels (kv = 10, 30 N m). Sensor: 24-ray ring at scanner height (the MiR's two corner
SICK S300 give 360° coverage). Max speed 1.0 m/s forward (datasheet 1.5 m/s), 0.5 m/s reverse.
Coordination protocol (decentralized)
- Node claims (safety-relevant mutual exclusion). A robot holds the node it stands on and the node it is
entering. To enter v it sends
Claim(v, priority) to every live peer and moves only when all granted.
Peers deny if they hold v, have a higher-ranked pending claim on v, or already granted v. Message loss only
causes retries/timeouts. Lost peers' last nodes stay occupied.
- Asynchronous PIBT. Priority key = −(time the current goal was assigned) [+ learned score] [+ deadlock boost]
— time-invariant so all robots compare identical numbers. Candidates: neighbours that reduce distance to goal.
A candidate held by a stationary lower-priority robot →
Push (priority inheritance); the pushed robot
acknowledges, evades (never into the pusher's node, preferring nodes off the pusher's path, reversing for short
moves) or replies failure → the pusher backtracks. The vacated node is reserved for the pusher.
- Deadlock handling. Stalled (no distance-to-goal progress within T_d) while a higher-priority neighbour is
also stalled → priority escalation (bounded boost, cooldown), then route invalidation after repeated escalation.
- Stop-and-wait baseline (App. B) uses the same claim layer; it halts while a peer with precedence holds or
intends nodes on its next three route nodes, re-plans around it after a timeout, else backs off.
Task allocation
Replicated task table, auction with consensus by deterministic rule (lowest (cost, name) wins; eq. 4 bid),
revisioned re-opening on release / peer loss, periodic consensus re-broadcast and done lists in RobotState for
repair under message loss. Idle robots park in rest/charger alcoves; low battery → charge.
Messages (App. A)
common/messages.py: RobotState, RobotIntent, TaskAnnouncement, TaskBid, TaskConsensus, BlockageEvent plus
Claim/ClaimReply/Release, Push/PushReply, TaskDone, Beacon (join handshake), CentralPlan (benchmark). Envelope:
type, src, seq, ts (sim time), ttl. JSON wire format.
Reproducibility
TOML configs (configs/), resolved config + seed + config hash saved with every run, deterministic lockstep
delivery, seeded fault injection and order streams. Two runs with the same seed produce identical trajectories
(tests/test_sim_m3.py::test_runs_are_reproducible).