humoto
Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Attributes | Private Member Functions | List of all members
humoto::wpg04::ModelState Class Referenceabstract

Detailed Description

Definition at line 16 of file model_state.h.

#include <model_state.h>

Inheritance diagram for humoto::wpg04::ModelState:
Inheritance graph

Public Member Functions

 ModelState ()
 Default constructor. More...
 
 ModelState (const humoto::walking::RobotFootParameters &robot_parameters, const double com_height)
 Construct class using given parameters. 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 set (const humoto::walking::RobotFootParameters &robot_parameters, const double com_height)
 Initialize state using parameters. More...
 
void set (const walking::StanceType::Type current_stance, const rigidbody::PointMassState &com_state, const rigidbody::RigidBodyState &left_foot_state, const rigidbody::RigidBodyState &right_foot_state)
 Initialize state directly with the states of the CoM and feet. More...
 
void setDefaults ()
 Initialize to default values (HRP2) 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...
 

Public Attributes

humoto::rigidbody::PointMassState com_state_
 State of the CoM. More...
 
humoto::LeftRightContainer< humoto::rigidbody::RigidBodyStatefeet_
 States of the feet. More...
 
walking::StanceType::Type next_stance_type_
 next stance type More...
 
walking::StanceType::Type stance_type_
 current stance type More...
 

Protected Member Functions

virtual void finalize ()
 This function is called automaticaly after reading a configuration file. Does nothing by default. 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 (const humoto::walking::RobotFootParameters &foot_param, const double com_height=0.814)
 

Static Protected Attributes

static const bool default_crash_on_missing_entry_
 

Private Member Functions

void initializeFoot (const humoto::walking::RobotFootParameters &foot_param, const humoto::LeftOrRight::Type left_or_right, const double theta, const etools::Vector2 &initial_ds_position)
 Initialize foot state in an ADS. More...
 

Constructor & Destructor Documentation

◆ ModelState() [1/2]

humoto::wpg04::ModelState::ModelState ( )
inline

Default constructor.

Definition at line 101 of file model_state.h.

◆ ModelState() [2/2]

humoto::wpg04::ModelState::ModelState ( const humoto::walking::RobotFootParameters robot_parameters,
const double  com_height 
)
inline

Construct class using given parameters.

Parameters
[in]robot_parametersparameters of the feet
[in]com_heightheight of the CoM (with respect to the feet)

Definition at line 113 of file model_state.h.

Member Function Documentation

◆ finalize()

virtual void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::finalize ( )
inlineprotectedvirtualinherited

This function is called automaticaly after reading a configuration file. Does nothing by default.

Reimplemented in humoto::WeightedSimpleTaskBaseMixin< constraints::ConstraintsGIB< TaskBase > >, humoto::WeightedSimpleTaskBaseMixin< constraints::ConstraintsGILU< TaskBase > >, humoto::WeightedSimpleTaskBaseMixin< constraints::ConstraintsGIL< TaskBase > >, humoto::WeightedSimpleTaskBaseMixin< constraints::ConstraintsGIU< TaskBase > >, humoto::WeightedSimpleTaskBaseMixin< constraints::ConstraintsGIB0< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsAB< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsAB0< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsASU< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsASL< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsASLU< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsAU< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsAL< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsASB< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsALU< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsASB0< TaskBase > >, humoto::pepper_mpc::MPCParameters, humoto::pepper_mpc::MotionParameters, humoto::walking::RobotFootParameters, humoto::wpg04::MPCParameters, humoto::pepper_mpc::RobotParameters, humoto::pepper_ik::WBCParameters, humoto::pepper_ik::GeneralizedCoordinates< t_features >, humoto::wpg04::TaskCoPPosition, humoto::wpg04::TaskCoMVelocity, humoto::wpg04::TaskCoPVelocity, and humoto::wpg04::TaskTerminalConstraint.

Definition at line 102 of file config.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.

◆ initializeFoot()

void humoto::wpg04::ModelState::initializeFoot ( const humoto::walking::RobotFootParameters foot_param,
const humoto::LeftOrRight::Type  left_or_right,
const double  theta,
const etools::Vector2 &  initial_ds_position 
)
inlineprivate

Initialize foot state in an ADS.

Parameters
[in]foot_paramparameters of the feet
[in]left_or_rightleft or right foot
[in]thetaorientation of the ADS
[in]initial_ds_positionposition of the ADS.

Definition at line 38 of file model_state.h.

◆ log()

void humoto::wpg04::ModelState::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 179 of file model_state.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.

◆ set() [1/2]

void humoto::wpg04::ModelState::set ( const humoto::walking::RobotFootParameters robot_parameters,
const double  com_height 
)
inline

Initialize state using parameters.

Parameters
[in]robot_parametersparameters of the feet
[in]com_heightheight of the CoM (with respect to the feet)

Definition at line 137 of file model_state.h.

◆ set() [2/2]

void humoto::wpg04::ModelState::set ( const walking::StanceType::Type  current_stance,
const rigidbody::PointMassState com_state,
const rigidbody::RigidBodyState left_foot_state,
const rigidbody::RigidBodyState right_foot_state 
)
inline

Initialize state directly with the states of the CoM and feet.

Parameters
[in]current_stancecurrent stance
[in]com_statestate of the CoM
[in]left_foot_statestate of the left foot
[in]right_foot_statestate of the right foot

Definition at line 153 of file model_state.h.

◆ setDefaults() [1/2]

void humoto::wpg04::ModelState::setDefaults ( const humoto::walking::RobotFootParameters foot_param,
const double  com_height = 0.814 
)
inlineprotected

Definition at line 60 of file model_state.h.

◆ setDefaults() [2/2]

void humoto::wpg04::ModelState::setDefaults ( )
inlinevirtual

Initialize to default values (HRP2)

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

Definition at line 123 of file model_state.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

◆ com_state_

humoto::rigidbody::PointMassState humoto::wpg04::ModelState::com_state_

State of the CoM.

Definition at line 84 of file model_state.h.

◆ 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.

◆ feet_

States of the feet.

Definition at line 87 of file model_state.h.

◆ next_stance_type_

walking::StanceType::Type humoto::wpg04::ModelState::next_stance_type_

next stance type

Definition at line 93 of file model_state.h.

◆ stance_type_

walking::StanceType::Type humoto::wpg04::ModelState::stance_type_

current stance type

Definition at line 90 of file model_state.h.


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