Mecanum Webots via Supervisor kinematic injection

Replace the failing ODE-rolled mecanum chassis dynamics with a
Supervisor.setVelocity call that uses the gym mecanum forward
kinematics formula directly. Wheel motors still spin (visual);
chassis motion comes from the gym model so training and deployment
match by construction.

Results (seed=42, n=10 sheep): BC + RL mecanum pen 10/10 in both
field and field_round. n=5 mecanum cells still 0/5 due to tracker
phantoms anchored to wall corners under the 360° LiDAR — documented
in docs/status.md as the remaining gap.

Cleanup: drop deploy-time hacks (HERDING_HEADING_*, HERDING_OMEGA_CLAMP,
HERDING_TRACKER_*) that were workarounds for the old ODE chaos;
revert the proto inertiaMatrix, roller dampingConstant, and reduced
motor torque since they no longer carry load; refresh comments
around the mecanum config presets.
This commit is contained in:
Johnny Fernandes
2026-05-18 22:46:37 +00:00
parent 1df84ae4b5
commit 27c0f65722
25 changed files with 2635 additions and 76 deletions
+6 -1
View File
@@ -9,7 +9,7 @@ PROTO ShepherdDogMecanum [
field SFString controller "shepherd_dog"
field MFString controllerArgs []
field SFString customData ""
field SFBool supervisor FALSE
field SFBool supervisor TRUE
field SFBool synchronization TRUE
]
{
@@ -1993,6 +1993,7 @@ PROTO ShepherdDogMecanum [
}
}
# ========== IMU SENSORS ==========
Accelerometer {
translation 0 0 0.10
@@ -2052,6 +2053,10 @@ PROTO ShepherdDogMecanum [
}
# ========== PHYSICS ==========
# Chassis dynamics are not exercised in herding runs the
# controller drives the body kinematically via Supervisor
# setVelocity (see drive_mecanum in controllers/shepherd_dog).
# Webots-derived inertia from the bounding box is sufficient.
physics Physics {
density -1
mass 5.0
File diff suppressed because it is too large Load Diff