franky.TorqueStopMotionยถ

class franky.TorqueStopMotionยถ

Bases: BaseTorqueMotion

Graceful stop for torque-control (impedance) motions.

Torque motions never signal MotionFinished on their own, and franka::Robot::stop() preempts the control loop with a franka::ControlException rather than ramping down. This motion ramps the last commanded torque into a damping-only law and then returns franka::MotionFinished.

__init__(self: franky._franky.TorqueStopMotion, damping: Annotated[numpy.typing.ArrayLike, numpy.float64, '[7, 1]'] | None = None, ramp_duration: SupportsFloat | SupportsIndex = 0.2, velocity_epsilon: SupportsFloat | SupportsIndex = 0.02, max_duration: SupportsFloat | SupportsIndex = 2.0, compensate_coriolis: bool = True, max_delta_tau: SupportsFloat | SupportsIndex = 1.0) Noneยถ

Graceful stop for torque-control (impedance) motions.

Torque motions never signal MotionFinished on their own, and Robot.stop() preempts the control loop with a ControlException rather than ramping down. Enqueue this motion (or return it from a TorqueReaction) to end a torque loop cleanly: it blends the last commanded torque into a zero-stiffness joint-damping law, brings the arm to rest, then finishes. The motion also finishes after max_duration regardless of velocity, so a sustained external push cannot make it hang.

add_reaction(self: franky._franky.BaseTorqueMotion, reaction: franky._franky.TorqueReaction) Noneยถ

Add a reaction to the motion.

Reactions are evaluated in every step of the motion and can replace the current motion with a new motion.

Parameters:

reaction โ€“ The reaction to add.

Warning

Do not call this function synchronously from a condition, motion function, or reaction callback while this motionโ€™s reactions are being evaluated. Reaction evaluation holds the reaction-list mutex, so doing so would deadlock.

register_callback(self: franky._franky.BaseTorqueMotion, callback: collections.abc.Callable[[franky._franky.RobotState, franky._franky.Duration, franky._franky.Duration, franky._franky.Duration, franky._franky.Torques], None]) Noneยถ

Register a callback that is called in every step of the motion.

Parameters:

callback โ€“ The callback to register. Callbacks are called with the robot state, the time step [s], the relative time [s], the absolute time [s] and the control signal computed in this step.

property reactionsยถ

Currently registered reactions of the motion.