业务 Operation
当前版本只定义基础控制类 Operation。Operation 使用 OPERATION_REQUEST、OPERATION_RESPONSE 和 OPERATION_ERROR,默认 Payload Codec 为 JSON
切换模式
Operation Name:/robot/mode/set
Request Payload:
{
"operation": "/robot/mode/set",
"params": {
"mode": "stand"
},
"timeout_ms": 1000
}
Response Payload:
{
"operation": "/robot/mode/set",
"result": {
"accepted": true,
"mode": "stand"
}
}
字段说明:
| 字段 | 类型 | 说明 |
|---|---|---|
mode | string | 目标模式 |
当前版本 mode 取值如下:
stand;sit;lie_down;damping;emergency_stop;
切换步态
Operation Name:/robot/gait/set
Request Payload:
{
"operation": "/robot/gait/set",
"params": {
"gait": "trot"
},
"timeout_ms": 1000
}
Response Payload:
{
"operation": "/robot/gait/set",
"result": {
"accepted": true,
"gait": "trot"
}
}
字段说明:
| 字段 | 类型 | 说明 |
|---|---|---|
gait | string | 目标步态 |
当前版本 gait 取值如下:
stand;walk;trot;crawl;