콘텐츠로 이동

로봇 제어

일시정지/재개/중지, 도어 안전 모드를 제어합니다.


제어 명령

엔드포인트 설명
POST /api/v1/action/robot/status/pause 일시정지
POST /api/v1/action/robot/status/resume 재개
POST /api/v1/action/robot/status/stop 중지
POST /api/v1/action/robot/status/reset 리셋

도어 안전 모드

POST /api/v1/action/robot/interlock

도어 센서와 연동해 문이 열리면 로봇을 자동으로 일시정지하고, 닫히면 재개합니다.

요청 본문
{ "enabled": true }
# 활성화
curl -X POST http://localhost:7777/api/v1/action/robot/interlock \
  -H "Content-Type: application/json" -d '{"enabled": true}'

# 비활성화
curl -X POST http://localhost:7777/api/v1/action/robot/interlock \
  -H "Content-Type: application/json" -d '{"enabled": false}'

도어 안전 모드를 켜면(enabled: true) 이후에는 도어 센서 상태에 따라 로봇이 자동으로 일시정지·재개됩니다. 별도 제어 없이 GET /api/v1/action/robot/status로 현재 상태를 확인할 수 있으며, 응답의 interlock.is_active가 작동 여부를, is_paused가 일시정지 여부를 나타냅니다.

문이 열리면 안전 모드가 작동하고(is_active: true) 로봇이 자동으로 일시정지됩니다. 문이 다시 닫힐 때까지 동작 API는 대기합니다.

GET /api/v1/action/robot/status 응답 (data)
{
  "status": "paused",
  "is_paused": true,
  "interlock": { "enabled": true, "is_active": true }
}

문이 닫히면 안전 모드 작동이 해제되고(is_active: false) 로봇이 자동으로 재개됩니다.

GET /api/v1/action/robot/status 응답 (data)
{
  "status": "ready",
  "is_paused": false,
  "interlock": { "enabled": true, "is_active": false }
}