Skip to content

Robot API

All routes require JWT via Authorization: Bearer <token>.

Absolute Coordinates

  • Endpoint: /api/{{ API_VERSION }}/coordinates/
  • Function: Send go_to_absolute vector command.
  • Method: POST
  • Shell Command:
curl -X POST "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/coordinates/" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"command":"go_to_absolute","value":{"x":1.5,"y":-0.5,"z":0.0,"theta":3.14}}'
  • Python Command:
import requests

url = "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/coordinates/"
headers = {"Authorization": "Bearer <token>"}
data = {"command":"go_to_absolute","value":{"x":1.5,"y":-0.5,"z":0.0,"theta":3.14}}
resp = requests.post(url, json=data, headers=headers)
print(resp.json())

String Command

  • Endpoint: /api/{{ API_VERSION }}/str/
  • Function: Send string-based command.
  • Method: POST
  • Shell Command:
curl -X POST "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/str/" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"command":"is_detected","value":"rune_id"}'
  • Python Command:
import requests

url = "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/str/"
headers = {"Authorization": "Bearer <token>"}
data = {"command":"is_detected","value":"rune_id"}
resp = requests.post(url, json=data, headers=headers)
print(resp.json())

Integer Command

  • Endpoint: /api/{{ API_VERSION }}/int/
  • Function: Send integer-based command.
  • Method: POST
  • Shell Command:
curl -X POST "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/int/" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"command":"sound_level","value":85}'
  • Python Command:
import requests

url = "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/int/"
headers = {"Authorization": "Bearer <token>"}
data = {"command":"sound_level","value":85}
resp = requests.post(url, json=data, headers=headers)
print(resp.json())

Float Command

  • Endpoint: /api/{{ API_VERSION }}/float/
  • Function: Send float-based command.
  • Method: POST
  • Shell Command:
curl -X POST "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/float/" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"command":"set_robot_max_velocity","value":50}'
  • Python Command:
import requests

url = "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/float/"
headers = {"Authorization": "Bearer <token>"}
data = {"command":"set_robot_max_velocity","value":50}
resp = requests.post(url, json=data, headers=headers)
print(resp.json())

Boolean Command

  • Endpoint: /api/{{ API_VERSION }}/bool/
  • Function: Send boolean-based command.
  • Method: POST
  • Shell Command:
curl -X POST "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/bool/" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"command":"set_obstacle_avoidance","value":true}'
  • Python Command:
import requests

url = "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/bool/"
headers = {"Authorization": "Bearer <token>"}
data = {"command":"set_obstacle_avoidance","value":True}
resp = requests.post(url, json=data, headers=headers)
print(resp.json())

Dict Command

  • Endpoint: /api/{{ API_VERSION }}/dict/
  • Function: Send dict-based command (e.g. trigger a skill).
  • Method: POST
  • Shell Command:
curl -X POST "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/dict/" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"command":"skill","value":{"name":"wave"}}'
  • Python Command:
import requests

url = "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/dict/"
headers = {"Authorization": "Bearer <token>"}
data = {"command":"skill","value":{"name":"wave"}}
resp = requests.post(url, json=data, headers=headers)
print(resp.json())

Get Command

  • Endpoint: /api/{{ API_VERSION }}/get/{command}
  • Function: Fetch data or invoke a no-arg command.
  • Method: GET
  • Shell Command:
curl -L "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/get/get_language" \
  -H "Authorization: Bearer <token>"
  • Python Command:
import requests

cmd = "get_language"
url = f"http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/get/{cmd}"
headers = {"Authorization": "Bearer <token>"}
resp = requests.get(url, headers=headers)
print(resp.json())

Authenticate (JWT)

  • Endpoint: /api/{{ API_VERSION }}/auth/
  • Function: Obtain a JWT.
  • Method: GET
  • Shell Command (UDS):

curl -L "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/auth/"
* Shell Command (TCP/IP):

curl -L "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/auth/?username=remi" \
  -H "X-API-Key: <key>"
  • Python Command:
import requests

url = "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/auth/"
# For TCP/IP: headers = {"X-API-Key":"<key>"}
resp = requests.get(url)
print(resp.json())

URDF Fetch

  • Endpoint: /api/{{ API_VERSION }}/urdf/{filename}
  • Function: Return modified URDF XML and mesh list.
  • Method: GET
  • Shell Command:
curl -L "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/urdf/robot.urdf" \
  -H "Authorization: Bearer <token>"
  • Python Command:
import requests

url = "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/urdf/robot.urdf"
headers = {"Authorization": "Bearer <token>"}
resp = requests.get(url, headers=headers)
print(resp.json())

Mesh Download

  • Endpoint: /api/{{ API_VERSION }}/meshes/{filepath:path}
  • Function: Serve mesh binary.
  • Method: GET
  • Shell Command:
curl -L "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/meshes/link.stl" \
  -H "Authorization: Bearer <token>" --output link.stl
  • Python Command:
import requests

url = "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/meshes/link.stl"
headers = {"Authorization": "Bearer <token>"}
resp = requests.get(url, headers=headers)
with open("link.stl", "wb") as f:
    f.write(resp.content)
print("Downloaded")