Control Libraries 7.4.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
controllers::impedance::CompliantTwist Class Reference

A concrete controller class specifically for controlling 6 degree of freedom Cartesian twist with a combination of impedance controllers. The linear velocity is controlled with the Dissipative controller class, while the angular velocity is controlled with the VelocityImpedance class. More...

#include <CompliantTwist.hpp>

Inheritance diagram for controllers::impedance::CompliantTwist:
controllers::IController< state_representation::CartesianState > state_representation::ParameterMap

Public Member Functions

 CompliantTwist (const std::list< std::shared_ptr< state_representation::ParameterInterface > > &parameters)
 Constructor from an initial parameter list.
 
 CompliantTwist (double linear_principle_damping, double linear_orthogonal_damping, double angular_stiffness, double angular_damping)
 Constructor taking gain parameters as arguments.
 
state_representation::CartesianState compute_command (const state_representation::CartesianState &desired_state, const state_representation::CartesianState &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::IController< state_representation::CartesianState >
 IController ()=default
 Empty constructor.
 
virtual ~IController ()=default
 Empty destructor.
 
state_representation::JointState compute_command (const state_representation::CartesianState &command_state, const state_representation::CartesianState &feedback_state, const state_representation::Jacobian &jacobian)
 Compute the command output in joint space.
 
state_representation::JointState compute_command (const state_representation::CartesianState &command_state, const state_representation::CartesianState &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 parameters for controller gains.
 
void set_linear_principle_damping (double linear_principle_damping)
 Setter of the linear principle damping.
 
void set_linear_orthogonal_damping (double linear_orthogonal_damping)
 Setter of the linear orthogonal damping.
 
void set_linear_gains (double linear_principle_damping, double linear_orthogonal_damping)
 Setter of the linear damping values.
 
void set_angular_stiffness (double angular_stiffness)
 Setter of the angular stiffness.
 
void set_angular_damping (double angular_damping)
 Setter of the angular damping.
 
void set_angular_gains (double angular_stiffness, double angular_damping)
 Setter of the angular damping.
 
- 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.
 

Protected Attributes

std::shared_ptr< state_representation::Parameter< double > > linear_principle_damping_
 damping along principle eigenvector of linear velocity error
 
std::shared_ptr< state_representation::Parameter< double > > linear_orthogonal_damping_
 damping along secondary eigenvectors of linear velocity error
 
std::shared_ptr< state_representation::Parameter< double > > angular_stiffness_
 stiffness of angular displacement
 
std::shared_ptr< state_representation::Parameter< double > > angular_damping_
 damping of angular velocity error
 
Dissipative< state_representation::CartesianStatedissipative_ctrl_
 controller for linear space
 
VelocityImpedance< state_representation::CartesianStatevelocity_impedance_ctrl_
 controller for angular space
 
- Protected Attributes inherited from controllers::IController< state_representation::CartesianState >
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

A concrete controller class specifically for controlling 6 degree of freedom Cartesian twist with a combination of impedance controllers. The linear velocity is controlled with the Dissipative controller class, while the angular velocity is controlled with the VelocityImpedance class.

Definition at line 17 of file CompliantTwist.hpp.

Constructor & Destructor Documentation

◆ CompliantTwist() [1/2]

controllers::impedance::CompliantTwist::CompliantTwist ( const std::list< std::shared_ptr< state_representation::ParameterInterface > > &  parameters)
explicit

Constructor from an initial parameter list.

Parameters
parametersA parameter list containing initial gain values

Definition at line 28 of file CompliantTwist.cpp.

◆ CompliantTwist() [2/2]

controllers::impedance::CompliantTwist::CompliantTwist ( double  linear_principle_damping,
double  linear_orthogonal_damping,
double  angular_stiffness,
double  angular_damping 
)

Constructor taking gain parameters as arguments.

Parameters
linear_principle_dampingdamping along principle eigenvector of linear velocity error
linear_orthogonal_dampingdamping along secondary eigenvectors of linear velocity error
angular_stiffnessstiffness of angular displacement
angular_dampingdamping of angular velocity error

Definition at line 9 of file CompliantTwist.cpp.

Member Function Documentation

◆ compute_command()

CartesianState controllers::impedance::CompliantTwist::compute_command ( const state_representation::CartesianState desired_state,
const state_representation::CartesianState 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
desired_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< state_representation::CartesianState >.

Definition at line 71 of file CompliantTwist.cpp.

◆ set_angular_damping()

void controllers::impedance::CompliantTwist::set_angular_damping ( double  angular_damping)
protected

Setter of the angular damping.

Parameters
thenew damping value

Definition at line 55 of file CompliantTwist.cpp.

◆ set_angular_gains()

void controllers::impedance::CompliantTwist::set_angular_gains ( double  angular_stiffness,
double  angular_damping 
)
protected

Setter of the angular damping.

Parameters
angular_stiffnessthe new angular stiffness value
angular_dampingthe new angular damping value

Definition at line 59 of file CompliantTwist.cpp.

◆ set_angular_stiffness()

void controllers::impedance::CompliantTwist::set_angular_stiffness ( double  angular_stiffness)
protected

Setter of the angular stiffness.

Parameters
thenew stiffness value

Definition at line 51 of file CompliantTwist.cpp.

◆ set_linear_gains()

void controllers::impedance::CompliantTwist::set_linear_gains ( double  linear_principle_damping,
double  linear_orthogonal_damping 
)
protected

Setter of the linear damping values.

Parameters
linear_principle_dampingthe new principle damping value
linear_orthogonal_dampingthe new orthogonal damping value

Definition at line 42 of file CompliantTwist.cpp.

◆ set_linear_orthogonal_damping()

void controllers::impedance::CompliantTwist::set_linear_orthogonal_damping ( double  linear_orthogonal_damping)
protected

Setter of the linear orthogonal damping.

Parameters
thenew orthogonal damping value

Definition at line 38 of file CompliantTwist.cpp.

◆ set_linear_principle_damping()

void controllers::impedance::CompliantTwist::set_linear_principle_damping ( double  linear_principle_damping)
protected

Setter of the linear principle damping.

Parameters
thenew principle damping value

Definition at line 34 of file CompliantTwist.cpp.

◆ validate_and_set_parameter()

void controllers::impedance::CompliantTwist::validate_and_set_parameter ( const std::shared_ptr< state_representation::ParameterInterface > &  parameter)
overrideprotected

Validate and set parameters for controller gains.

Parameters
parameterA parameter interface pointer

Definition at line 79 of file CompliantTwist.cpp.

Member Data Documentation

◆ angular_damping_

std::shared_ptr<state_representation::Parameter<double> > controllers::impedance::CompliantTwist::angular_damping_
protected

damping of angular velocity error

Definition at line 104 of file CompliantTwist.hpp.

◆ angular_stiffness_

std::shared_ptr<state_representation::Parameter<double> > controllers::impedance::CompliantTwist::angular_stiffness_
protected

stiffness of angular displacement

Definition at line 103 of file CompliantTwist.hpp.

◆ dissipative_ctrl_

Dissipative<state_representation::CartesianState> controllers::impedance::CompliantTwist::dissipative_ctrl_
protected

controller for linear space

Definition at line 106 of file CompliantTwist.hpp.

◆ linear_orthogonal_damping_

std::shared_ptr<state_representation::Parameter<double> > controllers::impedance::CompliantTwist::linear_orthogonal_damping_
protected

damping along secondary eigenvectors of linear velocity error

Definition at line 102 of file CompliantTwist.hpp.

◆ linear_principle_damping_

std::shared_ptr<state_representation::Parameter<double> > controllers::impedance::CompliantTwist::linear_principle_damping_
protected

damping along principle eigenvector of linear velocity error

Definition at line 100 of file CompliantTwist.hpp.

◆ velocity_impedance_ctrl_

VelocityImpedance<state_representation::CartesianState> controllers::impedance::CompliantTwist::velocity_impedance_ctrl_
protected

controller for angular space

Definition at line 107 of file CompliantTwist.hpp.


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