rebot_control.joint_filter

Joint-target conditioning between the caller (IK, joint commands) and the servo thread.

Per control cycle, in this order:

  1. clip to the soft joint limits;

  2. refuse a target more than max_jump from the previous target (CommandRejected): a jump that large in one cycle is a bug or a bad IK solution, never a valid command;

  3. rate limit: move the target at most max_joint_speed * dt from the previous target (not from the measured position, which would cap the torque instead of the speed);

  4. first-order low-pass filter with time constant filter_tau_s (takes input jitter and IK steps out of the motion).

Module Contents

Classes

API

class rebot_control.joint_filter.JointTargetFilter(lower: numpy.ndarray, upper: numpy.ndarray, dt: float, max_jump: float, max_speed: float, filter_tau: float, joint_names: list[str] | None = None)

Initialization

reset(q: numpy.ndarray | None) → None

Start from q (the measured pose), or forget the history with None.

__call__(q_des: numpy.ndarray, q_meas: numpy.ndarray) → numpy.ndarray