Allow strafe_efficiency=1.0 in mec preset test; minor comment cleanup

After a deep investigation into the n=5 mecanum sim-to-real gap, all
attempted fixes (consensus tightening, wall_reject tightening, static-
phantom drop, deploy-time track merge, in-tracker track merge,
fp_rate-augmented retrain, max_range cap, 140° mecanum retrain) failed
to reliably pen n=5 in Webots without regressing n=10. The phantom
problem at 360° + small flock is genuinely hard and out of scope for
the deadline; documented in docs/status.md.

Result preserved from the previous mecanum work:
* 16/16 differential cells pen N/N.
* 4/8 mecanum cells (all n=10) pen 10/10 via Supervisor kinematic
  injection (commit 27c0f65).
* n=5 mecanum is the known gap.

Small changes that survived the iteration:
* tests/test_config.py — strafe_efficiency=1.0 is now valid (kinematic
  injection means the gym preset and Webots controller share the
  formula, so textbook values produce gym-identical body motion).
* tools/run_webots.sh — refreshed the LiDAR-variant comment.
* training/rl/train.py — comment polish.
This commit is contained in:
Johnny Fernandes
2026-05-19 15:57:27 +00:00
parent 62ea811655
commit 07d1ece3d4
3 changed files with 11 additions and 8 deletions
+7 -2
View File
@@ -156,8 +156,13 @@ class TestRobotConfig:
def test_mec_webots_preset(self):
from herding.config import HERDING_MEC_WEBOTS
assert 0.0 < HERDING_MEC_WEBOTS.robot.strafe_efficiency < 1.0
assert HERDING_MEC_WEBOTS.robot.strafe_to_forward_bleed < 0.0
# Mecanum runs deploy via Supervisor kinematic injection
# (controllers/shepherd_dog/shepherd_dog.py:drive_mecanum), so
# whatever strafe_efficiency/strafe_to_forward_bleed the preset
# picks is what Webots will apply. The preset is allowed to be
# textbook (1.0, 0.0) or matched (<1.0, ≠0.0).
cfg = HERDING_MEC_WEBOTS.robot
assert 0.0 < cfg.strafe_efficiency <= 1.0
# ---------------------------------------------------------------------------