Files
SkillFactory/demo_gui.sh
T

21 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Genuine live four-skill Kit demo; explicit fresh bounded session, no training.
set -euo pipefail
ROOT=$(cd -- "$(dirname -- "$0")" && pwd)
: "${DISPLAY:?A local graphical DISPLAY is required for the real Kit window}"
OUT=${SKILL_DEMO_OUTPUT:-$(mktemp -d "${TMPDIR:-/tmp}/go2-fl-four-skills.XXXXXXXX")}
mkdir -p "$OUT"
CONTROLLER=${SKILL_CONTROLLER:-trained}
CHECKPOINT=${SKILL_CHECKPOINT:-"$ROOT/releases/go2_fl_four_skills-0.5.0/weights.pt"}
ARGS=(gui --new-session "$OUT/session" --name demo --controller "$CONTROLLER"
--tier "${SKILL_TIER:-small}" --sequence "${SKILL_SEQUENCE:-0}" --loops 5)
if [[ "$CONTROLLER" == trained ]]; then
[[ -f "$CHECKPOINT" ]] || { echo "Frozen0.5.0 weights not found: $CHECKPOINT" >&2; exit 2; }
ARGS+=(--checkpoint "$CHECKPOINT")
fi
if [[ -n ${SKILL_STOP_SKILL:-} ]]; then ARGS+=(--stop-skill "$SKILL_STOP_SKILL"); fi
echo "Go2 FL four skills0.5.0 | $CONTROLLER | real Kit window and original-speed recording"
echo "Output: $OUT/session/demo"
echo "SAFE STOP plants then supports; closing while active=ABORT. Not1x real-time physics."
/usr/bin/python3.12 "$ROOT/scripts/four_skills.py" "${ARGS[@]}"