franky.JointImpedanceBaseยถ

class franky.JointImpedanceBaseยถ

Bases: BaseTorqueMotion

Base class for client-side joint impedance motions.

This class computes joint torques from a joint-space spring-damper law plus optional torque offset/model compensation. Subclasses implement nextCommandImpl and call computeCommand with their current reference.

__init__(*args, **kwargs)ยถ
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.

get_cartesian_gains(self: franky._franky.JointImpedanceBase) franky._franky.CartesianImpedanceGainsยถ

Get a copy of the current target Cartesian shaping gains.

Mutating the returned object has no effect on the motion; pass it to setCartesianGains to apply changes.

get_gains(self: franky._franky.JointImpedanceBase) franky._franky.JointImpedanceGainsยถ

Get a copy of the current target impedance gains.

Mutating the returned object has no effect on the motion; pass it to setGains to apply changes.

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.

set_cartesian_gains(self: franky._franky.JointImpedanceBase, gains: franky._franky.CartesianImpedanceGains) Noneยถ

Set the target Cartesian shaping gains.

The gains are validated and then smoothed in the control loop via exponential interpolation.

Parameters:

gains โ€“ The new target Cartesian gains.

set_gains(self: franky._franky.JointImpedanceBase, gains: franky._franky.JointImpedanceGains) Noneยถ

Set the target impedance gains.

The gains are validated and then smoothed in the control loop via exponential interpolation.

Parameters:

gains โ€“ The new target gains.

property reactionsยถ

Currently registered reactions of the motion.