diff --git a/tests/test_config.py b/tests/test_config.py index 59e717a..51c55f1 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -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 # --------------------------------------------------------------------------- diff --git a/tools/run_webots.sh b/tools/run_webots.sh index e1590ea..4d0c19b 100755 --- a/tools/run_webots.sh +++ b/tools/run_webots.sh @@ -90,11 +90,9 @@ fi cp "$SRC" "$DST" -# LiDAR FOV variant. For mecanum the default is 360° because the -# physical-roller proto's passive yaw drift makes the 140° front -# cone unreliable (heading errors push detections out of the -# tracker's world-frame matching gates). Diff defaults to 140° -# matching the canonical ShepherdDog.proto. +# LiDAR FOV variant. Mecanum defaults to 360° (the trained mecanum +# target); diff defaults to 140°. Override with HERDING_LIDAR=140 or +# HERDING_LIDAR=360 for ablations. if [[ -z "${HERDING_LIDAR:-}" ]]; then if [[ "$DRIVE" == "mecanum" ]]; then LIDAR_VARIANT="360" diff --git a/training/rl/train.py b/training/rl/train.py index b4e2aa7..6a466fa 100644 --- a/training/rl/train.py +++ b/training/rl/train.py @@ -279,7 +279,7 @@ def main() -> None: HerdingConfig, HERDING_MEC_WEBOTS_360, DomainRandomConfig, RobotConfig, ) herding_cfg = None - # Mecanum always trains under HERDING_MEC_WEBOTS_360 (360° LiDAR + + # Mecanum trains under HERDING_MEC_WEBOTS_360 (360° LiDAR + # kinematic-matched strafe scaling + small compass-noise DR). is_mecanum = (drive_mode == "mecanum") if is_mecanum or args.fp_rate > 0.0 or args.action_smooth > 0.0 or args.wheel_slip_std > 0.0: