Interactive Webots launcher (tools/webots_menu.sh)

Single-command picker that prompts for every experimental knob the
project supports, then dispatches to `tools/run_webots.sh` with the
matching env vars. The banner reminds the user that the interpreter
path lives in `tools/setup_env.sh` (or `$HERDING_PYTHON`) so the
"this conda path won't exist on another machine" trap is hard to
fall into.

Prompts, in order:
  Mode          : bc | rl | strombom | sequential | universal
  Drive         : differential | mecanum
  World         : field | field_round
  LiDAR FOV     : 140° | 360°  (skipped when drive=mecanum)
  Dogs          : 1 | 2 (axis-split — only ask leak if 2)
  Sheep         : 1..10
  Perception    : LiDAR | GT bypass
  Headless      : no (windowed) | yes (xvfb-run + fast mode)

Each prompt has a default marked with `*`; pressing Enter through the
whole flow runs the canonical demo (BC / diff / field / 140° /
1 dog / 5 sheep / LiDAR / windowed). The configuration is summarised
in a boxed block before the final "Launch? [Y/n]" confirm.

README quick-start now lists `tools/webots_menu.sh` as the
recommended starting point and shows the env-var-prefixed launcher
invocations (HERDING_LIDAR=360, HERDING_NDOGS=2, HERDING_USE_GT=1)
for non-interactive use.

126 pytest cases still pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Johnny Fernandes
2026-05-17 02:49:06 +00:00
parent eadeeafb32
commit bdaff6a3e1
2 changed files with 196 additions and 3 deletions
+12 -3
View File
@@ -67,15 +67,24 @@ make DRIVE=differential WORLD=field bc # behaviour clone
make DRIVE=differential WORLD=field rl # KL-PPO fine-tune
make DRIVE=differential WORLD=field eval # 10-seed env eval
# 4. Run in Webots
# 4. Run in Webots — interactive picker (recommended starting point)
tools/webots_menu.sh
# Prompts for mode / drive / world / LiDAR FOV / number of dogs /
# flock size / perception (LiDAR vs GT) / headless, then dispatches.
# Or invoke the launcher directly:
tools/run_webots.sh 10 bc differential field # BC, diff, rect field
tools/run_webots.sh 10 rl differential field_round # RL, diff, round field
tools/run_webots.sh 5 strombom differential field # analytic baseline
HERDING_USE_GT=1 tools/run_webots.sh 5 strombom differential field
# GT bypass for ablation
# GT bypass ablation
HERDING_LIDAR=360 tools/run_webots.sh 5 bc differential field
# 360° FOV ablation
HERDING_NDOGS=2 HERDING_AXIS_LEAK=0.3 tools/run_webots.sh 5 strombom differential field
# dual-shepherd axis split
```
`make help` lists every target and the overridable hyperparameters.
`make help` lists every Makefile target and the overridable hyperparameters.
**Mecanum note**: the `ShepherdDogMecanum.proto` uses physical roller
hinges in Webots. The Webots calibration shows ~60% strafe efficiency