Driver¶
Generated from strands_robots.core.contracts.Driver at build.
The surface every robot backend exposes, sim and real alike.
send_action receives an action the chokepoint (Robot.act) has already
validated and clamped; the driver converts frames and writes the wire.
Sensor members beyond joint_names (imu, battery, pose) are optional and
read by consumers with getattr(driver, name, None).
Shape: structural Protocol (runtime checkable): implement the members, import nothing.
Members¶
| signature | contract |
|---|---|
tool_name -> str property |
The name an agent invokes this robot by. |
native_frame -> UnitFrame property |
The frame send_action consumes and get_observation reports. |
joint_names -> tuple[str, ...] property |
Joint keys, in the wire's order. |
connect_eagerly() -> None |
Open the wire now, raising :class:~strands_robots.core.errors.HardwareError on failure. |
is_connected() -> bool |
Whether the wire is live, asked of the wire, never cached. |
get_observation() -> Observation |
One reading in native_frame. |
send_action(action: Action) -> Receipt |
Command one validated, clamped action; return what was written. |
run_policy(policy: Policy, instruction: str, duration_s: float) -> RunReport |
Run a policy loop on the wire's own clock; drivers without a loop raise NO_POLICY_LOOP. |
stop() -> None |
Halt motion now; keep the wire open. |
cleanup() -> None |
Torque off where the hardware allows, release the wire; idempotent. |
Where it is used¶
Contracts return typed values and raise strands_robots.core.errors; the agent envelope
is built in tools/. The types they exchange are in strands_robots.core.types; the
frame they agree on is UnitFrame. Why the shapes are what they are:
VISION.md.