Skip to content

feat(ops): 명령값 대 실측 이동 데이터셋 내보내기 (#102) - #115

Merged
exijn merged 1 commit into
developfrom
feature/102-motion-dataset-export
Nov 10, 2026
Merged

exijn merged 1 commit into
developfrom
feature/102-motion-dataset-export

Conversation

@exijn

@exijn exijn commented Nov 10, 2026

Copy link
Copy Markdown
Member

Part of #102 (실제 데이터 수집은 #99 실측 이후)

변경

  • scripts/motion_dataset_export.py: journalctl -o cat 형식(접두어 허용) JSON 로그에서 execution_physical_turn_finished(MOVE·TURN)를 실행별 motion_index 로 정리, 현장 실측 CSV(실행 ID 앞 8자 또는 전체)와 결합. 단위(m/deg), 명령 속도, 계획·실제 시간, StopMove 성공 수, 상태, feat(physical): MOVE·TURN을 sportmodestate 기반 폐루프로 전환 (r11) #97 achieved_magnitude(있으면), 오차, 바닥 종류 포함. 실측 누락은 missing_measurement=1 로 보존.
  • docs/motion-dataset.md: 형식·개인정보 규칙(데이터셋은 git 에 넣지 않음).
  • 오프라인 변환만 하며 로봇·서비스·Agent 런타임 변경 없음.

검증

harness, ruff, ruff format, mypy, pytest(신규 5, 합성 로그), mypy --strict 스크립트 통과.

🤖 Generated with Claude Code

- scripts/motion_dataset_export.py: Agent JSON 로그의 MOVE·TURN 종료 이벤트를 실행별 순번으로 묶고
  현장 실측 CSV 와 결합해 CSV 출력, 실측 누락 행은 missing_measurement=1 로 유지
- docs/motion-dataset.md: 입력·출력 형식, 단위, 개인정보 규칙
- 합성 로그 테스트

Part of #102

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@exijn exijn added the ai-model POPPY ai-model label Nov 10, 2026
@exijn
exijn merged commit 38d914c into develop Nov 10, 2026
1 check passed
@exijn
exijn deleted the feature/102-motion-dataset-export branch November 10, 2026 12:01

@inryeok-bot inryeok-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

리뷰 결과

변경된 3개 파일을 검토했습니다. 인라인 관찰 2개를 게시했습니다.

심각도 개수
치명적 0
높음 1
중간 1
낮음 0

유형: 필수 수정 1, 수정 권장 1, 제안 0, 확인 질문 0, 좋았던 점 0

주요 관찰

  • 필수 수정 · HIGH 전체 실행 ID도 8자로 잘라 서로 다른 실행을 합칩니다
  • 수정 권장 · MEDIUM 잘못된 측정값을 정상 측정으로 표시한 채 통과시킵니다

검토한 head: e7db50e93465 · 최신 head는 /review로 검토하세요.

"achieved": context.get("achieved_magnitude", ""),
}
)
return rows

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 필수 수정 · HIGH

전체 실행 ID도 8자로 잘라 서로 다른 실행을 합칩니다

측정 CSV가 전체 UUID를 제공해도 키를 앞 8자로 축약합니다. 같은 접두사를 가진 두 실행의 동일한 motion_index가 있으면 뒤에서 읽은 측정값이 앞선 값을 덮어쓰고, 조인 시 두 실행 모두 같은 측정값을 받습니다. 전체 ID는 그대로 매칭하고, 짧은 ID는 유일성이 확인될 때만 해석해야 합니다.

이유: UUID 접두사 충돌은 데이터가 누적될수록 현실적인 위험이며, 결과 CSV만 보고는 잘못된 연결을 판별하기 어렵습니다.

제안: 전체 ID 보존과 짧은 ID의 유일성 검증을 구현하고, 접두사 충돌 테스트를 추가하세요.

out["measured"] = value
try:
out["error"] = round(float(value) - float(str(row["commanded"])), 4)
except ValueError:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔷 수정 권장 · MEDIUM

잘못된 측정값을 정상 측정으로 표시한 채 통과시킵니다

measured가 비어 있지 않지만 숫자가 아니면 변환 오류를 삼키고 error만 빈칸으로 둔 뒤 missing_measurement=0으로 기록합니다. 그 결과 손상된 실측 문자열이 정상 라벨처럼 데이터셋에 남습니다. 비유한값(NaN, Infinity)도 현재 검사를 통과할 수 있습니다.

이유: 학습용 CSV에서는 입력 오류를 조용히 정상 데이터로 분류하는 것이 단순한 표시 문제보다 큰 데이터 품질 위험입니다.

제안: 유한 숫자 검증과 실패 동작을 명확히 하고, 비숫자 및 NaN/Infinity 입력 테스트를 추가하세요.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-model POPPY ai-model

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant