Skill runtime API

The functions you call inside a skill: arm motion, the gripper, objects and anchors, pipetting, perception, storage, prompts, and state.

A skill's robotic_code.py gets its abilities from one import:

from execution.execution_functions import *

That brings in the supported runtime API: everything a skill is allowed to call to move an arm, open the gripper, read where an object is, drive a pipette, capture an image, pause for the operator, and pass values to a later step. This section is the reference for those functions, grouped by what they do.

Two rules before the reference.

The import gives you these names and nothing else. It does not pull in the standard library. If a skill needs time or math, import it yourself. For a pause that still responds to the operator, use pause_aware_sleep rather than time.sleep.

Your function signature is the skill's interface. Parameters come from the signature of the function in robotic_code.py, not from metadata.yaml. A parameter annotated SkillObject receives a world object; use object.id to address it. See Authoring a skill.

⚠️

Many of these functions command real hardware. On a lab machine they move physical hardware; in the simulator they move a simulated one. Nothing any of them returns confirms that a motion is safe. Validate in the simulator first, and follow the hardware procedure on Running a workflow on real hardware before moving physical arms.

🔌

A few subsystems have no simulated stand-in and will reach for real hardware even in the simulator. The pipette calls try to connect to a physical device over the wireless link and can block for minutes if none is there. The Slack helpers post real messages. Guard both behind is_sim_mode() in any skill you expect to run in the simulator.

The subsystems

PageWhat it covers
Arm motion and the gripperMove an arm to a pose or a joint configuration, move relative, read the current pose, and set the gripper width.
Objects, anchors, and the worldRead an object's pose, resolve an anchor to a pose, attach and detach objects, snap an object to a pose, and read or update world state.
PipettingConnect an electronic pipette and aspirate, dispense, eject a tip, home, and blow out.
PerceptionCapture an image from an arm camera, and relocalize an object from its AprilTags.
Pausing and operator promptsPause for the operator, ask a question, register resume actions, and let a cancel propagate.
Skill state and loggingPass values between skills in one run, write run artifacts, log to the run, and detect simulation mode.

Conventions used throughout

  • Positions are in metres. Orientations are roll, pitch, yaw in radians, or a wxyz quaternion (scalar first) where a function takes one.
  • Arms are named "left_arm" and "right_arm".
  • An object is selected by its name, with an optional index when a world holds more than one of that type.
  • Many functions return a dict carrying a success flag. A skill's own return value should also be a dict containing success, per Authoring a skill.

Did this page help you?