live: real-time browser viewer (AICC-client based), sensor-built top-down map shared module, run_live.sh one-command mode
This commit is contained in:
@@ -17,9 +17,11 @@ over the protocol, no engine hooks.
|
||||
|-------------------------|--------------------------------------------------------------|
|
||||
| `room/world.py` | World state: 16x16 room, capsule physics, crates, beacon, audio. Single source of truth. |
|
||||
| `room/render.py` | Headless first-person raycaster (Pillow): honest frames from world state. |
|
||||
| `room/mapview.py` | Top-down map drawn from sensor data (shared by recorder + live viewer). |
|
||||
| `bridge.py` | `RoomBridge(Bridge)`: registers all tools, emits events. |
|
||||
| `server.py` entry | `python -m testbed.bridge` — WebSocket server. |
|
||||
| `conformance.py` | Runs the 9 core conformance scenarios against this bridge. |
|
||||
| `live.py` | Real-time browser viewer (itself an AICC client). |
|
||||
| `demo.py` | Agent demo: LLM driver (OpenAI-compatible) or scripted. |
|
||||
| `tests/` | pytest suite (world, renderer, bridge, protocol). |
|
||||
|
||||
@@ -60,6 +62,28 @@ taken); stop the old one with `fuser -k 8765/tcp` or Ctrl-C in its terminal.
|
||||
The demo prints a full transcript of tool calls/results to stdout and saves the
|
||||
capsule's final first-person frame to `demo_final_frame.png`.
|
||||
|
||||
## Real-time mode
|
||||
|
||||
Watch the capsule drive live in your browser:
|
||||
|
||||
```bash
|
||||
scripts/run_live.sh --agent scripted
|
||||
```
|
||||
|
||||
This starts the bridge, a viewer server, and the demo; open
|
||||
[http://127.0.0.1:8000](http://127.0.0.1:8000) while the agent acts. The page
|
||||
shows the first-person frame (`vision`) and a top-down map (`world_query` +
|
||||
`proprioception`) updating a few times per second, with the capsule's path,
|
||||
heading, and distance to the beacon.
|
||||
|
||||
The viewer (`testbed/live.py`) is itself a plain AICC client — it sees the
|
||||
world only through the protocol sensors, so it works against any bridge, not
|
||||
just this one. You can also run it standalone:
|
||||
|
||||
```bash
|
||||
testbed/.venv/bin/python -m testbed.live # then run the demo in another terminal
|
||||
```
|
||||
|
||||
## Visual mode
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user