feat: 把 B 端的 视频/控制 都收口到一个本地 daemon 进程里

This commit is contained in:
2026-04-01 21:02:05 +08:00
parent 38991ca9d8
commit d02acdfce2
2 changed files with 135 additions and 24 deletions

View File

@@ -77,3 +77,34 @@ python3 udp_loopback/omnisocket_xbox_sender.py
- The original UDP files remain unchanged, so you can switch back by restoring `control_tool: udp_loopback`.
- OmniSocket keyboard/Xbox mappings are aligned with the cleaned walk-only FSM flow: `ZERO`, `STOP`, and `WALKAMP`.
- Keyboard sender supports `4/5/6` for clearing `x/y/yaw` speed independently, and `r` still clears all three axes.
## B-side OmniDaemon
The B-side stack now supports a local daemon that owns OmniSocket control receive and manages the video sender worker.
Start the daemon:
```bash
cd OmniSocketGo
make b_side_video_sender
python3 -m pip install -e ./python
python3 -m omnisocket_b_side.daemon --config config/b_side_omnidaemon.yaml
```
Or with the helper script:
```bash
cd OmniSocketGo
./scripts/start_b_side.sh
```
With `OMNI_TRANSPORT_BACKEND=daemon` (the default), `OmniSocketFSMController` connects to `/tmp/omnisocket-b-ctrl.sock` and receives raw `ControlPacket` bytes from the daemon instead of creating its own OmniSocket session.
Fallback to the previous direct mode when needed:
```bash
export OMNI_TRANSPORT_BACKEND=direct
python3 rl_control_node_sim.py
```
In simulation / MuJoCo mode, keep `video_sender.enabled: false` in `OmniSocketGo/config/b_side_omnidaemon.yaml` so the daemon only provides the control path and does not require `/dev/video0`.