-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·43 lines (34 loc) · 1.39 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·43 lines (34 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env bash
# Commander setup — macOS / Linux (and Git Bash on Windows).
# ./setup.sh install everything
# ./setup.sh --run install, then start the simulator
set -euo pipefail
cd "$(dirname "$0")"
need() { command -v "$1" >/dev/null 2>&1 || { echo "MISSING: $1 — $2" >&2; exit 1; }; }
need python3 "install Python 3.11+ (https://python.org or your package manager)"
need npm "install Node.js LTS (https://nodejs.org; build-time only, not needed to run)"
echo
echo "[1/3] Python virtual environment + dependencies"
[ -d .venv ] || python3 -m venv .venv
PY=./.venv/bin/python
[ -x "$PY" ] || PY=./.venv/Scripts/python.exe # Windows-layout venv (Git Bash)
"$PY" -m pip install --upgrade pip --quiet
"$PY" -m pip install -r requirements.txt
echo
echo "[2/3] Web GUI (npm install + build)"
(cd gui && npm install --no-fund --no-audit && npm run build)
echo
echo "[3/3] Quick check (test suite)"
"$PY" -m pytest tests/ -q
cat <<EOF
Done. Next steps:
Try it without a robot:
$PY scripts/serve.py --simulate
then open http://127.0.0.1:8800/
With a real robot (close ARC first):
$PY scripts/serve.py --host <robot-ip>
(or set COMMANDER_ROBOT_HOST once and omit --host)
Export your motion library from your ARC project, once:
ARC_PROJECT="path/to/bot.EZB" $PY scripts/export_actions.py
EOF
[ "${1:-}" = "--run" ] && exec "$PY" scripts/serve.py --simulate || true