Skip to content

Safety and e-stop

The manifest each robot generates, the safety chain every outside command passes, and the e-stop.

Every robot has a manifest, a safety chain and an e-stop.

d06_deviced06_device

from strands_robots import Robot
from strands_robots.robot.safety import RequestRefused

arm = Robot("so101")
try:
    arm.confirm_act({"elbow_flex": 3.1})
except RequestRefused as e:
    print(e)  # elbow_flex=3.1000 rad is outside its range [-1.7453, 1.5708]

Manifest

arm.manifest lists each control with its range, its safe range and what it does if the link drops. The library builds it from the robot. Agent tools, the mesh and the dashboard all read it.

A real robot needs a range for every joint it drives. If the model leaves one without a range (limited="false", or no range in the joint or its default class), Robot(..., port=) raises ValueError naming the joints before it opens the port, and the range check refuses a target for such a joint. A joint that turns without end needs a hardware.safe bound in its registry entry instead. On hardware that bound is the joint's hard range: a target past it is refused even with the operator's yes (confirmed=True, the dashboard's confirm), and a direct act() is clipped into it. kinova_gen3 declares one turn, ±π rad, for its continuous joints 1, 3, 5 and 7. In a world, a joint without a range is still unconstrained.

Safety chain

Commands from agents, the dashboard or the mesh pass one chain: range, safe range, interlocks, validators, then the operator. Your own act() calls skip the operator step. A refusal says why.

A move over time (act(..., seconds=) from an agent, the dashboard or the mesh) asks the operator once, for the target. Every point of the move then passes the rest of the chain again. If an interlock or validator refuses a point, the move stops there and the robot holds the last pose it reached. Interlocks are checked on each write, so also wire a light curtain or a door switch to robot.estop() if it must stop the robot between writes.

E-stop

estop() works from any thread and nothing can block it. The robot stays stopped until a named operator resumes it.

task = arm.start(my_policy, seconds=30)
arm.estop(by="alice")             # the run stops within about 10 ms
arm.resume(approved_by="alice")

e-stop mid-run, the arm holds

The arm holds its pose. It does not drop.

API Does
hold() Stand still
subscribe("state", fn, hz=) Stream the robot's state
Watchdog Applies on_disconnect when commands stop

For real robots, see the operator gate.

Edit page