make_robot("<name>") returns a RemoteRobot. Its attributes are the methods and subcomponents below, and every call runs on the robot; the driver behind it is LynxM20Pro. Connecting neither starts nor moves the robot — it attaches to one that is already up. A method that fails on the robot arrives as RuntimeError naming the original error in its message, except a controller fault, which arrives as RobotFault. The client packages this page uses are preinstalled in every GRID session workspace and in the Python environment the GRID CLI prepares when you run a program with skill run; there is nothing to install.
Methods on the robot
Called asrobot.<method>(...).
getBatteryState()
Signature
getBatteryState and summarize both packs conservatively.
Returns:
A dict with voltage (volts, mean of the packs), current
(always None — the robot does not report it),
charge_percent (0-100, the lower of the two packs) and
packs, a list with one dict per pack holding voltage
(volts), charge_percent (0-100), temperature_c and
charging (bool) — or None if no device report has
arrived yet.
Raises:
RuntimeError: If the newest device report is older than 2 s or
lacks a battery-pack field, or start() failed (the UDP
session with the robot is lost).
getImage()
Signature
getImage() returns.
Name of the camera to get image from — either a directly attached camera’s name or a
/-separated path through subcomponents to a nested one (left_arm/wrist). May be omitted when the robot has exactly one camera.Forwarded to the underlying sensor’s
getImage. Lets callers pass camera-specific options (e.g. image_type="depth", compressed=False) without the base class having to enumerate them.getJointAngles()
Signature
joint_names: front-left,
front-right, hind-left, hind-right legs, each hipx, hipy,
knee. The wheels are continuous joints and are reported by
getWheelVelocities instead.
Raises:
RuntimeError: If the motion report is missing or older than 2 s
(the UDP session with the robot is lost), or lacks a joint.
getLidarPointCloud()
Signature
getMotionState()
Signature
"not_ready", "idle" (lying, motors relaxed — the
power-on state; the protocol cannot command it),
"standing", "soft_emergency_stop", "damping",
"sitting", "joint_zeroing", "rl_control" (walking
controller active), or "unknown(<code>)" for a code this driver
does not know.
Raises:
RuntimeError: If the basic status report is missing or older than 2 s.
getOrientation()
Signature
start() opened the UDP
session, counter-clockwise positive. Uses no map. Non-blocking.
Returns:
Orientation quaternion in the odometry frame, or None if no
motion report has arrived yet.
Raises:
RuntimeError: If the UDP session with the robot is lost: the
newest motion report is older than 2 s, the reports resumed
after such a gap and start() has not reconnected yet, or
start() failed.
getPosition()
Signature
start() opens the UDP session: origin at the robot’s
position then, x along its heading then, y to its left, z
always 0. The reported velocity is corrected by its standing offset,
learned while the robot stands uncommanded, and by a
tape-measured scale. Tape-measured error: within 5 % forward and back,
up to 50 % sideways. Error grows with distance travelled. Non-blocking.
Returns:
Position in meters in the odometry frame, or None if no motion
report has arrived yet.
Raises:
RuntimeError: If the UDP session with the robot is lost: the
newest motion report is older than 2 s, the reports resumed
after such a gap and start() has not reconnected yet, or
start() failed.
getState()
Signature
_local_state, and the walk composes the per-component
results into one nested mapping. Subclasses must not replace
this method — per-component state belongs in _local_state.
With no keys, returns this component’s local state merged
with one nested node per subcomponent name — the tree structure
is the nesting itself, and the names mirror subcomponents
(and therefore serialize() and edge introspection): a
two-arm rig returns {"left_arm": {"joint_positions": ...}, "right_arm": {...}}, and a leaf component returns its local
state alone. A component whose state could not be read (dead
telemetry, not yet started, already shut down) carries an
"error" entry — {"error": "<ExceptionType>: <message>"},
with its children still nested alongside — instead of its state
keys. Errors are contained per node: one failing component never
loses the rest of the snapshot, and the walk still descends into
the failing component’s children. "error" is reserved for
that purpose, and local state keys must not collide with
subcomponent names; a hook violating either is reported as that
node’s error.
With keys, returns a flat mapping with one entry per match.
Each key is a /-separated path through the component tree:
every segment names a subcomponent, and the final segment may
instead name an entry in that component’s local state. Because
structure is the nesting, a literal path is the same as plain
indexing — getState(["left_arm/joint_positions"]) returns
the value of getState()["left_arm"]["joint_positions"] — and
a path ending on a subcomponent yields that component’s full
nested node. Segments may use shell-style wildcards over
subcomponent names — * matches within one chunk and **
matches any chain of chunks — so "*_arm/joint_positions"
fans out to one entry per arm, keyed by the concrete matched
path. Wildcards never match state entries; only a literal final
segment does. A key that matches nothing raises, so a typo is
loud rather than silently absent. A matched component whose
state read failed yields {"error": "..."} at its path.
Keyed reads are lazy: a hook runs only where a key lands — a
literal path executes the final component’s hook alone (not the
nodes traversed on the way), a glob executes only the matched
nodes, and each component’s hook runs at most once per call
however many keys reach it. Components with a selective-read
hook (_local_state_entries — every Robot with
registered state getters) go further and execute only the getters a key names, so
a ** glob probes their registries without touching
hardware. The caller pays only for the state actually
requested; ** and the no-keys form visit the whole tree
because that is the request.
State is cheap by convention: local state carries kinematics,
status, and health — never bulk sensor payloads (camera frames,
point clouds, scans), which stay in their dedicated methods
(getImage, getPointCloud, …). Callable on a stopped
tree — reading state after a soft e-stop is when it matters most
— and on a partially started one, where unstarted components
report a per-node error instead of failing the call.
State paths to read, or None for the full nested snapshot. A single string is shorthand for a one-element list.
keys is None, otherwise a
flat mapping of matched path to state value or nested node.
Raises:
TypeError: If keys is neither None, a string, nor a
list/tuple of strings.
ValueError: If a key is empty, has an empty path segment, or
matches no subcomponent path or state entry.
getVelocity()
Signature
getPosition in the body
frame. Reads 0 while the robot stands uncommanded or is not in its
walking controller. x is forward, y left; z is always 0.
Sideways readings can be off by 50 % (tape-measured).
Returns:
Body-frame linear velocity in m/s, or None if no motion report
has arrived yet.
Raises:
RuntimeError: If the UDP session with the robot is lost: the
newest motion report is older than 2 s, the reports resumed
after such a gap and start() has not reconnected yet, or
start() failed.
getWheelVelocities()
Signature
wheel_joint_names).
Raises:
RuntimeError: If the motion report is missing, older than 2 s,
or lacks a wheel.
isEmergencyStopped()
Signature
None when the state is unknown, so an unknown state is
never read as “clear to move”.
Returns:
True when motion is inhibited by an e-stop, False when clear.
Raises:
RuntimeError: If the basic status report is missing, older than
2 s, or lacks its e-stop or motion-state field.
setDefaultJointAngles()
Signature
setDefaultJointVelocities()
Signature
stop()
Signature
subcomponents insertion order), then this
component’s own _stop_self hook runs. The walk is
best-effort — a failing component never prevents the rest of the
tree from being stopped; failures are collected and raised
together after the walk completes. Components (and their
subtrees) that have already been shut down are skipped. Safe to
call repeatedly: stopping an already-stopped tree re-runs the
hooks, which must tolerate that. Blocks until every hook has
returned.
Stops motion only; resources stay live and the component remains
usable — telemetry and every other public method keep working on a
stopped tree. Use shutdown to release resources. Stopping
re-arms each visited component, so a later start re-runs
the bring-up hooks — that is the stop-then-start restart path —
but it does not revoke callability: only shutdown does
that.
Subclasses must not replace this method — per-component stop
behavior belongs in _stop_self. An override may only
extend the walk (adding a driver-specific mode, as UR5e does
with its immediate escape hatch) and must delegate to
super().stop() for the normal path; it must never
re-implement the recursion.
Raises:
ComponentStopError: If one or more stop hooks raised. The
walk still visited every component; the exception carries
every (component_path, exception) pair.
Properties on the robot
Read asrobot.<property>; each read runs the getter on the robot.
Names of the 12 leg joints, in the order
getJointAngles reports.Legs front-left, front-right, hind-left, hind-right; per leg the
abduction (hipx), hip pitch (hipy) and knee joints. Names match
the vendor URDF.Names of the 4 wheel joints, in the order
getWheelVelocities reports.Front-left, front-right, hind-left, hind-right. Names match the
vendor URDF.Not implemented on this robot
Declared by the interface, raisesNotImplementedError here: lieDown, moveByVelocity, setJointAngles, standUp.
Lifecycle and configuration
The driver’s own bring-up and configuration hooks. The edge runs them when the robot comes up; do not call them from a program. Note thatrobot.shutdown() on the proxy is not the method below — it is RemoteRobot.shutdown(), which closes your connection and leaves the robot as it was.
addSensor()— Add an external sensor to the robot.addSubcomponent()— Attach a child component under a name.builtin_subcomponents()— Declare the children this class always ships with (customization point).configHash()— Hash this component’s serialized config subtree.config_schema()from_config()— Construct this component and its config-declared subtree.getIdentity()— Get this component’s own hardware identity (serial, model, version, MAC).getRobotId()— Stable, readable identifier for a robot or rig, for a database key.serialize()— Serialize this component tree back to its config envelope.setup_shutdown_handlers()— Register the process-wide atexit and signal handlers for safe teardown.shutdown()— Shut down this component’s tree, halting motion and releasing resources.start()— Bring this component’s tree online (connect, enable, arm).
Image — call decode() for an ndarray). You reach the robot through make_robot.