franky.CartesianMotion¶
- class franky.CartesianMotion¶
Bases:
CartesianWaypointMotionCartesian motion with a single target.
- __init__(self: franky._franky.CartesianMotion, target: franky._franky.CartesianState, reference_type: franky._franky.ReferenceType = _franky.ReferenceType.Absolute, relative_dynamics_factor: franky._franky.RelativeDynamicsFactor = 1.0, return_when_finished: bool = True, ee_frame: franky._franky.Affine | None = None) None¶
Construct a Cartesian motion.
- Parameters:
target – The target Cartesian state.
reference_type – The reference type (absolute or relative). An absolute target is defined in the robot’s base frame, a relative target is defined in the current end-effector frame.
relative_dynamics_factor – The relative dynamics factor for this motion. The factor will get multiplied with the robot’s global dynamics factor to get the actual dynamics factor for this motion.
return_when_finished – Whether to end the motion when the target is reached or keep holding the last target.
ee_frame – The end-effector frame for which the target is defined. This is a transformation from the configured end-effector frame to the end-effector frame the target is defined for.
- add_reaction(self: franky._franky.BaseCartesianPoseMotion, reaction: franky._franky.CartesianPoseReaction) 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.BaseCartesianPoseMotion, callback: collections.abc.Callable[[franky._franky.RobotState, franky._franky.Duration, franky._franky.Duration, franky._franky.Duration, franky._franky.CartesianPose], 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 ee_frame¶
The end-effector frame for which the targets are defined.
- property reactions¶
Currently registered reactions of the motion.
- property reference_type¶
The reference type (absolute or relative) of this motion.
- property relative_dynamics_factor¶
The relative dynamics factor of this motion.
- property return_when_finished¶
Whether the motion ends when the last waypoint is reached or keeps holding the last target.
- property target¶
The target of this motion.
- property waypoints¶
The waypoints this motion follows.