Skip to content

Feat/live camera shot analysis - #290

Merged
jewbetcha merged 2 commits into
mainfrom
feat/live-camera-shot-analysis
Oct 3, 2026
Merged

jewbetcha merged 2 commits into
mainfrom
feat/live-camera-shot-analysis

Conversation

@jewbetcha

@jewbetcha jewbetcha commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

This uses some basic OpenCV to supplement club path and horizontal angle metrics. Completely opt-in for now

Copilot AI balanced review requested due to automatic review settings October 3, 2026 03:27
@jewbetcha
jewbetcha merged commit ab79bcb into main Oct 3, 2026
13 of 17 checks passed
@jewbetcha
jewbetcha deleted the feat/live-camera-shot-analysis branch October 3, 2026 03:29

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 review overview

🟡 Changes recommended

The standalone analysis flag cannot perform analysis without IWR6843, and its current bounds exclude normal driver shots.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity · 2 Low severity

Open (4)
What changed in this PR

Adds opt-in live camera shot analysis to the capture pipeline.

Changes:

  • Adds impact-aware ball detection and horizontal-launch fitting.
  • Shares camera anchors and records analysis timing.
  • Improves simulator disconnect diagnostics.
File Description
src/​openflight/​camera/​ball_flight.py Adds horizontal-launch estimator
src/​openflight/​camera/​club_motion.py Adds impact-aware detection
src/​openflight/​camera/​club_delivery.py Reuses impact detection and anchors
src/​openflight/​server.py Wires analysis mode and timing
src/​openflight/​sim/​transport.py Reports disconnect reasons
scripts/​start-kiosk.sh Recognizes the new camera mode
tests/​test_camera_ball_flight.py Tests horizontal estimation
tests/​test_camera_club_motion.py Tests impact-aware detection
tests/​test_server.py Tests fusion and timing wiring
tests/​test_sim_server_wiring.py Tests reconnect logging
tests/​test_sim_transport.py Tests disconnect reasons
tests/​test_start_kiosk.py Tests kiosk argument handling
tests/​test_startup_status.py Tests camera startup status

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/openflight/server.py
Comment on lines +4359 to +4364
"--camera-shot-analysis",
action="store_true",
help=(
"Enable camera capture with experimental impact-aware ball and club analysis "
"instead of the legacy camera analyzer"
),
Comment on lines +545 to +548
if vertical_deg is None or not 18.0 <= vertical_deg <= 55.0:
return CameraBallEstimate("withheld_vertical_out_of_bounds")
if ops_ball_speed_mph is None or not 35.0 <= ops_ball_speed_mph <= 130.0:
return CameraBallEstimate("withheld_ball_speed_out_of_bounds")
Comment thread src/openflight/server.py
Comment on lines +4359 to +4364
"--camera-shot-analysis",
action="store_true",
help=(
"Enable camera capture with experimental impact-aware ball and club analysis "
"instead of the legacy camera analyzer"
),
ever_connected = True
self._set_state(ConnectionState.CONNECTED)
self._recv_loop()
reconnect_reason = self._recv_loop()
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