feat: ball-obscured recovery for single-camera exhibition#130
Open
isaac0804 wants to merge 2 commits into
Open
feat: ball-obscured recovery for single-camera exhibition#130isaac0804 wants to merge 2 commits into
isaac0804 wants to merge 2 commits into
Conversation
When the ball has been missing from vision for 5 seconds during active play (NORMAL_START/FORCE_START), the state machine issues BALL_OBSCURED. Robots scatter east/west along the x-axis to clear the camera's north-south line of sight. Once the ball reappears and is debounced for 0.5s with a friendly robot within 0.25m, the state machine auto-advances to FORCE_START. Camera is at (0, -1.125 - delta) south of the field, so x-axis scatter always clears the north-south occlusion axis regardless of ball position.
Default is False so existing profiles and tests are unaffected. Set to True in gefr.py for the single-camera exhibition.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BALL_OBSCURED = 18toRefereeCommandenumball_obscured_recovery: bool = FalsetoAutoAdvanceConfig(opt-in, off by default)BALL_OBSCUREDwhengame.ball is Nonefor 5 s duringNORMAL_START/FORCE_START, then auto-advances back toFORCE_STARTonce ball is visible for 0.5 s debounce and a friendly robot is within 0.25 mBallObscuredStepreferee override node: scatter phase moves robots east/west along x-axis (±40% field length) to clear the camera's north-south line of sight; approach phase routes the closest robot toball_pos + (0, 0.3 m)from the north while others holdMotivation
Single-camera setup at Great Exhibition Field has the camera at
(0, -1.125 - δ)(south). A robot standing north of the ball occludes it from the camera. This recovery loop clears the sightline automatically during active play without operator intervention.Configuration
Enable per-profile via
AutoAdvanceConfig(ball_obscured_recovery=True). Off by default so simulation and multi-camera profiles are unaffected. The GEFR exhibition profile (in Utama-Strategy) sets this toTrue.Test plan
test_has_twelve_children/test_ball_obscured_is_second/test_stop_is_thirdupdated for new tree structureFORCE_START, observe scatter → approach → resume🤖 Generated with Claude Code