Claude에서 열기ChatGPT에서 열기
https://rainbowrobotics.github.io/RBQ/nightly/llms-full.txt 는 Rainbow Robotics RBQ 4족 로봇 매뉴얼 전문입니다. 읽고 이 문서를 근거로 한국어로 답변해 주세요.
AI 답변은 부정확할 수 있습니다. 안전·정비 항목은 매뉴얼 원문을 확인하세요.
한국어
https://rainbowrobotics.github.io/RBQ/nightly/llms-full.txt 는 Rainbow Robotics RBQ 4족 로봇 매뉴얼 전문입니다. 읽고 이 문서를 근거로 한국어로 답변해 주세요.
AI 답변은 부정확할 수 있습니다. 안전·정비 항목은 매뉴얼 원문을 확인하세요.
한국어
소스: rbq_sdk/python/example/sport/rbq_sport_client.py
C++의 rbq_sport_client를 Python으로 포팅한 버전입니다.
SportClient 명령을 하나씩 로봇에 전송하는 터미널 기반 대화형 애플리케이션으로 50 Hz로 동작합니다.
단일 메인 루프:
stdin에서 한 줄 입력 받기 (list, 명령 이름, 또는 명령 ID).TestOption 업데이트.SportClient 메서드 호출.rbq_sdk_py 설치 완료 — Python SDK 개요 참조.python3 rbq_sport_client.py [networkInterface]
# 시뮬레이터 / 로봇 내부 스택 — 인터페이스 기본값은 lo
python3 rbq_sport_client.py
# 실제 로봇 — 로봇에 닿는 인터페이스를 넘깁니다
python3 rbq_sport_client.py eth0프롬프트에서 list를 입력하면 전체 명령 목록이 출력됩니다.
| ID | 이름 | 호출되는 SportClient 메서드 |
|---|---|---|
| 0 | damp | Damp() |
| 1 | balance_stand | BalanceStand() |
| 2 | stop_move | StopMove() |
| 3 | stand_down | StandDown() |
| 4 | recovery_stand | RecoveryStand() |
| 5 | move | Move(0.0, 0.0, 0.5) — 제자리 회전 |
| 6 | switch_gait | SwitchGait(0) |
| 8 | get_state | GetState() — FSM ID, 이름, 속도 레벨, 자동 복구, 프로세스 상태 출력 |
| 11 | stand_up | StandUp() |
| 12 | enter_leftside_gait | LeftSideGait(1) |
| 13 | exit_leftside_gait | LeftSideGait(0) |
예제의
list에는 로봇이 구현하지 않은 명령도 함께 나옵니다 — 그 명령들은 "미구현" 오류를 돌려줍니다. 실제로 쓸 수 있는 것은 위 표에 있는 것뿐입니다.
$ python3 rbq_sport_client.py eth0
Input "list " to list all test option ...
balance_stand
Test: balance_stand, test_id: 1
Request successed: balance_stand, code: 0
move
Test: move, test_id: 5
Request successed: move, code: 0SetTimeout(25.0): Python SportClient는 25초 타임아웃을 명시적으로 설정합니다 — GetState 같은 RPC 스타일 호출에 필요합니다.time.sleep(max(0.0, next_tick - time.monotonic()))으로 정확한 루프 타이밍 구현.get_state 응답: fsm_id, fsm_name, speed_level, auto_recovery_switch, process_state 키를 가진 딕셔너리를 반환합니다.| 항목 | C++ | Python |
|---|---|---|
| 타임아웃 | 기본값 | SetTimeout(25.0) 명시 |
ConvertToInt 실패 시 | -1 반환 | None 반환 (ID 0과의 오매칭 없음) |
| 터미널 입력 | std::getline 블로킹 | input() 블로킹 |