humoto
Public Member Functions | Protected Member Functions | Static Protected Attributes | List of all members
humoto::pepper_ik::GeneralizedCoordinates< t_features > Class Template Referenceabstract

Detailed Description

template<int t_features>
class humoto::pepper_ik::GeneralizedCoordinates< t_features >

State of the model.

Template Parameters
t_featuresfeatures which identify model

Definition at line 22 of file generalized_coordinates.h.

#include <generalized_coordinates.h>

Inheritance diagram for humoto::pepper_ik::GeneralizedCoordinates< t_features >:
Inheritance graph

Public Member Functions

 GeneralizedCoordinates ()
 Default constructor. More...
 
 asVector () const
 Returns generalized coordinates as a single vector [root_pose; joint_angles]. More...
 
 EIGENTOOLS_CONSTANT_SIZE_VECTOR (ModelDescription< t_features >::ROOT_DOF_NUMBER) root_pose_
 
 EIGENTOOLS_CONSTANT_SIZE_VECTOR (ModelDescription< t_features >::JOINTS_DOF_NUMBER) joint_angles_
 
void getRootOrientation (etools::Vector3 &rpy) const
 Get orientation of the root. More...
 
void getRootPosition (etools::Vector3 &position) const
 Get position of the root. More...
 
void log (humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="model_state") const
 Log. More...
 
void readConfig (t_Reader &reader, const bool crash_on_missing_entry=default_crash_on_missing_entry_)
 Read configuration (assuming the configuration node to be in the root). More...
 
void readConfig (t_Reader &reader, const std::string &node_name, const bool crash_on_missing_entry=default_crash_on_missing_entry_)
 Read configuration (assuming the configuration node to be in the root). More...
 
void readConfig (t_Reader &reader, const char *node_name, const bool crash_on_missing_entry=default_crash_on_missing_entry_)
 Read configuration (assuming the configuration node to be in the root). More...
 
void readConfig (const std::string &file_name, const bool crash_on_missing_entry=default_crash_on_missing_entry_)
 Read configuration (assuming the configuration node to be in the root). More...
 
void readConfig (const std::string &file_name, const std::string &node_name, const bool crash_on_missing_entry=default_crash_on_missing_entry_)
 Read configuration (assuming the configuration node to be in the root). More...
 
void readConfig (const std::string &file_name, const char *node_name, const bool crash_on_missing_entry=default_crash_on_missing_entry_)
 Read configuration (assuming the configuration node to be in the root). More...
 
void readNestedConfig (t_Reader &reader, const std::string &node_name, const bool crash_on_missing_entry=default_crash_on_missing_entry_)
 Read nested configuration node. More...
 
void setRootOrientation (const etools::Vector3 &rpy)
 Set orientation of the root. More...
 
void setRootPosition (const etools::Vector3 &position)
 Set position of the root. More...
 
void writeConfig (t_Writer &writer) const
 Write configuration. More...
 
void writeConfig (t_Writer &writer, const std::string &node_name) const
 Write configuration. More...
 
void writeConfig (const std::string &file_name) const
 Write configuration. More...
 
void writeConfig (const std::string &file_name, const std::string &node_name) const
 Write configuration. More...
 
void writeNestedConfig (t_Writer &writer) const
 Write nested configuration node. More...
 
void writeNestedConfig (t_Writer &writer, const std::string &node_name) const
 Write nested configuration node. More...
 

Protected Member Functions

void finalize ()
 Check length of the vector of joint angles after reading it from a configuration file. More...
 
virtual const std::string & getConfigSectionID () const=0
 Return the default name of a configuration node corresponding to this class. More...
 
virtual std::size_t getNumberOfEntries () const=0
 Get number of entries in the corresponding configuration node. More...
 
void setDefaults ()
 Default configuration. More...
 

Static Protected Attributes

static const bool default_crash_on_missing_entry_
 

Constructor & Destructor Documentation

◆ GeneralizedCoordinates()

template<int t_features>
humoto::pepper_ik::GeneralizedCoordinates< t_features >::GeneralizedCoordinates ( )
inline

Default constructor.

Definition at line 62 of file generalized_coordinates.h.

Member Function Documentation

◆ asVector()

template<int t_features>
humoto::pepper_ik::GeneralizedCoordinates< t_features >::asVector ( ) const
inline

Returns generalized coordinates as a single vector [root_pose; joint_angles].

Returns
generalized coordinates.

Definition at line 120 of file generalized_coordinates.h.

◆ EIGENTOOLS_CONSTANT_SIZE_VECTOR() [1/2]

template<int t_features>
humoto::pepper_ik::GeneralizedCoordinates< t_features >::EIGENTOOLS_CONSTANT_SIZE_VECTOR ( ModelDescription< t_features >::ROOT_DOF_NUMBER  )

◆ EIGENTOOLS_CONSTANT_SIZE_VECTOR() [2/2]

template<int t_features>
humoto::pepper_ik::GeneralizedCoordinates< t_features >::EIGENTOOLS_CONSTANT_SIZE_VECTOR ( ModelDescription< t_features >::JOINTS_DOF_NUMBER  )

◆ finalize()

template<int t_features>
void humoto::pepper_ik::GeneralizedCoordinates< t_features >::finalize ( )
inlineprotectedvirtual

Check length of the vector of joint angles after reading it from a configuration file.

Reimplemented from humoto::config::CommonConfigurableBase< true >.

Definition at line 46 of file generalized_coordinates.h.

◆ getConfigSectionID()

virtual const std::string& humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::getConfigSectionID ( ) const
protectedpure virtualinherited

Return the default name of a configuration node corresponding to this class.

Returns
the name
Attention
Implementation of this method is added automatically upon inclusion of define_accessors.h if HUMOTO_CONFIG_SECTION_ID is defined.

Implemented in humoto::TaskBase.

◆ getNumberOfEntries()

virtual std::size_t humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::getNumberOfEntries ( ) const
protectedpure virtualinherited

Get number of entries in the corresponding configuration node.

Returns
number of entries

Implemented in humoto::ConfigurableOptimizationProblem.

◆ getRootOrientation()

template<int t_features>
void humoto::pepper_ik::GeneralizedCoordinates< t_features >::getRootOrientation ( etools::Vector3 &  rpy) const
inline

Get orientation of the root.

Parameters
[out]rpy

Definition at line 106 of file generalized_coordinates.h.

◆ getRootPosition()

template<int t_features>
void humoto::pepper_ik::GeneralizedCoordinates< t_features >::getRootPosition ( etools::Vector3 &  position) const
inline

Get position of the root.

Parameters
[out]position

Definition at line 95 of file generalized_coordinates.h.

◆ log()

template<int t_features>
void humoto::pepper_ik::GeneralizedCoordinates< t_features >::log ( humoto::Logger logger,
const LogEntryName parent = LogEntryName(),
const std::string &  name = "model_state" 
) const
inlinevirtual

Log.

Parameters
[in,out]loggerlogger
[in]parentparent
[in]namename

Implements humoto::ModelState.

Definition at line 135 of file generalized_coordinates.h.

◆ readConfig() [1/6]

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::readConfig ( t_Reader &  reader,
const bool  crash_on_missing_entry = default_crash_on_missing_entry_ 
)
inlineinherited

Read configuration (assuming the configuration node to be in the root).

Parameters
[in]readerconfiguration reader
[in]crash_on_missing_entry

Definition at line 167 of file config.h.

◆ readConfig() [2/6]

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::readConfig ( t_Reader &  reader,
const std::string &  node_name,
const bool  crash_on_missing_entry = default_crash_on_missing_entry_ 
)
inlineinherited

Read configuration (assuming the configuration node to be in the root).

Parameters
[in]readerconfiguration reader
[in]crash_on_missing_entry
[in]node_namenode name, the default is used if empty

Definition at line 183 of file config.h.

◆ readConfig() [3/6]

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::readConfig ( t_Reader &  reader,
const char *  node_name,
const bool  crash_on_missing_entry = default_crash_on_missing_entry_ 
)
inlineinherited

Read configuration (assuming the configuration node to be in the root).

Parameters
[in]readerconfiguration reader
[in]crash_on_missing_entry
[in]node_namenode name, the default is used if empty
Note
Intercept implicit conversion of a pointer to bool.

Definition at line 202 of file config.h.

◆ readConfig() [4/6]

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::readConfig ( const std::string &  file_name,
const bool  crash_on_missing_entry = default_crash_on_missing_entry_ 
)
inlineinherited

Read configuration (assuming the configuration node to be in the root).

Parameters
[in]file_namefile name
[in]crash_on_missing_entry

Definition at line 218 of file config.h.

◆ readConfig() [5/6]

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::readConfig ( const std::string &  file_name,
const std::string &  node_name,
const bool  crash_on_missing_entry = default_crash_on_missing_entry_ 
)
inlineinherited

Read configuration (assuming the configuration node to be in the root).

Parameters
[in]file_namefile name
[in]node_namenode name, the default is used if empty
[in]crash_on_missing_entry

Definition at line 235 of file config.h.

◆ readConfig() [6/6]

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::readConfig ( const std::string &  file_name,
const char *  node_name,
const bool  crash_on_missing_entry = default_crash_on_missing_entry_ 
)
inlineinherited

Read configuration (assuming the configuration node to be in the root).

Parameters
[in]file_namefile name
[in]crash_on_missing_entry
[in]node_namenode name, the default is used if empty
Note
Intercept implicit conversion of a pointer to bool.

Definition at line 255 of file config.h.

◆ readNestedConfig()

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::readNestedConfig ( t_Reader &  reader,
const std::string &  node_name,
const bool  crash_on_missing_entry = default_crash_on_missing_entry_ 
)
inlineinherited

Read nested configuration node.

Parameters
[in]reader
[in]crash_on_missing_entry
[in]node_namenode name, the default is used if empty

Definition at line 132 of file config.h.

◆ setDefaults()

template<int t_features>
void humoto::pepper_ik::GeneralizedCoordinates< t_features >::setDefaults ( )
inlineprotectedvirtual

Default configuration.

Implements humoto::config::CommonConfigurableBase< true >.

Definition at line 36 of file generalized_coordinates.h.

◆ setRootOrientation()

template<int t_features>
void humoto::pepper_ik::GeneralizedCoordinates< t_features >::setRootOrientation ( const etools::Vector3 &  rpy)
inline

Set orientation of the root.

Parameters
[in]rpy

Definition at line 84 of file generalized_coordinates.h.

◆ setRootPosition()

template<int t_features>
void humoto::pepper_ik::GeneralizedCoordinates< t_features >::setRootPosition ( const etools::Vector3 &  position)
inline

Set position of the root.

Parameters
[in]position

Definition at line 73 of file generalized_coordinates.h.

◆ writeConfig() [1/4]

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::writeConfig ( t_Writer &  writer) const
inlineinherited

Write configuration.

Parameters
[in,out]writerconfiguration writer

Definition at line 300 of file config.h.

◆ writeConfig() [2/4]

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::writeConfig ( t_Writer &  writer,
const std::string &  node_name 
) const
inlineinherited

Write configuration.

Parameters
[in,out]writerconfiguration writer
[in]node_namenode name, the default is used if empty

Definition at line 313 of file config.h.

◆ writeConfig() [3/4]

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::writeConfig ( const std::string &  file_name) const
inlineinherited

Write configuration.

Parameters
[in]file_namefile name

Definition at line 328 of file config.h.

◆ writeConfig() [4/4]

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::writeConfig ( const std::string &  file_name,
const std::string &  node_name 
) const
inlineinherited

Write configuration.

Parameters
[in]file_namefile name
[in]node_namenode name, the default is used if empty

Definition at line 342 of file config.h.

◆ writeNestedConfig() [1/2]

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::writeNestedConfig ( t_Writer &  writer) const
inlineinherited

Write nested configuration node.

Parameters
[in,out]writerconfiguration writer

Definition at line 272 of file config.h.

◆ writeNestedConfig() [2/2]

void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::writeNestedConfig ( t_Writer &  writer,
const std::string &  node_name 
) const
inlineinherited

Write nested configuration node.

Parameters
[in,out]writerconfiguration writer
[in]node_namenode name, the default is used if empty

Definition at line 285 of file config.h.

Member Data Documentation

◆ default_crash_on_missing_entry_

const bool humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::default_crash_on_missing_entry_
staticprotectedinherited

Definition at line 67 of file config.h.


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