Methods
commandJointsPD()
Signature
setJointAngles. The two look similar and are
not interchangeable, so per this package’s “shared names mean shared
behavior” rule they carry different names:
- Non-blocking.
setJointAnglesmay block — its base signature takesblocking/moving_time, and some implementations sleep for a control period. This is called every tick from a fixed-rate control thread that owns its own pacing, so it must return at once. - A subset, not the whole robot.
setJointAnglesdrives every joint and rejects a partial list. This drives exactlyjoint_indices, which is how a lower-body policy runs while a separate controller owns the arms. - Caller-supplied gains.
setJointAnglesapplies the robot’s own stiffness. Here the gains arrive per call, because a policy’s gains are part of its deployment contract and travel with its artifact. Driving at the robot’s gains instead is a real failure and a quiet one — it shows up as a degraded gait, not an error.
joint_indices is left un-actuated per the robot’s
own convention (zero gains, or the vendor’s position/velocity-stop
sentinels), so a separate controller may own it. The four arrays are
positionally aligned (one entry per driven joint).
required
Motor indices to drive.
required
Target joint positions (rad), aligned to
joint_indices.required
Per-joint position gains, aligned to
joint_indices.required
Per-joint damping gains, aligned to
joint_indices.getControlState()
Signature
getState registry
(a keyed dict for slow proprioception reads) — this is the fast,
fixed-shape accessor for closed-loop control.
Returns:
The latest control-loop state.
setDamping()
Signature
default:"8.0"
Damping gain applied to every motor.
setZeroTorque()
Signature