humoto
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
humoto::constraints::BodyIMixin< t_Base > Class Template Reference

Detailed Description

template<class t_Base>
class humoto::constraints::BodyIMixin< t_Base >

Mixin representing matrix of indices 'I' in a simple constraint.

Template Parameters
t_BaseBase class: humoto::constraints::ConstraintsBase or humoto::TaskBase wrapped with other mixins.

Definition at line 743 of file constraints_mixins.h.

#include <constraints_mixins.h>

Inheritance diagram for humoto::constraints::BodyIMixin< t_Base >:
Inheritance graph

Public Member Functions

virtual void copyBodyTo (Eigen::MatrixXd &A, const Location &location) const
 Copy body to the given matrix. More...
 
virtual void copyNegativeBodyTo (Eigen::MatrixXd &A, const Location &location) const
 Copy body to the given matrix. More...
 
humoto::IndexVectorgetIndices ()
 Get indices. More...
 
const humoto::IndexVectorgetIndices () const
 Get indices. More...
 
std::size_t getNumberOfConstraints () const
 Returns number of constraints in the task. More...
 
double getProduct (const std::size_t i, const Eigen::VectorXd &vector) const
 Compute A(i,:) * vector. More...
 

Protected Member Functions

 BodyIMixin ()
 Default constructor. More...
 
 ~BodyIMixin ()
 Protected destructor: prevent destruction of the child classes through a base pointer. More...
 
void addATA (Eigen::MatrixXd &H) const
 Compute 'A^T * A' for general equality constaints and save or add the result to H. More...
 
void getATA (Eigen::MatrixXd &H) const
 Compute 'A^T * A' for general equality constaints and save or add the result to H. More...
 
void logBody (humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="constraints") const
 Log body. More...
 
virtual void resetBody (const std::size_t number_of_constraints=0, const bool initialize_matrices=false)
 Initialize I and gains. More...
 

Protected Attributes

humoto::IndexVector I_
 

Constructor & Destructor Documentation

◆ ~BodyIMixin()

template<class t_Base>
humoto::constraints::BodyIMixin< t_Base >::~BodyIMixin ( )
inlineprotected

Protected destructor: prevent destruction of the child classes through a base pointer.

Definition at line 754 of file constraints_mixins.h.

◆ BodyIMixin()

template<class t_Base>
humoto::constraints::BodyIMixin< t_Base >::BodyIMixin ( )
inlineprotected

Default constructor.

Definition at line 760 of file constraints_mixins.h.

Member Function Documentation

◆ addATA()

template<class t_Base>
void humoto::constraints::BodyIMixin< t_Base >::addATA ( Eigen::MatrixXd &  H) const
inlineprotected

Compute 'A^T * A' for general equality constaints and save or add the result to H.

Parameters
[in,out]Hleft lower triangular part of the result.
Attention
Only the left lower triangular part of H is formed. Apply appropriate conversion with etools::convertLLTtoSymmetric() before using H.

Definition at line 799 of file constraints_mixins.h.

◆ copyBodyTo()

template<class t_Base>
virtual void humoto::constraints::BodyIMixin< t_Base >::copyBodyTo ( Eigen::MatrixXd &  A,
const Location location 
) const
inlinevirtual

◆ copyNegativeBodyTo()

template<class t_Base>
virtual void humoto::constraints::BodyIMixin< t_Base >::copyNegativeBodyTo ( Eigen::MatrixXd &  A,
const Location location 
) const
inlinevirtual

◆ getATA()

template<class t_Base>
void humoto::constraints::BodyIMixin< t_Base >::getATA ( Eigen::MatrixXd &  H) const
inlineprotected

Compute 'A^T * A' for general equality constaints and save or add the result to H.

Parameters
[in,out]Hleft lower triangular part of the result.
Attention
Only the left lower triangular part of H is formed. Apply appropriate conversion with etools::convertLLTtoSymmetric() before using H.

Definition at line 789 of file constraints_mixins.h.

◆ getIndices() [1/2]

template<class t_Base>
humoto::IndexVector& humoto::constraints::BodyIMixin< t_Base >::getIndices ( )
inline

Get indices.

Returns
indices

Definition at line 852 of file constraints_mixins.h.

◆ getIndices() [2/2]

template<class t_Base>
const humoto::IndexVector& humoto::constraints::BodyIMixin< t_Base >::getIndices ( ) const
inline

Get indices.

Returns
indices

Definition at line 859 of file constraints_mixins.h.

◆ getNumberOfConstraints()

template<class t_Base>
std::size_t humoto::constraints::BodyIMixin< t_Base >::getNumberOfConstraints ( ) const
inline

Returns number of constraints in the task.

Returns
number of constraints

Definition at line 866 of file constraints_mixins.h.

◆ getProduct()

template<class t_Base>
double humoto::constraints::BodyIMixin< t_Base >::getProduct ( const std::size_t  i,
const Eigen::VectorXd &  vector 
) const
inline

Compute A(i,:) * vector.

Parameters
[in]irow index
[in]vectorvector
Returns
result of multiplication

Definition at line 873 of file constraints_mixins.h.

◆ logBody()

template<class t_Base>
void humoto::constraints::BodyIMixin< t_Base >::logBody ( humoto::Logger logger,
const LogEntryName parent = LogEntryName(),
const std::string &  name = "constraints" 
) const
inlineprotected

◆ resetBody()

template<class t_Base>
virtual void humoto::constraints::BodyIMixin< t_Base >::resetBody ( const std::size_t  number_of_constraints = 0,
const bool  initialize_matrices = false 
)
inlineprotectedvirtual

Member Data Documentation

◆ I_

template<class t_Base>
humoto::IndexVector humoto::constraints::BodyIMixin< t_Base >::I_
protected

Definition at line 746 of file constraints_mixins.h.


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