# Overview [Asimov Manager](https://github.com/asimovinc/asimov-manager) runs on the [Perception and Network Controller](../../hardware/specs/the-brains). It connects operators to the robot over the internet. It does four things: 1. **Video streaming** - Capture from cameras, stream to operators via LiveKit 2. **Audio** - Stream mic to operators, play operator voice on speaker 3. **Teleop commands** - Receive commands from operators, forward to firmware 4. **State broadcast** - Get robot state from firmware, send to operators @ 50 Hz ```{mermaid} flowchart TB subgraph internet["Internet"] livekit["LiveKit Server"] end subgraph pnc["Perception & Network Controller"] manager["Asimov Manager"] cameras["Cameras"] mic["Mic"] speaker["Speaker"] end subgraph mcb["Motion Control Board"] firmware["Asimov Firmware"] end subgraph operator["Operator"] browser["Browser/App"] end cameras --> manager mic --> manager manager --> speaker manager <-->|"WebRTC"| livekit livekit <-->|"WebRTC"| browser manager <-->|"UDP nanopb"| firmware ``` ## Why Two Processes? [Asimov Firmware](https://github.com/asimovinc/asimov-firmware) runs the real-time control loop. It talks to motors over CAN at 200 Hz. Adding network code would cause timing jitter. [Asimov Manager](https://github.com/asimovinc/asimov-manager) handles all the network stuff: WebRTC, video encoding, connection management. Runs on a separate board. They talk [nanopb](https://github.com/nanopb/nanopb) over UDP. ## Data Flow | Data | Direction | Transport | Rate | |------|-----------|-----------|------| | Video | Robot → Operator | WebRTC video tracks | 30-50 fps | | Audio (mic) | Robot → Operator | WebRTC audio track | 48 kHz | | Audio (speaker) | Operator → Robot | WebRTC audio track | 48 kHz | | Teleop commands | Operator → Robot | DataChannel (reliable) | On demand | | Robot state | Robot → Operator | DataChannel (lossy) | 50 Hz | | Motor commands | Manager → Firmware | UDP :8888 | On demand | | Motor state | Firmware → Manager | UDP :8889 | 100 Hz | ## Source Files | File | What it does | |------|--------------| | `main.c` | Entry point, 100 Hz main loop | | `config/config.c` | YAML config parser | | `control/control.c` | UDP to firmware, nanopb serialization | | `media/publisher.c` | Video/audio capture, LiveKit streaming | | `media/subscriber.c` | Audio playback, DataChannel commands | | `teleop/teleop.c` | Command/state binary packing |