franky 1.1.4
A High-Level Motion API for Franka
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Member Functions | List of all members
franky::CartesianImpedanceMotion Class Reference

Cartesian impedance motion. More...

#include <cartesian_impedance_motion.hpp>

Inheritance diagram for franky::CartesianImpedanceMotion:
franky::CartesianImpedanceBase franky::Motion< franka::Torques >

Classes

struct  Params
 Parameters for the Cartesian impedance motion. More...
 

Public Member Functions

 CartesianImpedanceMotion (const Affine &target)
 
 CartesianImpedanceMotion (const Affine &target, const Params &params)
 
 CartesianImpedanceMotion (const Affine &target, const Twist &target_twist)
 
 CartesianImpedanceMotion (const Affine &target, const Twist &target_twist, const Params &params)
 
const Twisttarget_twist () const
 
const Paramsparams () const
 
- Public Member Functions inherited from franky::CartesianImpedanceBase
const Affinetarget () const
 
void setGains (const CartesianImpedanceGains &gains)
 
CartesianImpedanceGains getGains () const
 
void setNullspaceGains (const NullspaceGains &gains)
 
NullspaceGains getNullspaceGains () const
 
- Public Member Functions inherited from franky::Motion< franka::Torques >
virtual ~Motion ()=default
 
void addReaction (std::shared_ptr< Reaction< franka::Torques > > reaction)
 Add a reaction to the motion.
 
void addReactionFront (std::shared_ptr< Reaction< franka::Torques > > reaction)
 Add a reaction to the front of the reaction list.
 
std::vector< std::shared_ptr< Reaction< franka::Torques > > > reactions ()
 Currently registered reactions of the motion.
 
void registerCallback (CallbackType callback)
 Register a callback that is called in every step of the motion.
 
void init (Robot *robot, const RobotState &robot_state, const std::optional< franka::Torques > &previous_command)
 Initialize the motion. Motions can only be started once; this function throws a MotionReuseException on any subsequent call.
 
bool has_started () const
 Whether this motion has already been started. Started motions cannot be started again.
 
franka::Torques nextCommand (const RobotState &robot_state, franka::Duration time_step, franka::Duration rel_time, franka::Duration abs_time, const std::optional< franka::Torques > &previous_command)
 Get the next command of the motion.
 
std::shared_ptr< Motion< franka::Torques > > checkAndCallReactions (const RobotState &robot_state, franka::Duration rel_time, franka::Duration abs_time)
 Check and call reactions.
 

Protected Member Functions

void initImpl (const RobotState &robot_state, const std::optional< franka::Torques > &previous_command) override
 
franka::Torques nextCommandImpl (const RobotState &robot_state, franka::Duration time_step, franka::Duration rel_time, franka::Duration abs_time, const std::optional< franka::Torques > &previous_command) override
 
- Protected Member Functions inherited from franky::CartesianImpedanceBase
 CartesianImpedanceBase (Affine target, const Params &params, double gains_time_constant=0.1)
 
franka::Torques computeCommand (const RobotState &robot_state, const CartesianReference &reference, double dt)
 
const Paramsbase_params () const
 
- Protected Member Functions inherited from franky::Motion< franka::Torques >
 Motion ()
 
Robotrobot () const
 

Additional Inherited Members

- Public Types inherited from franky::Motion< franka::Torques >
using CallbackType = std::function< void(const RobotState &, franka::Duration, franka::Duration, franka::Duration, const franka::Torques &)>
 
- Protected Attributes inherited from franky::CartesianImpedanceBase
Affine target_
 

Detailed Description

Cartesian impedance motion.

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.

Analogous to JointImpedanceMotion, this motion regulates toward a fixed target pose (and optional target twist) and does not terminate on its own. It runs until it is preempted or stopped.

Constructor & Destructor Documentation

◆ CartesianImpedanceMotion() [1/4]

franky::CartesianImpedanceMotion::CartesianImpedanceMotion ( const Affine target)
explicit
Parameters
targetThe target pose.

◆ CartesianImpedanceMotion() [2/4]

franky::CartesianImpedanceMotion::CartesianImpedanceMotion ( const Affine target,
const Params params 
)
explicit
Parameters
targetThe target pose.
paramsParameters for the motion.

◆ CartesianImpedanceMotion() [3/4]

franky::CartesianImpedanceMotion::CartesianImpedanceMotion ( const Affine target,
const Twist target_twist 
)
Parameters
targetThe target pose.
target_twistThe target twist in the base frame. The damping term acts on twist error rather than resisting all motion toward zero.

◆ CartesianImpedanceMotion() [4/4]

franky::CartesianImpedanceMotion::CartesianImpedanceMotion ( const Affine target,
const Twist target_twist,
const Params params 
)
Parameters
targetThe target pose.
target_twistThe target twist in the base frame. The damping term acts on twist error rather than resisting all motion toward zero.
paramsParameters for the motion.

Member Function Documentation

◆ initImpl()

void franky::CartesianImpedanceMotion::initImpl ( const RobotState robot_state,
const std::optional< franka::Torques > &  previous_command 
)
overrideprotectedvirtual

Reimplemented from franky::Motion< franka::Torques >.

◆ nextCommandImpl()

franka::Torques franky::CartesianImpedanceMotion::nextCommandImpl ( const RobotState robot_state,
franka::Duration  time_step,
franka::Duration  rel_time,
franka::Duration  abs_time,
const std::optional< franka::Torques > &  previous_command 
)
overrideprotectedvirtual

◆ params()

const Params & franky::CartesianImpedanceMotion::params ( ) const
inline

◆ target_twist()

const Twist & franky::CartesianImpedanceMotion::target_twist ( ) const
inline

The documentation for this class was generated from the following files: