Repository navigation
Autonomous: Size the default geofence to hold every gate course - #234
Conversation
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords: 1
Please check the settings in the CodeRabbit UI or the
|
|
Safe to merge. I found no bugs in the 150 m → 300 m change, and the test is consistent with the code it calls. I only partly read the callers, and I ran nothing. What I checkedChecked: I read the full diff and the PR-head Didn't check:
Assumed: The PR's measured reach table is correct. The half-lap bound holds for closed loops. The default is sim-only, as the description says. Ultron reviewed 95453be · it re-reviews on new pushes |
The safety geofence default goes from 150 m to 300 m, so one fence holds every gate course and the gate keeps identical parameters for every run. At 150 m, the 500 m extreme scenario (#218) couldn't pass at all, and acceleration's braking zone ended 2 m outside the fence.
Why 300 m
No point on a closed course is farther from the start than half its lap, and the rules checker caps laps at 500 m. So any course it accepts stays within about 250 m of spawn. Acceleration reaches 152 m with its braking zone. 300 m covers both with margin, without measuring each course. The real car still gets the surveyed venue boundary.
Farthest cone from spawn, measured:
extreme_500m(#218)rules_autocross, worst of seeds 1 to 1000rules_autocrossseeds 1 to 5 (the gate's)What changed
SafetyConfig.geofence_radius_mand the Gazebo launch default: both now 300 m. The existingtest_safety_launch.pyalready checks that the two agree.test_geofence_reach.py(new) fails on any gate course that comes within 20 m of the fence. It checks every committed world inlhr_gazebo/worlds, generatedrules_autocrossseeds 1 to 200, and the half-lap bound for a 500 m lap. The 20 m covers the estimate the fence trips on, the car's length and drift at arming. Worlds that Autonomous: Add fixed extreme autocross scenarios #218, Autonomous: import real competition track layouts #223 and Autonomous: Add skidpad generation, geometry fitting, and ordered route following #137 add get checked automatically once they land.lhr_safety's README now gives the default and why, plus the parameter table inros2/README.mdand the gaps list in the pass criteria.Testing
On red-mesa:
colcon testforlhr_safetyandlhr_gazebo: 320 tests, 0 failures.test_geofence_reach.pywith Autonomous: Add fixed extreme autocross scenarios #218's seven extreme worlds, Autonomous: import real competition track layouts #223's AMZ layouts and Autonomous: Add skidpad generation, geometry fitting, and ordered route following #137's skidpad copied in uncommitted: all 19 pass.geofencecase, which shrinks the fence to 20 m, is still caught: 0.05 s, stop 1.83 m against the 3.36 m formula limit.mkdocs build --strictpasses.Closes #229