Skip to content

Autonomous: Size the default geofence to hold every gate course - #234

Merged
GrayM8 merged 1 commit into
mainfrom
gray/geofence-size
Nov 8, 2026
Merged

GrayM8 merged 1 commit into
mainfrom
gray/geofence-size

Conversation

@GrayM8

@GrayM8 GrayM8 commented Nov 8, 2026

Copy link
Copy Markdown
Member

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:

Course Reach Inside 150 m with 20 m to spare?
extreme_500m (#218) 183.7 m No
Acceleration 152.2 m No
rules_autocross, worst of seeds 1 to 1000 147.4 m (seed 471) No
rules_autocross seeds 1 to 5 (the gate's) 68.1 to 144.0 m Seeds 2, 3 no
Other extreme scenarios (#218) 57.9 to 82.5 m Yes
AMZ FSG, FSI (#223) 78.8, 51.5 m Yes
Skidpad (#137) 50.9 m Yes
MVP autocross seeds 1 to 5 47.4 to 50.8 m Yes

What changed

Testing

On red-mesa:

Closes #229

@GrayM8
GrayM8 requested a review from a team as a code owner November 8, 2026 17:51
@coderabbitai

coderabbitai Bot commented Nov 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Ignore keyword(s) in the title.

⛔ Ignored keywords: 1

  • Autonomous:

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@lhre-ultron

lhre-ultron Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

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 checked

Checked: I read the full diff and the PR-head monitors.py. Its geofence uses hypot(x − origin_x, y − origin_y) > geofence_radius_m from the pose captured at arming (anchor_geofence), so the radius is in metres around the arming pose. The test_geofence_reach.py arithmetic holds: 250 + 20 ≤ 300, and the PR's measured worst reaches (184 m, 152 m, 147 m) plus the 20 m margin all stay under 300 m. _compute_spawn exists in generate_world.py with the (left, right) signature the test calls. The launch default and the SafetyConfig default now agree at 300 m.

Didn't check:

  • I didn't run colcon, pytest, Gazebo or the fault matrix. The pinned /repos/lhre commit has no lhr_safety package, so I couldn't compare against the base or look for other places that hard-code 150.
  • I couldn't confirm that the real-car launch passes the surveyed boundary rather than relying on this default.
  • I didn't confirm that every .sdf in worlds/ names its vehicle fsae_vehicle and its cones cone_*. If a world doesn't, the test fails loudly on its assert rather than passing silently.

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

@GrayM8
GrayM8 merged commit 539ee55 into main Nov 8, 2026
12 checks passed
@GrayM8
GrayM8 deleted the gray/geofence-size branch November 8, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Autonomous: Size the safety geofence to fit every gate course

1 participant