# OmniSocketGo Robot LAN Package This package is preconfigured for a robot connected directly by Ethernet to the operator computer at `192.168.41.144`. ## Network topology ```text robot Ethernet (for example 192.168.41.145/24) -> UDP 192.168.41.144:10909 -> local KCP hub on the operator computer ``` All relay settings are empty. Video uses `peer-b-video -> peer-a-video`; control uses `peer-a-ctrl -> peer-b-ctrl`. Both V4L2 cameras are opened and kept streaming: - head: `/dev/video26` - waist: `/dev/video18` Only the camera selected by `OMNI_CAMERA_ACTIVE` is encoded and transmitted. The default is `head`. ## Robot preparation On Ubuntu, install the build/runtime dependencies if they are not already available: ```bash sudo apt-get install build-essential pkg-config \ libavformat-dev libavcodec-dev libavutil-dev libswscale-dev \ v4l-utils psmisc ``` Configure the robot Ethernet interface in the same subnet as the computer, for example `192.168.41.145/24`, and verify: ```bash ping -c 3 192.168.41.144 ``` Then build and check the package: ```bash make b_side_omnid ./check-robot-lan.sh ``` ## Start If the robot boot watchdog is already managing an older daemon, stop it first so it cannot reopen the cameras: ```bash sudo systemctl stop blitz-watchdog.service blitz-b-side-omnid.service ``` Start the LAN sender: ```bash ./start-robot-lan.sh ``` The camera preflight may stop only the known `orbbec_head.service` and `orbbec_waist.service` units to release the two devices. It refuses to stop the whole `proc_manager.service`. Successful dual-camera initialization prints: ```text [video_pipeline] camera head ready on /dev/video26 [video_pipeline] camera waist ready on /dev/video18 ``` The periodic daemon line should then report `video registered=1`, with `frames` increasing. For a development start, inspect: ```bash python3 -m json.tool logs/runtime/b-side-omnid.status.json ``` Expected fields include `video_connected: true`, an increasing `video_frames_sent`, an empty `video_last_error`, and `video_active_camera: head`. ## Select the waist camera at startup Edit `scripts/dev/robot-remote.env.local` and set: ```bash OMNI_CAMERA_ACTIVE="waist" ``` Then restart `start-robot-lan.sh`. Runtime text commands `camera:head` and `camera:waist` sent from `peer-a-ctrl` also switch the active input without reopening either camera. ## Important For this direct-LAN validation, use `start-robot-lan.sh`. Do not install the existing 5G-oriented `blitz-robot.target` boot chain until its modem policy has been adapted for the target robot.