2.3 KiB
2.3 KiB
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.
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 shellstart-backend.sh: starts Django ASGI withuvicornstart-frontend.sh: starts the Vite dev serverstart-ros-receiver.sh: starts the ROS2udp_teleop_bridgereceiverstart-b-side-omnid.sh: 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
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_VIDEO_PEER_IDOMNI_CONTROL_PEER_ID
Role mapping:
start-backend.shuses theCONTROL_SIDE_*address pairstart-b-side-omnid.shuses theROBOT_SIDE_*address pairstart-ros-receiver.shdefaults to the robot-side address pair, but withtransport=unix_dgramit usually does not need the server address
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"