franky.Reaction

class franky.Reaction(condition: Condition, motion: BaseCartesianPoseMotion | BaseCartesianVelocityMotion | BaseJointPositionMotion | BaseJointVelocityMotion | BaseTorqueMotion)

Bases: object

A reaction that can be attached to a motion.

Reactions consist of a condition and a motion that replaces the current motion immediately if the condition is met. This class dispatches to the reaction type matching the given motion (e.g. CartesianPoseReaction for Cartesian pose motions), as reactions can only replace motions of the same control signal type.

Parameters:
  • condition – The condition that must be met for the reaction to be executed.

  • motion – The motion that replaces the current motion if the condition is met.