Skip to main content

Crate repose_controller

Crate repose_controller 

Source
Expand description

Robot-agnostic unified joint controller for copper-rs.

CuControllerTask sits between a trajectory follower (CuTrajectoryFollowOutput) and a robot bridge. It consumes the follower setpoint plus the measured joint state and emits one unified CuJointCommandPayload — the only command type a bridge has to carry. Simulators and hardware bridges implement the same joint_command/joint_state channels, so swapping sim for a real robot is a RON graph change, not an application change.

Behaviour per cycle:

  • No setpoint yet: Idle, holding the last measured state (zeros before the first state arrives).
  • Setpoint + fresh state: command mirrors the setpoint; status maps the follower status (Running → Running, Finished → Holding, ErrorEmptyTrajectory → Fault).
  • Tracking error above tracking_error_limit: Fault, command holds the measured state instead of chasing the setpoint.
  • Setpoint without any measured state: Fault, holding the last command.

State that affects later cycles (last command, last status) round-trips through Freezable, so deterministic replay resumes correctly.

Structs§

CuControllerParams
Parameters of CuControllerTask; the node config: block.
CuControllerTask
Unified robot-agnostic joint controller task.
CuEffortGains
Effort-mode PD gains.
CuJointCommandPayload
Unified joint command: the only command payload a bridge has to carry.
CuRateLimit
Per-joint command rate limit (position mode only).

Enums§

CuControllerMode
Command level a bridge is asked to apply.
CuControllerStatus
Controller status carried by CuJointCommandPayload.
CuJointEffort
A joint effort carries the physical unit of its joint (torque or force).