Skip to main content
awp-sim is the reference world. It is built on the protocol layer of the Python SDK. It exposes a simulated arm, arm_01, and optionally a gripper, gripper_01, in either time model, and exists to exercise the protocol: moves take real time, aborts decelerate, and connections can be dropped mid-motion. It targets 0.1-draft.12.
Alpha. The world is Core World (lockstep): AWP-conformant against 0.1-draft.12 (awp-conformance 0.1.0a10) and Core World (streaming): AWP-conformant against 0.1-draft.12 (awp-conformance 0.1.0a10). With all lockstep features enabled it is Core World + sim (lockstep): AWP-conformant against 0.1-draft.12 (awp-conformance 0.1.0a10), and with all streaming features, Core World (streaming): AWP-conformant against 0.1-draft.12 (awp-conformance 0.1.0a10) (reports).

The world

Beyond Core

Each is off by default and enabled with --features (comma-separated): --stream-binding ws offers frames on a ws stream connection at /stream as well as inline (AWP-TRN-003, AWP-TRN-012..013).

Serving

  • Authentication. On a non-loopback address the server refuses to start without --token (or $AWP_SIM_TOKEN) and TLS (--tls-cert, --tls-key), unless --insecure is given. It accepts the token in Authorization or as the awp.bearer.<token> subprotocol and rejects any URL that carries one (AWP-SEC-001..006).
  • Audit log. One JSON Lines file per session in ./awp-audit (--audit-dir): credentials redacted, frames recorded as header plus payload hash, records hash-chained (AWP-AUD-001..007). --record-dir additionally writes each session’s wire trace in the trace format.
  • E-stop. kill -USR1 engages it and kill -USR2 releases it (AWP-EVT-002).
  • Timing. --watchdog-ms, --heartbeat-ms, --reconnect-window-ms, and --tick-ms override the defaults.
  • Latest-wins delivery. On the inline binding a frame not yet sent on a latest-wins channel is replaced by a newer one rather than queued behind it (AWP-TRN-009).

Scenarios

awp-sim scenarios runs real clients against the world on a virtual clock and checks the outcome; --out DIR writes one trace per agent and a report.json. Every recorded trace passes the specification’s own trace checker.

Using it in tests

The world is a sans-IO engine: awp_sim.world.World takes messages and the current time and returns what to send. awp_sim.loopback.Loopback connects it in-process to real ClientConnections on a virtual clock, with fault injection for dropped, half-open, and lossy connections and World.disturb for an external disturbance of the arm, so agent code can be tested deterministically without a socket.

Not implemented

Grant expiry; stream bindings other than ws and inline; the robotics profile.