Use when implementing USO (Unified Simulation Orchestrator) integration for PyBulletFleet - SimulationNode adapter, snapshot serialization and deserialization, replay functionality, delta snapshot generation, or ZeroMQ messaging
Guide for integrating PyBulletFleet as a USO (Unified Simulation Orchestrator) simulation node — covering the SimulationNode adapter, snapshot serialization, and replay capability.
USO Repository: https://github.com/yuokamoto/Unified-Simulation-Orchestrator
┌─────────────────────────────┐
│ Simulation Master │ ← Time sync, snapshot merge, logging
└──────────┬──────────────────┘
│ ZeroMQ (delta snapshots, control, events)
┌──────┼──────────┐
▼ ▼ ▼
SimPy Gazebo PyBulletFleet ← Each implements SimulationNode interface
Node Node Node (NEW)
Two modes:
Every USO node must implement:
class SimulationNode:
def initialize(self, full_snapshot, bt_xml): ...
def step(self, delta_t): ...
def collect_asset_states(self) -> dict: ...
def send_state_update(self, delta_snapshot): ...
def send_event(self, event): ...
def shutdown(self): ...
| USO Method | PyBulletFleet Implementation |
|---|---|
initialize(full_snapshot, bt_xml) | Parse snapshot → spawn Agents/SimObjects via from_params() |
step(delta_t) | Set _params.timestep = delta_t, call step_once() |
collect_asset_states() | Iterate sim.sim_objects → build delta snapshot dict |
send_state_update(delta) | Single mode: local. Distributed: ZeroMQ PUB |
send_event(event) | Action completions, collision events → event dict |
shutdown() | p.disconnect(), save final snapshot |