Commands Navigation
Total endpoints: 9
Example base URL: https://<ROBOT_IP>/rest
Required access for this section: USER
Get Ar Control Flag
- Endpoint:
/api/v2/commands/get_ar_control_flag/ - Function: Execute the
get_ar_control_flagcommand through the v2 command bridge. - Method:
POST - Parameters: none
- Shell Command:
curl -X POST "https://<ROBOT_IP>/rest/api/v2/commands/get_ar_control_flag/" \
-H "Authorization: Bearer <token>"
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/commands/get_ar_control_flag/"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers, timeout=10)
print(response.status_code)
print(response.json())
- Response Example (
200):
Note: Payload depends on the executed command.
Go To Absolute
- Endpoint:
/api/v2/commands/go_to_absolute/ - Function: Execute the
go_to_absolutecommand through the v2 command bridge. - Method:
POST - Parameters:
payload(body,CoordinatesValuePayload)- Shell Command:
curl -X POST "https://<ROBOT_IP>/rest/api/v2/commands/go_to_absolute/" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"value": {"x": 1.0, "y": 1.0, "z": 1.0, "theta": 1.0}}'
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/commands/go_to_absolute/"
headers = {"Authorization": "Bearer <token>"}
json_payload = {'value': {'x': 1.0, 'y': 1.0, 'z': 1.0, 'theta': 1.0}}
response = requests.post(url, headers=headers, json=json_payload, timeout=10)
print(response.status_code)
print(response.json())
- Response Example (
200):
{
"command": {
"command": "go_to_absolute",
"value": {
"x": 1.0,
"y": 1.0,
"z": 1.0,
"theta": 1.0
}
},
"result": "value"
}
Note: Payload depends on the executed command.
Go To Relative
- Endpoint:
/api/v2/commands/go_to_relative/ - Function: Execute the
go_to_relativecommand through the v2 command bridge. - Method:
POST - Parameters:
payload(body,CoordinatesValuePayload)- Shell Command:
curl -X POST "https://<ROBOT_IP>/rest/api/v2/commands/go_to_relative/" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"value": {"x": 1.0, "y": 1.0, "z": 1.0, "theta": 1.0}}'
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/commands/go_to_relative/"
headers = {"Authorization": "Bearer <token>"}
json_payload = {'value': {'x': 1.0, 'y': 1.0, 'z': 1.0, 'theta': 1.0}}
response = requests.post(url, headers=headers, json=json_payload, timeout=10)
print(response.status_code)
print(response.json())
- Response Example (
200):
{
"command": {
"command": "go_to_relative",
"value": {
"x": 1.0,
"y": 1.0,
"z": 1.0,
"theta": 1.0
}
},
"result": "value"
}
Note: Payload depends on the executed command.
Set Ar Control Flag
- Endpoint:
/api/v2/commands/set_ar_control_flag/ - Function: Execute the
set_ar_control_flagcommand through the v2 command bridge. - Method:
POST - Parameters:
payload(body,BoolValuePayload)- Shell Command:
curl -X POST "https://<ROBOT_IP>/rest/api/v2/commands/set_ar_control_flag/" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"value": true}'
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/commands/set_ar_control_flag/"
headers = {"Authorization": "Bearer <token>"}
json_payload = {'value': True}
response = requests.post(url, headers=headers, json=json_payload, timeout=10)
print(response.status_code)
print(response.json())
- Response Example (
200):
Note: Payload depends on the executed command.
Set Obstacle Avoidance
- Endpoint:
/api/v2/commands/set_obstacle_avoidance/ - Function: Execute the
set_obstacle_avoidancecommand through the v2 command bridge. - Method:
POST - Parameters:
payload(body,BoolValuePayload)- Shell Command:
curl -X POST "https://<ROBOT_IP>/rest/api/v2/commands/set_obstacle_avoidance/" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"value": true}'
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/commands/set_obstacle_avoidance/"
headers = {"Authorization": "Bearer <token>"}
json_payload = {'value': True}
response = requests.post(url, headers=headers, json=json_payload, timeout=10)
print(response.status_code)
print(response.json())
- Response Example (
200):
Note: Payload depends on the executed command.
Set Robot Max Velocity
- Endpoint:
/api/v2/commands/set_robot_max_velocity/ - Function: Execute the
set_robot_max_velocitycommand through the v2 command bridge. - Method:
POST - Parameters:
payload(body,FloatValuePayload)- Shell Command:
curl -X POST "https://<ROBOT_IP>/rest/api/v2/commands/set_robot_max_velocity/" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"value": 1.0}'
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/commands/set_robot_max_velocity/"
headers = {"Authorization": "Bearer <token>"}
json_payload = {'value': 1.0}
response = requests.post(url, headers=headers, json=json_payload, timeout=10)
print(response.status_code)
print(response.json())
- Response Example (
200):
Note: Payload depends on the executed command.
Stream Teleop
- Endpoint:
/api/v2/commands/stream_teleop/ - Function: Execute the
stream_teleopcommand through the v2 command bridge. - Method:
POST - Parameters:
payload(body,DictValuePayload)- Shell Command:
curl -X POST "https://<ROBOT_IP>/rest/api/v2/commands/stream_teleop/" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"value": {"key": "value"}}'
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/commands/stream_teleop/"
headers = {"Authorization": "Bearer <token>"}
json_payload = {'value': {'key': 'value'}}
response = requests.post(url, headers=headers, json=json_payload, timeout=10)
print(response.status_code)
print(response.json())
- Response Example (
200):
Note: Payload depends on the executed command.
Toggle Balancing
- Endpoint:
/api/v2/commands/toggle_balancing/ - Function: Execute the
toggle_balancingcommand through the v2 command bridge. - Method:
POST - Parameters:
payload(body,BoolValuePayload)- Shell Command:
curl -X POST "https://<ROBOT_IP>/rest/api/v2/commands/toggle_balancing/" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"value": true}'
- Python Command:
import requests
url = "https://<ROBOT_IP>/rest/api/v2/commands/toggle_balancing/"
headers = {"Authorization": "Bearer <token>"}
json_payload = {'value': True}
response = requests.post(url, headers=headers, json=json_payload, timeout=10)
print(response.status_code)
print(response.json())
- Response Example (
200):
Note: Payload depends on the executed command.