franky.CartesianImpedanceBase¶
- class franky.CartesianImpedanceBase¶
Bases:
BaseTorqueMotionBase class for client-side cartesian impedance motions.
This motion implements a cartesian impedance controller on the client side and does not use Franka’s internal impedance controller. Instead, it uses Franka’s internal torque controller and calculates the torques itself.
- __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_gains(self: franky._franky.CartesianImpedanceBase) franky._franky.CartesianImpedanceGains¶
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.
- get_nullspace_gains(self: franky._franky.CartesianImpedanceBase) franky._franky.NullspaceGains¶
Get a copy of the current target nullspace gains.
Mutating the returned object has no effect on the motion; pass it to setNullspaceGains 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_gains(self: franky._franky.CartesianImpedanceBase, gains: franky._franky.CartesianImpedanceGains) 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.
- set_nullspace_gains(self: franky._franky.CartesianImpedanceBase, gains: franky._franky.NullspaceGains) None¶
Set the target nullspace gains.
The gains are smoothed in the control loop via exponential interpolation.
- Parameters:
gains – The new target nullspace gains.
- property reactions¶
Currently registered reactions of the motion.