Control Libraries 6.3.4
|
Definition of a dissipative impedance controller (PassiveDS) in task space. More...
#include <Dissipative.hpp>
Public Member Functions | |
Dissipative (const ComputationalSpaceType &computational_space, unsigned int dimensions=6) | |
Base constructor. More... | |
Dissipative (const std::list< std::shared_ptr< state_representation::ParameterInterface > > ¶meters, const ComputationalSpaceType &computational_space, unsigned int dimensions=6) | |
Constructor from an initial parameter list. More... | |
S | 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. More... | |
![]() | |
Impedance (unsigned int dimensions=6) | |
Base constructor. More... | |
Impedance (const std::list< std::shared_ptr< state_representation::ParameterInterface > > ¶meters, unsigned int dimensions=6) | |
Constructor from an initial parameter list. More... | |
S | 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. More... | |
CartesianState | compute_command (const CartesianState &command_state, const CartesianState &feedback_state) |
JointState | compute_command (const JointState &command_state, const JointState &feedback_state) |
![]() | |
IController ()=default | |
Empty constructor. | |
virtual | ~IController ()=default |
Empty destructor. | |
virtual S | compute_command (const S &command_state, const S &feedback_state)=0 |
Compute the command output based on the commanded state and a feedback state To be redefined based on the actual controller implementation. More... | |
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. More... | |
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. More... | |
const robot_model::Model & | get_robot_model () |
Get the robot model associated with the controller. More... | |
void | set_robot_model (const robot_model::Model &robot_model) |
Set the robot model associated with the controller. More... | |
![]() | |
ParameterMap ()=default | |
Empty constructor. | |
ParameterMap (const ParameterInterfaceList ¶meters) | |
Construct the parameter map with an initial list of parameters. More... | |
ParameterMap (const ParameterInterfaceMap ¶meters) | |
Construct the parameter map with an initial map of parameters. More... | |
std::shared_ptr< ParameterInterface > | get_parameter (const std::string &name) const |
Get a parameter by its name. More... | |
ParameterInterfaceMap | get_parameters () const |
Get a map of all the <name, parameter> pairs. More... | |
template<typename T > | |
T | get_parameter_value (const std::string &name) const |
Get a parameter value by its name. More... | |
ParameterInterfaceList | get_parameter_list () const |
Get a list of all the parameters. More... | |
void | set_parameter (const std::shared_ptr< ParameterInterface > ¶meter) |
Set a parameter. More... | |
void | set_parameters (const ParameterInterfaceList ¶meters) |
Set parameters from a list of parameters. More... | |
void | set_parameters (const ParameterInterfaceMap ¶meters) |
Set parameters from a map with <name, parameter> pairs. More... | |
template<typename T > | |
void | set_parameter_value (const std::string &name, const T &value) |
Set a parameter value by its name. More... | |
void | remove_parameter (const std::string &name) |
Remove a parameter from the parameter map. More... | |
Protected Member Functions | |
void | validate_and_set_parameter (const std::shared_ptr< state_representation::ParameterInterface > ¶meter) override |
Validate and set parameter for damping eigenvalues. More... | |
Eigen::MatrixXd | compute_orthonormal_basis (const S &desired_velocity) |
Compute the orthonormal basis based on the desired velocity input. More... | |
void | compute_damping (const S &desired_velocity) |
Compute the damping matrix as the orthonormal basis to the direction of the desired velocity. More... | |
Eigen::MatrixXd | compute_orthonormal_basis (const CartesianState &desired_velocity) |
Eigen::MatrixXd | compute_orthonormal_basis (const JointState &desired_velocity) |
![]() | |
void | clamp_force (Eigen::VectorXd &force) |
void | validate_and_set_parameter (const std::shared_ptr< state_representation::ParameterInterface > ¶meter) override |
Validate and set parameters for damping, stiffness and inertia gain matrices. More... | |
Eigen::MatrixXd | gain_matrix_from_parameter (const std::shared_ptr< state_representation::ParameterInterface > ¶meter) |
Convert a parameterized gain to a gain matrix. More... | |
![]() | |
virtual void | validate_and_set_parameter (const std::shared_ptr< ParameterInterface > ¶meter) |
Validate and set a parameter in the map. More... | |
void | assert_parameter_valid (const std::shared_ptr< ParameterInterface > ¶meter) |
Check if a parameter has the expected type, throw an exception otherwise. More... | |
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. More... | |
Protected Attributes | |
std::shared_ptr< state_representation::Parameter< Eigen::VectorXd > > | damping_eigenvalues_ |
coefficient of eigenvalues used in the damping matrix computation More... | |
const ComputationalSpaceType | computational_space_ |
the space in which to compute the command vector More... | |
Eigen::MatrixXd | basis_ |
basis matrix used to compute the damping matrix More... | |
![]() | |
std::shared_ptr< state_representation::Parameter< Eigen::MatrixXd > > | stiffness_ |
stiffness matrix of the controller associated to position More... | |
std::shared_ptr< state_representation::Parameter< Eigen::MatrixXd > > | damping_ |
damping matrix of the controller associated to velocity More... | |
std::shared_ptr< state_representation::Parameter< Eigen::MatrixXd > > | inertia_ |
inertia matrix of the controller associated to acceleration More... | |
std::shared_ptr< state_representation::Parameter< Eigen::VectorXd > > | force_limit_ |
vector of force limits for each degree of freedom More... | |
const unsigned int | dimensions_ |
dimensionality of the control space and associated gain matrices More... | |
![]() | |
std::shared_ptr< robot_model::Model > | robot_model_ |
The robot model associated with the controller. More... | |
![]() | |
ParameterInterfaceMap | parameters_ |
map of parameters by name More... | |
Definition of a dissipative impedance controller (PassiveDS) in task space.
Definition at line 28 of file Dissipative.hpp.
|
explicit |
Base constructor.
computational_space | The computational space type |
dimensions | The number of dimensions |
Definition at line 102 of file Dissipative.hpp.
|
explicit |
Constructor from an initial parameter list.
parameters | A parameter list containing the initial parameters |
computational_space | The computational space type |
dimensions | The number of dimensions |
Definition at line 119 of file Dissipative.hpp.
|
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.
command_state | the desired state to reach |
feedback_state | the real state of the system as read from feedback loop |
Implements controllers::IController< S >.
Definition at line 153 of file Dissipative.hpp.
|
protected |
Compute the damping matrix as the orthonormal basis to the direction of the desired velocity.
desired_velocity | the velocity from which the direction of motion is extracted to compute the basis |
Definition at line 163 of file Dissipative.hpp.
|
protected |
Definition at line 16 of file Dissipative.cpp.
|
protected |
Definition at line 79 of file Dissipative.cpp.
|
protected |
Compute the orthonormal basis based on the desired velocity input.
desired_velocity | the desired velocity used as main eigenvector used to compute the basis. Other eigenvectors are orthogonal and selected randomly |
Definition at line 10 of file Dissipative.cpp.
|
staticprotected |
Orthornormalize the basis matrix given in input wrt the main engenvector.
basis | the basis matrix to orthonormalize |
main_eigenvector | the main eigenvector used to compute the basis. Other eigenvectors are orthogonal and selected randomly |
Definition at line 137 of file Dissipative.hpp.
|
overrideprotected |
Validate and set parameter for damping eigenvalues.
parameter | A parameter interface pointer |
Definition at line 128 of file Dissipative.hpp.
|
protected |
basis matrix used to compute the damping matrix
Definition at line 97 of file Dissipative.hpp.
|
protected |
the space in which to compute the command vector
Definition at line 95 of file Dissipative.hpp.
|
protected |
coefficient of eigenvalues used in the damping matrix computation
Definition at line 93 of file Dissipative.hpp.