Kinematics · repose-kinematics
Copper tasks & payloads
Each kinematics capability is also a Copper task, so you can wire it into a graph in RON without writing code. The crate also defines the joint payloads that every other Repose component and every bridge uses.
The tasks
CuForwardKinematicsTask<N> | In: CuJointPositionsPayload<N>. Out: Transform3D<f64> tool pose. |
CuInverseKinematicsTask<N> | In: (Transform3D<f64>, CuJointPositionsPayload<N>), i.e. target and seed. Out: CuIkSolutionPayload<N>. |
CuServoTask<N> | In: (CuTwist6D, CuJointPositionsPayload<N>). Out: CuJointVelocitiesPayload<N>. |
All three are stateless. A cycle where an input is missing publishes nothing, and the output's time of validity is taken from the inputs, so downstream tasks see consistent timestamps.
Configuration
chain (required) | Preset name or inline chain. See Chains & joints. |
tool_offset | Optional. Replaces the chain's tool offset. |
ik | IK task only: CuIkParams (Inverse kinematics). |
diff_ik | Servo task only: CuDiffIkParams (Servoing). |
tasks: [
(id: "fk", type: "repose_kinematics::CuForwardKinematicsTask<6>",
config: {"chain": "igus_rebel"}),
(id: "ik", type: "repose_kinematics::CuInverseKinematicsTask<6>",
config: {"chain": "igus_rebel", "ik": {"max_iterations": 128}}),
],
cnx: [
(src: "fk", dst: "ik", msg: "cu_spatial_payloads::Transform3D<f64>"),
],Invalid config fails when the graph starts, not at the first message. In Rust, every task also has from_params(..) for building it directly in tests.
Payloads
CuJointPositionsPayload<N> | positions: [CuJointPosition; N]. Plain joint vector for wiring. |
CuJointStatePayload<N> | status: CuRobotStatus, positions, velocities. The measured state: the one payload every bridge must publish, on its joint_state channel. |
CuJointVelocitiesPayload<N> | velocities plus the CuDiffIkStatus that produced them. |
CuIkSolutionPayload<N> | positions plus CuIkStatus. Consumers must read the status: a published solution may be a best attempt, not a converged one. |
Robot status
CuRobotStatus travels inside every joint state:
NotReady | Default. The bridge has not confirmed the robot is ready. |
Ready | The robot accepts commands. CuJointGoalTask waits for the first Ready state before it requests a plan. |
Fault(code) | Device-specific fault code from the bridge. |
EmergencyStop | An e-stop is active. |