Controller · repose-controller
Command modes
The controller always fills the same payload; mode tells the bridge which part of it to act on.
Modes
position | Position setpoints; the bridge closes the servo loop, with the command velocities as feed-forward. Most robots and the MuJoCo bridge. |
velocity | Velocity setpoints; positions ride along as a drift reference. The igus and UR bridges stream this way. |
effort | Torque/force from the controller's PD law: kp · (qset − q) + kv · (q̇set − q̇). The bridge applies it raw, plus its own gravity compensation. |
Change it at runtime with set_mode; it takes effect on the next cycle. Bridges refuse modes they don't support.
Payload: CuJointCommandPayload<N>
positions, velocities | Typed setpoints. |
efforts | CuJointEffort: Revolute(Torque) N·m or Prismatic(Force) N. Effort mode only. |
mode | CuControllerMode. |
status | Idle, Running, Holding, Fault. |
max_tracking_error | Largest joint error this cycle. |
Effort gains
kp is N·m/rad (or N/m), kv is N·m·s/rad (or N·s/m), both ≥ 0. In hold and fault states effort mode applies only a damping brake, −kv · q̇. With no measured state the effort is zero and only the bridge's gravity compensation holds the arm. set_effort_gains changes them at runtime and rejects invalid values without changing the current ones.