Control Libraries 7.4.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
controllers::impedance::Dissipative< S > Class Template Reference

Definition of a dissipative impedance controller (PassiveDS) in task space. More...

#include <Dissipative.hpp>

Inheritance diagram for controllers::impedance::Dissipative< S >:
controllers::impedance::Impedance< S > controllers::IController< S > state_representation::ParameterMap

Public Member Functions

 Dissipative (const ComputationalSpaceType &computational_space, unsigned int dimensions=6)
 Base constructor.
 
 Dissipative (const std::list< std::shared_ptr< state_representation::ParameterInterface > > &parameters, const ComputationalSpaceType &computational_space, unsigned int dimensions=6)
 Constructor from an initial parameter list.
 
compute_command (const S &command_state, const S &feedback_state) override
 Compute the force (task space) or torque (joint space) command based on the input state of the system as the error between the desired state and the real state.
 
- Public Member Functions inherited from controllers::impedance::Impedance< S >
 Impedance (unsigned int dimensions=6)
 Base constructor.
 
 Impedance (const std::list< std::shared_ptr< state_representation::ParameterInterface > > &parameters, unsigned int dimensions=6)
 Constructor from an initial parameter list.
 
compute_command (const S &command_state, const S &feedback_state) override
 Compute the command output based on the commanded state and a feedback state To be redefined based on the actual controller implementation.
 
CartesianState compute_command (const CartesianState &command_state, const CartesianState &feedback_state)
 
JointState compute_command (const JointState &command_state, const JointState &feedback_state)
 
- Public Member Functions inherited from controllers::IController< S >
 IController ()=default
 Empty constructor.
 
virtual ~IController ()=default
 Empty destructor.
 
state_representation::JointState compute_command (const S &command_state, const S &feedback_state, const state_representation::Jacobian &jacobian)
 Compute the command output in joint space.
 
state_representation::JointState compute_command (const S &command_state, const S &feedback_state, const state_representation::JointPositions &joint_positions, const std::string &frame="")
 Compute the command output in joint space from command and feedback states in task space.
 
const robot_model::Modelget_robot_model ()
 Get the robot model associated with the controller.
 
void set_robot_model (const robot_model::Model &robot_model)
 Set the robot model associated with the controller.
 
- Public Member Functions inherited from state_representation::ParameterMap
 ParameterMap ()=default
 Empty constructor.
 
 ParameterMap (const ParameterInterfaceList &parameters)
 Construct the parameter map with an initial list of parameters.
 
 ParameterMap (const ParameterInterfaceMap &parameters)
 Construct the parameter map with an initial map of parameters.
 
std::shared_ptr< ParameterInterfaceget_parameter (const std::string &name) const
 Get a parameter by its name.
 
ParameterInterfaceMap get_parameters () const
 Get a map of all the <name, parameter> pairs.
 
template<typename T >
get_parameter_value (const std::string &name) const
 Get a parameter value by its name.
 
ParameterInterfaceList get_parameter_list () const
 Get a list of all the parameters.
 
void set_parameter (const std::shared_ptr< ParameterInterface > &parameter)
 Set a parameter.
 
void set_parameters (const ParameterInterfaceList &parameters)
 Set parameters from a list of parameters.
 
void set_parameters (const ParameterInterfaceMap &parameters)
 Set parameters from a map with <name, parameter> pairs.
 
template<typename T >
void set_parameter_value (const std::string &name, const T &value)
 Set a parameter value by its name.
 
void remove_parameter (const std::string &name)
 Remove a parameter from the parameter map.
 

Protected Member Functions

void validate_and_set_parameter (const std::shared_ptr< state_representation::ParameterInterface > &parameter) override
 Validate and set parameter for damping eigenvalues.
 
Eigen::MatrixXd compute_orthonormal_basis (const S &desired_velocity)
 Compute the orthonormal basis based on the desired velocity input.
 
void compute_damping (const S &desired_velocity)
 Compute the damping matrix as the orthonormal basis to the direction of the desired velocity.
 
Eigen::MatrixXd compute_orthonormal_basis (const CartesianState &desired_velocity)
 
Eigen::MatrixXd compute_orthonormal_basis (const JointState &desired_velocity)
 
- Protected Member Functions inherited from controllers::impedance::Impedance< S >
void clamp_force (Eigen::VectorXd &force)
 
void validate_and_set_parameter (const std::shared_ptr< state_representation::ParameterInterface > &parameter) override
 Validate and set parameters for damping, stiffness and inertia gain matrices.
 
Eigen::MatrixXd gain_matrix_from_parameter (const std::shared_ptr< state_representation::ParameterInterface > &parameter)
 Convert a parameterized gain to a gain matrix.
 
- Protected Member Functions inherited from state_representation::ParameterMap
virtual void validate_and_set_parameter (const std::shared_ptr< ParameterInterface > &parameter)
 Validate and set a parameter in the map.
 
void assert_parameter_valid (const std::shared_ptr< ParameterInterface > &parameter)
 Check if a parameter exists and has the expected type, throw an exception otherwise.
 

Static Protected Member Functions

static Eigen::MatrixXd orthonormalize_basis (const Eigen::MatrixXd &basis, const Eigen::VectorXd &main_eigenvector)
 Orthornormalize the basis matrix given in input wrt the main engenvector.
 

Protected Attributes

std::shared_ptr< state_representation::Parameter< Eigen::VectorXd > > damping_eigenvalues_
 coefficient of eigenvalues used in the damping matrix computation
 
const ComputationalSpaceType computational_space_
 the space in which to compute the command vector
 
Eigen::MatrixXd basis_
 basis matrix used to compute the damping matrix
 
- Protected Attributes inherited from controllers::impedance::Impedance< S >
std::shared_ptr< state_representation::Parameter< Eigen::MatrixXd > > stiffness_
 stiffness matrix of the controller associated to position
 
std::shared_ptr< state_representation::Parameter< Eigen::MatrixXd > > damping_
 damping matrix of the controller associated to velocity
 
std::shared_ptr< state_representation::Parameter< Eigen::MatrixXd > > inertia_
 inertia matrix of the controller associated to acceleration
 
std::shared_ptr< state_representation::Parameter< bool > > feed_forward_force_
 flag to decide if force error should be passed on
 
std::shared_ptr< state_representation::Parameter< Eigen::VectorXd > > force_limit_
 vector of force limits for each degree of freedom
 
const unsigned int dimensions_
 dimensionality of the control space and associated gain matrices
 
- Protected Attributes inherited from controllers::IController< S >
std::shared_ptr< robot_model::Modelrobot_model_
 The robot model associated with the controller.
 
- Protected Attributes inherited from state_representation::ParameterMap
ParameterInterfaceMap parameters_
 map of parameters by name
 

Detailed Description

template<class S>
class controllers::impedance::Dissipative< S >

Definition of a dissipative impedance controller (PassiveDS) in task space.

Definition at line 28 of file Dissipative.hpp.

Constructor & Destructor Documentation

◆ Dissipative() [1/2]

template<class S >
controllers::impedance::Dissipative< S >::Dissipative ( const ComputationalSpaceType &  computational_space,
unsigned int  dimensions = 6 
)
explicit

Base constructor.

Parameters
computational_spaceThe computational space type
dimensionsThe number of dimensions

Definition at line 102 of file Dissipative.hpp.

◆ Dissipative() [2/2]

template<class S >
controllers::impedance::Dissipative< S >::Dissipative ( const std::list< std::shared_ptr< state_representation::ParameterInterface > > &  parameters,
const ComputationalSpaceType &  computational_space,
unsigned int  dimensions = 6 
)
explicit

Constructor from an initial parameter list.

Parameters
parametersA parameter list containing the initial parameters
computational_spaceThe computational space type
dimensionsThe number of dimensions

Definition at line 119 of file Dissipative.hpp.

Member Function Documentation

◆ compute_command()

template<class S >
S controllers::impedance::Dissipative< S >::compute_command ( const S &  command_state,
const S &  feedback_state 
)
overridevirtual

Compute the force (task space) or torque (joint space) command based on the input state of the system as the error between the desired state and the real state.

Parameters
command_statethe desired state to reach
feedback_statethe real state of the system as read from feedback loop
Returns
the output command at the input state

Implements controllers::IController< S >.

Definition at line 153 of file Dissipative.hpp.

◆ compute_damping()

template<class S >
void controllers::impedance::Dissipative< S >::compute_damping ( const S &  desired_velocity)
protected

Compute the damping matrix as the orthonormal basis to the direction of the desired velocity.

Parameters
desired_velocitythe velocity from which the direction of motion is extracted to compute the basis

Definition at line 163 of file Dissipative.hpp.

◆ compute_orthonormal_basis() [1/3]

Eigen::MatrixXd controllers::impedance::Dissipative< CartesianState >::compute_orthonormal_basis ( const CartesianState desired_velocity)
protected

Definition at line 16 of file Dissipative.cpp.

◆ compute_orthonormal_basis() [2/3]

Eigen::MatrixXd controllers::impedance::Dissipative< JointState >::compute_orthonormal_basis ( const JointState desired_velocity)
protected

Definition at line 79 of file Dissipative.cpp.

◆ compute_orthonormal_basis() [3/3]

template<class S >
Eigen::MatrixXd controllers::impedance::Dissipative< S >::compute_orthonormal_basis ( const S &  desired_velocity)
protected

Compute the orthonormal basis based on the desired velocity input.

Parameters
desired_velocitythe desired velocity used as main eigenvector used to compute the basis. Other eigenvectors are orthogonal and selected randomly
Returns
the orthonormalized basis

Definition at line 10 of file Dissipative.cpp.

◆ orthonormalize_basis()

template<class S >
Eigen::MatrixXd controllers::impedance::Dissipative< S >::orthonormalize_basis ( const Eigen::MatrixXd &  basis,
const Eigen::VectorXd &  main_eigenvector 
)
staticprotected

Orthornormalize the basis matrix given in input wrt the main engenvector.

Parameters
basisthe basis matrix to orthonormalize
main_eigenvectorthe main eigenvector used to compute the basis. Other eigenvectors are orthogonal and selected randomly
Returns
the orthonormalized basis

Definition at line 137 of file Dissipative.hpp.

◆ validate_and_set_parameter()

template<class S >
void controllers::impedance::Dissipative< S >::validate_and_set_parameter ( const std::shared_ptr< state_representation::ParameterInterface > &  parameter)
overrideprotected

Validate and set parameter for damping eigenvalues.

Parameters
parameterA parameter interface pointer

Definition at line 128 of file Dissipative.hpp.

Member Data Documentation

◆ basis_

template<class S >
Eigen::MatrixXd controllers::impedance::Dissipative< S >::basis_
protected

basis matrix used to compute the damping matrix

Definition at line 97 of file Dissipative.hpp.

◆ computational_space_

template<class S >
const ComputationalSpaceType controllers::impedance::Dissipative< S >::computational_space_
protected

the space in which to compute the command vector

Definition at line 95 of file Dissipative.hpp.

◆ damping_eigenvalues_

template<class S >
std::shared_ptr<state_representation::Parameter<Eigen::VectorXd> > controllers::impedance::Dissipative< S >::damping_eigenvalues_
protected

coefficient of eigenvalues used in the damping matrix computation

Definition at line 93 of file Dissipative.hpp.


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