Control Robot Motion
Send movement, turning, and posture commands to a specified robot.
Endpoint Information
Section titled “Endpoint Information”- Name: Robot motion control
- Description: Moves a robot forward, backward, left, or right, or turns it.
- Method:
POST - Path:
remoteApi/controlDog - Login required: No
- Permission required: Yes
Note: The robot must be in remote-control mode. Sending a road-network target is strongly recommended.
Request Parameters
Section titled “Request Parameters”-
dogCode·String· RequiredRobot code
Example:001 -
type·Integer· RequiredControl type:
1switch between remote-control and task modes;2body movement
Example:2 -
command·Integer· RequiredCommand
Example:2 -
value·String· RequiredCommand value or step size
Example:0.5 -
speed·Integer· OptionalSpeed; defaults to
1. For a Lynx M20, this value may be increased for lateral movement and turning. Use the default value of1for an X30.
Example:1
Command meanings:
Mode Switching
Section titled “Mode Switching”Shared parameters: type = 1, command = 6; speed is not applicable.
value | Description |
|---|---|
1 | Switch to task mode |
2 | Switch to remote-control mode |
Body Movement
Section titled “Body Movement”Shared parameter: type = 2. See the request parameters above for value and speed.
command | Description |
|---|---|
1 | Move forward |
2 | Move backward |
11 | Move left (recommended value: 0.5) |
12 | Move right (recommended value: 0.5) |
3 | Turn left (recommended value: 0.35) |
4 | Turn right (recommended value: 0.35) |
15 | Crouch |
16 | Stand Up |
Request Example
Section titled “Request Example”{ "dogCode": "001", "type": 2, "command": 1, "value": 1, "speed": 1}Response
Section titled “Response”| Field | Type | Example | Description |
|---|---|---|---|
| code | Integer | 200 | Status code |
| success | Boolean | true | Whether the request succeeded |
| msg | String | success | Response message |
Response Example
Section titled “Response Example”{ "success": true, "code": 200, "msg": "success", "data": null}Error Codes
Section titled “Error Codes”| Code | Description |
|---|---|
| 400 | Invalid parameters |
| 401 | Unauthorized |
| 403 | Access denied |
| 404 | Resource not found |
| 500 | Internal server error |