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

Base class for client-side joint impedance motions. More...

#include <joint_impedance_base.hpp>

Inheritance diagram for franky::JointImpedanceBase:
franky::Motion< franka::Torques > franky::JointImpedanceMotion franky::JointImpedanceTrackingMotion

Public Member Functions

const Vector7dtarget () const
 
const Vector7dtarget_velocity () const
 
const JointImpedanceParamsparams () const
 
void setGains (const JointImpedanceGains &gains)
 
JointImpedanceGains getGains () const
 
void setCartesianGains (const CartesianImpedanceGains &gains)
 
CartesianImpedanceGains getCartesianGains () 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

 JointImpedanceBase (const Vector7d &target, const Vector7d &target_velocity, const JointImpedanceParams &params, double gains_time_constant=0.1)
 
franka::Torques computeCommand (const RobotState &robot_state, const JointReference &reference, double dt)
 
- Protected Member Functions inherited from franky::Motion< franka::Torques >
 Motion ()
 
virtual void initImpl (const RobotState &robot_state, const std::optional< franka::Torques > &previous_command)
 
virtual 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)=0
 
Robotrobot () const
 

Protected Attributes

JointImpedanceParams params_
 
Vector7d target_
 
Vector7d target_velocity_
 

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 &)>
 

Detailed Description

Base class for client-side joint impedance motions.

This class computes joint torques from a joint-space spring-damper law plus optional torque offset/model compensation. Subclasses implement nextCommandImpl and call computeCommand with their current reference.

Constructor & Destructor Documentation

◆ JointImpedanceBase()

franky::JointImpedanceBase::JointImpedanceBase ( const Vector7d target,
const Vector7d target_velocity,
const JointImpedanceParams params,
double  gains_time_constant = 0.1 
)
explicitprotected

Member Function Documentation

◆ computeCommand()

franka::Torques franky::JointImpedanceBase::computeCommand ( const RobotState robot_state,
const JointReference reference,
double  dt 
)
protected

◆ getCartesianGains()

CartesianImpedanceGains franky::JointImpedanceBase::getCartesianGains ( ) const
inline

◆ getGains()

JointImpedanceGains franky::JointImpedanceBase::getGains ( ) const
inline

◆ params()

const JointImpedanceParams & franky::JointImpedanceBase::params ( ) const
inline

◆ setCartesianGains()

void franky::JointImpedanceBase::setCartesianGains ( const CartesianImpedanceGains gains)
inline

◆ setGains()

void franky::JointImpedanceBase::setGains ( const JointImpedanceGains gains)
inline

◆ target()

const Vector7d & franky::JointImpedanceBase::target ( ) const
inline

◆ target_velocity()

const Vector7d & franky::JointImpedanceBase::target_velocity ( ) const
inline

Member Data Documentation

◆ params_

JointImpedanceParams franky::JointImpedanceBase::params_
protected

◆ target_

Vector7d franky::JointImpedanceBase::target_
protected

◆ target_velocity_

Vector7d franky::JointImpedanceBase::target_velocity_
protected

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