Repository navigation
fix(analysis): idle 복귀 시 궤적 소실 — 배치 분석 결과가 통째로 날아감 - #46
Merged
Merged
Conversation
같은 영상·같은 검출(73/210)인데 실기기 두 회차 결과가 37포인트 / 0포인트로 갈렸다. 차이는 임팩트 도달 여부였다. FSM은 실시간 세션용이라 settle→idle에서 다음 투구를 위해 궤적을 비운다. 2회차는 임팩트에 도달해 impact(30)+settle(60)을 거쳐 frame 209에서 idle로 복귀했고, 그 시점에 _trajectory.clear()가 실행됐다. 파이프라인은 전 프레임을 먹인 **뒤에** trajectory를 읽는 배치 사용자라 빈 리스트를 받았고, 궤적·구속·리본이 전부 무너졌다. [analysis_state_machine] - _completedTrajectory 추가. settle→idle에서 진행분은 비우되(실시간 오버레이가 지난 투구 선을 계속 그리지 않게) 완주분은 보존 - trajectory 게터는 진행분이 없으면 완주분을 준다 - reset()은 둘 다 비운다 [테스트] - 임팩트 후 100프레임을 더 먹여 idle 복귀시켜도 궤적 길이가 유지되는지 검증하는 회귀 테스트
devpark435
marked this pull request as ready for review
August 3, 2026 06:30
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.
증상
같은 영상, 같은 검출 결과인데 실기기 두 회차가 갈렸다.
원인
analysis_state_machine.dart_handleSettle:FSM은 실시간 세션용이라 settle→idle에서 다음 투구를 위해 궤적을 비운다. 2회차는 임팩트에 도달해 impact(30프레임) + settle(60프레임)을 거쳐 frame 209 — 영상 마지막 프레임 — 에서 idle로 복귀했고 궤적이 통째로 지워졌다.
그런데
AnalysisPipeline은 전 프레임을 다 먹인 뒤에fsm.trajectory를 읽는 배치 사용자다. 결국 빈 리스트를 받아 궤적·리본·구속이 전부 무너졌다.즉 "임팩트를 제대로 감지할수록 결과가 사라지는" 구조였다.
수정
_completedTrajectory추가. settle→idle에서 진행분은 비우되(실시간 오버레이가 지난 투구 선을 계속 그리지 않도록) 완주분은 보존trajectory게터는 진행분이 비어 있으면 완주분을 반환reset()은 둘 다 비움검증
flutter test test/features/analysis— 214 passedflutter analyze lib/features/analysis/— 신규 이슈 0