Organize host and robot streaming releases

This commit is contained in:
Mike Mi
2026-08-09 15:56:20 +08:00
commit decff19daf
532 changed files with 127054 additions and 0 deletions

View File

@@ -0,0 +1,112 @@
# 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`.
In the legacy V4L2 mode both 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`. The ROS2-native default does not open these devices;
it subscribes to the corresponding Orbbec RGB topics instead.
## 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 python3-colcon-common-extensions \
ros-jazzy-rclpy ros-jazzy-sensor-msgs
```
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.
# ROS 2 相机输入
本 ROS-native 版本默认使用 `OMNI_CAMERA_SOURCE=ros2`。头部/腰部 RGB 由
`omnisocket_camera_bridge` 订阅 ROS 2 图像 topic 后写入共享内存,视频 C
管线不再直接打开 `/dev/video*`。启动与服务占用策略见
`docs/ROS2_CAMERA_FORWARDING.md`,RGB+深度接口见
`docs/ROS_CAMERA_INTERFACES.md`。