78 lines
1.8 KiB
Markdown
78 lines
1.8 KiB
Markdown
# OmniSocketGo control-host package
|
|
|
|
This archive contains both projects required by the operator computer:
|
|
|
|
```text
|
|
OmniSocketGo_add_camera/ KCP hub, native/Python transport and launch scripts
|
|
robot-command-center/ Django backend and Vue frontend
|
|
```
|
|
|
|
It does not contain the robot-side package.
|
|
|
|
## Directory placement
|
|
|
|
Keep the two extracted projects as sibling directories:
|
|
|
|
```text
|
|
<install-root>/
|
|
├── OmniSocketGo_add_camera/
|
|
└── robot-command-center/
|
|
```
|
|
|
|
The supplied host configuration currently points `ROBOT_COMMAND_CENTER_ROOT`
|
|
to `/home/ps/Desktop/robot-command-center`. Update
|
|
`OmniSocketGo_add_camera/scripts/dev/robot-remote.env.local` if the target host
|
|
uses a different path.
|
|
|
|
## Install backend and transport dependencies
|
|
|
|
```bash
|
|
cd OmniSocketGo_add_camera
|
|
python3 -m venv .venv
|
|
.venv/bin/python -m pip install -r ../requirements.txt
|
|
make python-ext PYTHON="$(pwd)/.venv/bin/python"
|
|
.venv/bin/python -m pip install --no-build-isolation -e python
|
|
make bin/kcpserver
|
|
```
|
|
|
|
Alternatively, after confirming the sibling project path:
|
|
|
|
```bash
|
|
cd OmniSocketGo_add_camera
|
|
bash scripts/dev/setup-control-side.sh
|
|
```
|
|
|
|
## Install frontend dependencies
|
|
|
|
```bash
|
|
cd robot-command-center/frontend
|
|
npm ci
|
|
npm run build
|
|
```
|
|
|
|
## Start direct-LAN mode
|
|
|
|
Use three terminals from `OmniSocketGo_add_camera`:
|
|
|
|
```bash
|
|
bash scripts/dev/start-local-hub.sh
|
|
```
|
|
|
|
```bash
|
|
bash scripts/dev/start-backend.sh
|
|
```
|
|
|
|
```bash
|
|
bash scripts/dev/start-frontend.sh
|
|
```
|
|
|
|
Open `http://127.0.0.1:5173` and verify:
|
|
|
|
```bash
|
|
curl -s http://127.0.0.1:8001/api/video/status/ | python3 -m json.tool
|
|
```
|
|
|
|
For single-public-hub mode, do not start the local hub. Point both the host and
|
|
robot `SERVER_ADDR` values at the same public KCP Hub and keep all `relay_via`
|
|
values empty. See `OmniSocketGo_add_camera/NETWORK_LINK_STARTUP_GUIDE.md`.
|