skills
Robot skills: what a robot can be asked to do. Each skill runs one reflex policy, and a person installs each version. The range of every input is the range the robot's sim tests passed.
GET / v1/ robots/ {owner}/ {repo}/ skills
List what a robot can be asked to do
Returns the robot's skills: stand, walk, turn and recover, each with its inputs, its pre- and post-conditions, its fallback skill and the version a person installed. An input's allowed range is the range the robot's sim tests passed. The hub derives it from the stored results, and nobody types it in. A skill with no installed version is listed when a version waits for a person. A robot the caller cannot see is 404. Answers 409 if the repo kind is not robot.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
owner | path | Handle | Repo owner handle (username or org slug). |
repo | path | Slug | Repo slug. A renamed repo's former slug also finds it, and the answer names its current address. |
Responses
| Status | Description | Body |
|---|---|---|
200 | The robot's skills. | RobotSkillList |
404 | Resource not found (or hidden from the caller). | Problem |
409 | State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...). | Problem |
GET / v1/ robots/ {owner}/ {repo}/ skills/ {skill}
Get one skill with its version history
Returns one skill and every version proposed for it, newest first. Each version names the policy file it runs, the range each input may take, and the sim tests that range rests on. The answer is 404 when the robot is invisible to the caller or no version of this skill was proposed.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
owner | path | Handle | Repo owner handle (username or org slug). |
repo | path | Slug | Repo slug. A renamed repo's former slug also finds it, and the answer names its current address. |
skill | path | RobotSkillName | The skill's name. |
Responses
| Status | Description | Body |
|---|---|---|
200 | The skill and its versions. | RobotSkill |
404 | Resource not found (or hidden from the caller). | Problem |
409 | State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...). | Problem |
POST / v1/ robots/ {owner}/ {repo}/ skills/ {skill}/ versions
Propose a policy as the next version of a skill
Proposes one policy file as the next version of this skill on this robot. The caller must be able to write the robot. The hub reads the file's stamp and its sim tests on this robot, then derives the version's envelope. The envelope holds the range of each input and the fallen starts a recovery passed. Each of these is a 422:
- the policy is not a
reflexpolicy - its stamp fills another skill's slot (
STANDisstand,LOCOiswalkorturn,RECOVERYisrecover) - no finished sim test of these bytes on this robot passed a test this skill reads
A sim test counts when the hub ran it, or when a writer of the robot started it. A test the policy's writers ran on their own machine does not count on another owner's robot. The version waits as proposed until a person installs it with installRobotSkillVersion. Proposing the same bytes again refreshes the waiting version's envelope and answers 200. Audited as skill.propose.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
owner | path | Handle | Repo owner handle (username or org slug). |
repo | path | Slug | Repo slug. A renamed repo's former slug also finds it, and the answer names its current address. |
skill | path | RobotSkillName | The skill's name. |
Request body
| Field | Type | Description |
|---|---|---|
model | string |
|
onnx_path | FilePath | null | The ONNX file. Omit it when the repo's root holds exactly one. |
Responses
| Status | Description | Body |
|---|---|---|
200 | The waiting version for these bytes, with its envelope refreshed. | RobotSkillVersion |
201 | The new version, waiting for a person. | RobotSkillVersion |
401 | Missing or invalid credentials. | Problem |
403 | Authenticated but not allowed (visibility, membership or scope). | Problem |
404 | Resource not found (or hidden from the caller). | Problem |
409 | State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...). | Problem |
422 | Request failed validation. | Problem |
POST / v1/ robots/ {owner}/ {repo}/ skills/ {skill}/ versions/ {version}/ install
Install a skill version (web session only)
session scope: a person signed in to the web app. No API key of any scope can call this. The person must be able to write the robot. envelope_digest names the envelope the person read. A version whose envelope changed since is 409. The version becomes the skill's installed one, and the one it replaces becomes superseded. A computer running the bridge picks it up the next time a person adds the robot there. 409 when the version is not proposed. Audited as skill.install.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
owner | path | Handle | Repo owner handle (username or org slug). |
repo | path | Slug | Repo slug. A renamed repo's former slug also finds it, and the answer names its current address. |
skill | path | RobotSkillName | The skill's name. |
version | path | integer | The version number, from 1. |
Request body
| Field | Type | Description |
|---|---|---|
envelope_digest | Sha256 |
Responses
| Status | Description | Body |
|---|---|---|
200 | The skill, with this version installed. | RobotSkill |
401 | Missing or invalid credentials. | Problem |
403 | Authenticated but not allowed (visibility, membership or scope). | Problem |
404 | Resource not found (or hidden from the caller). | Problem |
409 | State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...). | Problem |
422 | Request failed validation. | Problem |
POST / v1/ robots/ {owner}/ {repo}/ skills/ {skill}/ versions/ {version}/ decline
Decline a proposed skill version (web session only)
session scope. A person who can write the robot declines a waiting version, with a reason the proposer reads. The installed version stays as it was. 409 when the version is not proposed. Audited as skill.decline.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
owner | path | Handle | Repo owner handle (username or org slug). |
repo | path | Slug | Repo slug. A renamed repo's former slug also finds it, and the answer names its current address. |
skill | path | RobotSkillName | The skill's name. |
version | path | integer | The version number, from 1. |
Request body
| Field | Type | Description |
|---|---|---|
reason | string | Why the version is declined. The proposer reads it on the version's page. Spaces alone are not a reason. |
Responses
| Status | Description | Body |
|---|---|---|
200 | The skill, with this version declined. | RobotSkill |
401 | Missing or invalid credentials. | Problem |
403 | Authenticated but not allowed (visibility, membership or scope). | Problem |
404 | Resource not found (or hidden from the caller). | Problem |
409 | State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...). | Problem |
Schemas (17)
The schemas these operations reach before any other tag’s do. A type that links elsewhere is rendered on that tag’s page.
RobotSkillList
| Field | Type | Description |
|---|---|---|
robot | string | |
items | array of RobotSkill |
RobotSkillName
A skill a robot can be asked to do. stand holds the robot up, walk follows a velocity command, turn turns in place and recover gets up after a fall.
RobotSkill
| Field | Type | Description |
|---|---|---|
name | RobotSkillName | |
robot | string | |
summary | string | |
inputs | array of RobotSkillInputName | |
preconditions | array of RobotSkillCondition | |
postconditions | array of RobotSkillCondition | |
fallback | RobotSkillName | null | The skill that runs when this one ends in a fall, or null to stop. |
installed | RobotSkillVersion | null | |
waiting | integer | How many proposed versions wait for a person. |
versions | array of RobotSkillVersion | Every version, newest first. Present on |
RobotSkillVersionCreate
| Field | Type | Description |
|---|---|---|
model | string |
|
onnx_path | FilePath | null | The ONNX file. Omit it when the repo's root holds exactly one. |
RobotSkillVersion
| Field | Type | Description |
|---|---|---|
version | integer | |
status | string | |
policy | RobotSkillPolicy | |
envelope | RobotSkillEnvelope | |
evidence | array of RobotSkillEvidence | |
proposed_by | RobotSkillActor | |
proposed_at | string (date-time) | |
decided_by | RobotSkillActor | null | |
decided_at | string (date-time) | null (date-time) | |
reason | string | null |
RobotSkillInstall
| Field | Type | Description |
|---|---|---|
envelope_digest | Sha256 |
RobotSkillDecline
| Field | Type | Description |
|---|---|---|
reason | string | Why the version is declined. The proposer reads it on the version's page. Spaces alone are not a reason. |
RobotSkillInputName
A skill input. vx and vy are the body-frame forward and sideways speed in m/s, yaw_rate the turn rate in rad/s.
RobotSkillCondition
A state of the robot a skill starts from or leaves it in. standing means upright on its feet, fallen means it is not.
RobotSkillPolicy
The policy file a version runs. model is null when the caller cannot see the policy's repo.
| Field | Type | Description |
|---|---|---|
model | string | null | |
path | FilePath | |
sha256 | Sha256 | |
control_class | string | |
control_rate_hz | number | |
slot | Slot | null | |
certified | string | null | Lucen's word on these bytes, where Lucen certifies files for this robot. |
in_factory | boolean | True when the robot's factory install carries these bytes. |
RobotSkillEnvelope
What the version may be asked to do, derived by the hub from its sim tests. digest is the SHA-256 of the envelope's canonical JSON without the digest, which an install names.
| Field | Type | Description |
|---|---|---|
inputs | array of RobotSkillInput | |
combined | string | Whether commands on more than one input at once were tested. When they were not, or one failed, a call keeps only its largest input. |
starts | array of string | The fallen starts a |
survives | array of string | The pushes and floors the version stayed up through. |
cells | array of RobotSkillCell | |
digest | Sha256 |
RobotSkillEvidence
One sim test a version's envelope rests on.
| Field | Type | Description |
|---|---|---|
rollout_id | Id | |
battery | string | |
seeds | integer | |
passed | integer | |
total | integer | |
hub_ran | boolean | |
finished_at | string (date-time) | null (date-time) |
RobotSkillActor
| Field | Type | Description |
|---|---|---|
kind | string | |
handle | string | null |
Slot
A skill slot on the robot, the place a policy file goes.
RobotSkillInput
One input and the range it may take. The range runs from zero out to the last tested value on each side before the first failed one. A call outside it is clamped to it and logged.
| Field | Type | Description |
|---|---|---|
name | RobotSkillInputName | |
unit | string | |
min | number | |
max | number | |
tested | array of object | Every value this input was tested at alone, with whether it passed. |
value | number | |
passed | boolean |
RobotSkillCell
One sim test a version's envelope reads.
| Field | Type | Description |
|---|---|---|
rollout_id | Id | |
name | string | |
kind | string | What the test scores. |
command | RobotSkillCommand | null | |
passed | boolean | |
detail | string | null |
RobotSkillCommand
| Field | Type | Description |
|---|---|---|
vx | number | |
vy | number | |
yaw_rate | number |