Skip to content

로봇 원격 제어 API: /control/status·start·estop·resume·stop - #2

Merged
16bit-16 merged 1 commit into
mainfrom
feat/robot-control
Oct 9, 2026
Merged

16bit-16 merged 1 commit into
mainfrom
feat/robot-control

Conversation

@16bit-16

@16bit-16 16bit-16 commented Oct 9, 2026

Copy link
Copy Markdown
Member

Closes #1

내용

  • app/control.py: /control/* 를 로봇 미션 프로그램(ROBOT_CONTROL_URL, 기본 http://host.docker.internal:8765)으로 넘긴다
  • 토큰은 /ingest 와 같은 INGEST_TOKEN — 브라우저에는 안 나간다
  • 로봇 프로그램이 안 떠 있으면 503, 토큰 불일치 502, 지금 못 하는 명령(실행 중 start 등)은 로봇 응답 ok:false 그대로
  • docker-compose.yml, .env.example 에 ROBOT_CONTROL_URL, README 엔드포인트 표·설명
엔드포인트 동작
GET /control/status {state, error, index, placed, results}
POST /control/start {"apples": 5 | "all"}
POST /control/estop 그 자리 정지 → 쥔 사과 되돌림 → 팔 내림 → 모터 정지
POST /control/resume 해제 → 멈춘 사과부터 이어서
POST /control/stop 지금 사과까지만

확인

  • deploy/smoke_test.py 통과 (server-api 이미지)
  • 테스트 서버(MOCK) ↔ Piper SIM --serve: start → estop → resume → done, 실행 중 start 거부, 로봇 프로그램 꺼졌을 때 503

⚠ 프론트: 비상정지 해제 순간 모터 전원이 잠깐 빠져 팔이 처질 수 있으니 확인창을 띄울 것

🤖 Generated with Claude Code

https://claude.ai/code/session_01QCw5M4UMcCL2GHhDe1picB

프론트의 시작·비상정지·해제 버튼용. 로봇 PC 의 미션 프로그램(Piper `mission.py --serve`, :8765)으로
그대로 넘긴다. 로봇 주소는 ROBOT_CONTROL_URL, 토큰은 INGEST_TOKEN 을 같이 써서 브라우저에 나가지 않는다.
로봇 프로그램이 안 떠 있으면 503, 토큰 불일치 502, 지금 못 하는 명령은 로봇 응답(ok:false) 그대로.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QCw5M4UMcCL2GHhDe1picB
@16bit-16
16bit-16 merged commit 0552231 into main Oct 9, 2026
2 checks passed
@abcb-s
abcb-s deleted the feat/robot-control branch October 9, 2026 22:57
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.

프론트에서 로봇 미션 시작·비상정지·해제를 할 수 있는 API

1 participant