franky.TorqueReaction

class franky.TorqueReaction

Bases: TorqueReaction, Reaction

A reaction that replaces the current motion with a torque motion.

__init__(self: franky._franky.TorqueReaction, condition: franky._franky.Condition, motion: franky._franky.BaseTorqueMotion = None) None
Parameters:
  • condition – The condition that must be met for the reaction to be executed.

  • new_motion – The motion that is executed if the condition is met.

register_callback(self: franky._franky.TorqueReaction, callback: collections.abc.Callable[[franky._franky.RobotState, franky._franky.Duration, franky._franky.Duration], None]) None

Register a callback that is called when the condition of this reaction is met.

Parameters:

callback – The callback to register. Callbacks are called with the robot state, the relative time [s] and the absolute time [s].