Dev Startup Scripts
This directory lives inside the OmniSocketGo repo and acts as the main launch entry for the whole local setup.
Default layout:
~/Documents/
OmniSocketGo/
scripts/dev/
robot-command-center/
The scripts assume:
OmniSocketGois the current reporobot-command-centeris a sibling directory next to it
If your robot-command-center is elsewhere, set ROBOT_COMMAND_CENTER_ROOT in robot-remote.env.local.
start-backend.sh and start-frontend.sh need that repo; start-ros-receiver.sh and start-b-side-omnid.sh do not.
Files
robot-remote.env: shared defaults for backend, frontend, ROS, andb_side_omnidrobot-remote.env.local: optional local override file loaded afterrobot-remote.envload-env.sh: loads the shared environment into the current shellapply-camera-controls.sh: applies the camera preset beforeb_side_omnidstartsstart-backend.sh: starts Django ASGI withuvicornlog-network-summary.py: polls the backendnetwork/latestAPI and appends compact JSONL snapshotsstart-frontend.sh: starts the Vite dev serverstart-ros-receiver.sh: starts the ROS2udp_teleop_bridgereceiverstart-b-side-omnid.sh: applies camera controls, then starts./bin/b_side_omnidand usessudo -Eby defaultstart-dev-tmux.sh: optional one-commandtmuxlauncher for all four processes
Usage
Run these from the OmniSocketGo repo root:
bash scripts/dev/start-backend.sh
bash scripts/dev/start-frontend.sh
bash scripts/dev/start-ros-receiver.sh
bash scripts/dev/start-b-side-omnid.sh
If you prefer one command and use tmux:
bash scripts/dev/start-dev-tmux.sh
If you only want the shared environment for manual commands:
source scripts/dev/load-env.sh
When you launch via start-*.sh, you do not need to manually export the variables from
robot-remote.env or robot-remote.env.local. load-env.sh loads those files with set -a,
so the variables are exported automatically for the child process. Manual export is only needed
if you bypass these scripts and start binaries directly from a clean shell.
Customizing
Edit scripts/dev/robot-remote.env for shared changes such as:
ROBOT_COMMAND_CENTER_ROOTCONTROL_SIDE_OMNISOCKET_SERVER_ADDRCONTROL_SIDE_OMNISOCKET_RELAY_VIAROBOT_SIDE_OMNISOCKET_SERVER_ADDRROBOT_SIDE_OMNISOCKET_RELAY_VIAVITE_API_BASE_URLOMNI_CAMERA_DEVICEOMNI_CAMERA_PROFILEOMNI_CAMERA_BRIGHTNESSOMNI_CAMERA_CUSTOM_CTRLOMNI_CAMERA_VERIFYOMNI_VIDEO_PEER_IDOMNI_CONTROL_PEER_IDOMNI_VIDEO_SOFT_BACKPRESSURE_SEGMENTSOMNI_VIDEO_HARD_BACKPRESSURE_SEGMENTSOMNI_VIDEO_HARD_BACKPRESSURE_HOLD_MSOMNI_CONTROL_SERVER_IDLE_RECONNECT_MSOMNI_VIDEO_MAX_FRAME_AGE_MSOMNISOCKET_TELEMETRY_PEER_IDOMNISOCKET_TELEMETRY_INTERVAL_MSOMNISOCKET_TELEMETRY_STALE_AFTER_MSOMNI_NETWORK_SUMMARY_LOG_ENABLEDOMNI_NETWORK_SUMMARY_LOG_PATHOMNI_NETWORK_SUMMARY_LOG_INTERVAL_MS
Camera presets use v4l2-ctl from v4l-utils on the robot side.
Role mapping:
start-backend.shuses theCONTROL_SIDE_*address pairstart-b-side-omnid.shuses theROBOT_SIDE_*address pairstart-b-side-omnid.shalso applies theOMNI_CAMERA_*preset before the daemon opens the camerastart-ros-receiver.shdefaults to the robot-side address pair, but withtransport=unix_dgramit usually does not need the server address
New repair knobs:
OMNI_VIDEO_SOFT_BACKPRESSURE_SEGMENTS,OMNI_VIDEO_HARD_BACKPRESSURE_SEGMENTS, andOMNI_VIDEO_HARD_BACKPRESSURE_HOLD_MSare used byb_side_omnidOMNI_CONTROL_SERVER_IDLE_RECONNECT_MSis used byb_side_omnidOMNI_VIDEO_MAX_FRAME_AGE_MSis used bystart-backend.shon the A-side backend, not byb_side_omnidOMNISOCKET_TELEMETRY_INTERVAL_MSandOMNISOCKET_TELEMETRY_STALE_AFTER_MStune the backend's D-side telemetry freshness windowOMNI_NETWORK_SUMMARY_LOG_*controls the A-side JSONL summary logger that pollsGET /api/network/latest/
Default long-run network logging:
- A-side starts a compact JSONL logger by default at
${OMNISOCKETGO_ROOT}/logs/a-network-summary.jsonl - The default A-side polling interval is
2000 ms - For D-side long runs, prefer:
./bin/kcpserver -listen 0.0.0.0:10909 \
-telemetry-peer peer-a-telemetry \
-telemetry-interval 1000ms \
-kcp-session-stats-log logs/d-kcp-stats.jsonl \
-kcp-session-stats-interval 1000ms
- Keep
-latency-logand-kcp-ts-debug-logoff by default for multi-hour runs - Do not continuously redirect relay
Cstderr to a file unless you are reproducing a short issue window
Put machine-specific overrides into scripts/dev/robot-remote.env.local. Example:
ROBOT_COMMAND_CENTER_ROOT="$HOME/Documents/robot-command-center"
OMNI_CAMERA_DEVICE="/dev/video30"
B_SIDE_OMNID_USE_SUDO="0"
OMNI_NETWORK_SUMMARY_LOG_INTERVAL_MS="5000"
Default camera behavior is the night preset:
OMNI_CAMERA_PROFILE="night"
# Optional per-machine tweak:
OMNI_CAMERA_BRIGHTNESS="8"
To switch to a daytime preset with brightness only:
OMNI_CAMERA_PROFILE="day"
OMNI_CAMERA_BRIGHTNESS="8"
To send the raw v4l2-ctl --set-ctrl=... payload yourself:
OMNI_CAMERA_PROFILE="custom"
OMNI_CAMERA_CUSTOM_CTRL="brightness=8,auto_exposure=1,exposure_time_absolute=800,gain=64"
OMNI_CAMERA_VERIFY="1"