Message catalogue¶
Every message a robot and the XPARO server exchange, read from the server
and xparo_ros source. Each message is a JSON object keyed by the names
below (see Connection protocol). A client only needs the ones for the features
it supports: a robot that ignores GET_WIFI_NETWORKS simply has no Wi-Fi
tools on the dashboard.
“Server → robot” messages that come from a dashboard button are sent only to the robot chosen on the dashboard, and only over its WebSocket.
All messages¶
Key |
Direction |
What it is |
|---|---|---|
|
robot → server |
Registers the robot (hardware fields in Connection protocol). The reply
carries |
|
server → robot |
The robot’s own key; use it instead of the secret key from now on. |
|
server → robot |
Token for file uploads (ROS bags). |
|
robot → server |
|
|
server → robot |
Project text, part of the project sync. |
|
server → robot |
The project’s main behaviour tree (XML body). |
|
server → robot |
|
|
server → robot |
The project’s main environment file and the Environment Map. |
|
server → robot |
|
|
server → robot |
The main data file and |
|
server → robot |
Project properties file. |
|
server → robot |
|
|
server → robot |
|
|
robot → server |
|
|
server → robot |
Python behaviour tree node plugins to load, and inline Python nodes. |
|
server → robot |
Asks for the state of the robot’s synced files. The robot answers with
|
|
robot → server |
What the robot has. The server pushes newer files, adopts new ones and asks for the content of the rest. |
|
server → robot |
Asks for some files’ content; answered with |
|
robot → server |
The content asked for. See Synced files and folders. |
|
server → robot |
Recording settings from Database → Sensors (topics, start mode, delay). |
|
server → robot |
Run a task (fields below). Answered with |
|
robot → server |
The run began: |
|
robot → server |
How the run ended (fields below). Kept and resent if the connection was down. |
|
server → robot |
|
|
server → robot |
Answered with |
|
robot → server |
One task history record (when the task has Save task history on, or
from |
|
robot → server |
One behaviour tree node changed state ( |
|
robot → server |
Session log: new ROS 2 log lines and average CPU, RAM and disk use. |
|
robot → server |
|
|
robot → server |
|
|
server → robot |
Terminal: |
|
server → robot |
|
|
server → robot |
Answered with |
|
server → robot |
|
|
both |
File upload and download: |
|
server → robot |
|
|
server → robot |
Answered with |
|
server → robot |
Answered with |
|
server → robot |
|
|
server → robot |
Answered with |
|
server → robot |
Control recording; answered with |
|
server → robot |
Answered with |
|
server → robot |
Answered with |
|
server → robot |
The Health & Errors window is open with Watch live: the robot sends
|
|
robot → server |
New and recurring problems from |
|
server → robot |
Answered with |
|
server → robot |
|
|
server → robot |
|
|
server → robot |
Forget a saved network ( |
|
server → robot |
|
|
server → robot |
|
RUN_TASK¶
What the server sends when a task runs (Run now, Auto Launch on Start or Restart on Failure):
{"RUN_TASK": {
"task_id": "3dffb995-298e-4335-a0a9-b38aecc396fa",
"run_id": "5f1c0e2a9b7d",
"tree_xml": "<Sequence>...</Sequence>",
"blackboard": {"destination": "ward_3"},
"subtrees": {"go_to_room": "<Sequence>...</Sequence>"},
"stage": "development",
"timeout_s": 600,
"save_task_history": true,
"task_title": "Deliver medicine",
"tree_name": "deliver_medicine",
"trigger": "run_now",
"attempt": 1
}}
subtrees is present only when the tree uses <SubTree>, and
start_delay_s only when a restart waits before running again.
timeout_s 0 means no time limit.
Which saved version of the tree runs (also in TASK_STARTED,
TASK_RESULT and the Task history row; the dashboard fills them in for
robots on older software):
Field |
Meaning |
|---|---|
|
The task’s tree (’’ = the Scratch Space tree). Never a |
|
The stage whose marked version runs; ‘’ = the working copy. |
|
The History version that stage runs (id and time); ‘’ for the working copy. |
|
Hash of the tree’s stored content (it matches a History version). |
Names starting .xpv. in custom_aiml (robot init and pushes) are
frozen copies of marked stage versions that the dashboard manages, with
their SubTree IDs rewritten to .xpv.<key>.<SubTree>. Don’t edit them:
they are never synced back, and a robot on current software refuses to run
a copy that doesn’t match tree_files.
Behaviour page messages (browser → server)¶
Which saved version each stage runs (History → Stages). Sent over the project’s dashboard connection; replies come back on it and a change is broadcast to every open tab of the project once it is saved.
Key |
What it does |
|---|---|
|
Replies |
|
|
|
What marking or clearing would change (tasks, missing inputs,
robots, SubTrees, |
|
|
|
A marked version with its content and SubTrees ( |
TASK_RESULT¶
A real result from the tree in Test trees offline, run with
battery at 10 so its first check fails:
{"TASK_RESULT": {
"task_id": "3dffb995-298e-4335-a0a9-b38aecc396fa",
"run_id": "5f1c0e2a9b7d",
"success": false,
"duration_s": 0.0047,
"error": "",
"outcome": "failed",
"retryable": true,
"explanation": "The tree finished with FAILURE at battery_ok (ScriptCondition): 'battery > 20' is False.",
"failed_node": {
"name": "battery_ok",
"tag": "ScriptCondition",
"path": "Sequence(deliver_medicine) > ScriptCondition(battery_ok)",
"reason": "'battery > 20' is False"
},
"stats": {"nodes_total": 4, "nodes_ticked": 2, "nodes_skipped": 0,
"nodes_never_reached": 2, "node_ticks": 2, "tree_ticks": 1,
"by_status": {"FAILURE": 2, "IDLE": 2}},
"task_title": "Deliver medicine",
"tree_name": "deliver_medicine",
"trigger": "run_now",
"attempt": 1
}}
outcome is one of the values in Run results. error is empty
when the tree itself decided the result (success or failed) and
explains the problem otherwise. retryable false means running it again
unchanged would fail the same way (a stage mismatch or an invalid tree, for
example), so Restart on Failure does not retry it.