Skip to content

feat: ball-obscured recovery for single-camera exhibition#130

Open
isaac0804 wants to merge 2 commits into
mainfrom
feat/ball-obscured-recovery
Open

feat: ball-obscured recovery for single-camera exhibition#130
isaac0804 wants to merge 2 commits into
mainfrom
feat/ball-obscured-recovery

Conversation

@isaac0804

Copy link
Copy Markdown
Contributor

Summary

  • Adds BALL_OBSCURED = 18 to RefereeCommand enum
  • Adds ball_obscured_recovery: bool = False to AutoAdvanceConfig (opt-in, off by default)
  • State machine auto-issues BALL_OBSCURED when game.ball is None for 5 s during NORMAL_START/FORCE_START, then auto-advances back to FORCE_START once ball is visible for 0.5 s debounce and a friendly robot is within 0.25 m
  • New BallObscuredStep referee 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 to ball_pos + (0, 0.3 m) from the north while others hold

Motivation

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 to True.

Test plan

  • All 457 existing tests pass
  • test_has_twelve_children / test_ball_obscured_is_second / test_stop_is_third updated for new tree structure
  • Manual rsim test: hide ball for >5 s during FORCE_START, observe scatter → approach → resume

🤖 Generated with Claude Code

isaac0804 added 2 commits June 4, 2026 19:06
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.
Copilot AI review requested due to automatic review settings June 4, 2026 18:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

2 participants