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

Detailed Description

Definition at line 19 of file model_state.h.

#include <model_state.h>

Inheritance diagram for humoto::pepper_mpc::ModelState:
Inheritance graph

Public Member Functions

 ModelState ()
 Default constructor. More...
 
 ModelState (const double base_height, const double body_height, const double body_x_offset)
 Construct class using given parameters. More...
 
 ModelState (const double &base_mass, const double &body_mass, const etools::Vector3 &base_position, const etools::Vector3 &body_position)
 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::rigidbody::RigidBodyState &base_state, const humoto::rigidbody::PointMassState &body_state)
 Initialize state directly with the states of the CoM and feet. More...
 
void set (const double &base_mass, const double &body_mass, const etools::Vector3 &base_position, const etools::Vector3 &body_position)
 Initialize state. More...
 
void update (const double &base_mass, const double &body_mass, const etools::Vector3 &base_position, const etools::Vector3 &body_position, const double &base_orientation)
 Partial update of the state. 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

double base_mass_
 
humoto::rigidbody::RigidBodyState base_state_
 State of the base. More...
 
double body_mass_
 
humoto::rigidbody::PointMassState body_state_
 State of the body. 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 ()
 Set members to their default values. More...
 
void setParameters (const double base_height=0.125564931735602, const double body_height=7.50001340031501e-01, const double body_x_offset=-0.00656061094036387, const double base_mass=16.34234, const double body_mass=12.3389)
 Set default parameters. More...
 

Static Protected Attributes

static const bool default_crash_on_missing_entry_
 

Constructor & Destructor Documentation

◆ ModelState() [1/3]

humoto::pepper_mpc::ModelState::ModelState ( )
inline

Default constructor.

Definition at line 85 of file model_state.h.

◆ ModelState() [2/3]

humoto::pepper_mpc::ModelState::ModelState ( const double  base_height,
const double  body_height,
const double  body_x_offset 
)
inline

Construct class using given parameters.

Parameters
[in]base_height
[in]body_height
[in]body_x_offsetoffset of the body with respect to the base

Definition at line 98 of file model_state.h.

◆ ModelState() [3/3]

humoto::pepper_mpc::ModelState::ModelState ( const double base_mass,
const double body_mass,
const etools::Vector3 &  base_position,
const etools::Vector3 &  body_position 
)
inline

Construct class using given parameters.

Parameters
[in]base_mass
[in]body_mass
[in]base_position
[in]body_position

Definition at line 114 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.

◆ log()

void humoto::pepper_mpc::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 195 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::pepper_mpc::ModelState::set ( const humoto::rigidbody::RigidBodyState base_state,
const humoto::rigidbody::PointMassState body_state 
)
inline

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

Parameters
[in]base_statestate of the base
[in]body_statestate of the body

Definition at line 130 of file model_state.h.

◆ set() [2/2]

void humoto::pepper_mpc::ModelState::set ( const double base_mass,
const double body_mass,
const etools::Vector3 &  base_position,
const etools::Vector3 &  body_position 
)
inline

Initialize state.

Parameters
[in]base_mass
[in]body_mass
[in]base_position
[in]body_position

Definition at line 146 of file model_state.h.

◆ setDefaults()

void humoto::pepper_mpc::ModelState::setDefaults ( )
inlineprotectedvirtual

Set members to their default values.

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

Definition at line 64 of file model_state.h.

◆ setParameters()

void humoto::pepper_mpc::ModelState::setParameters ( const double  base_height = 0.125564931735602,
const double  body_height = 7.50001340031501e-01,
const double  body_x_offset = -0.00656061094036387,
const double  base_mass = 16.34234,
const double  body_mass = 12.3389 
)
inlineprotected

Set default parameters.

Parameters
[in]base_height
[in]body_height
[in]body_x_offsetoffset of the body with respect to the base
[in]base_mass
[in]body_mass

Definition at line 41 of file model_state.h.

◆ update()

void humoto::pepper_mpc::ModelState::update ( const double base_mass,
const double body_mass,
const etools::Vector3 &  base_position,
const etools::Vector3 &  body_position,
const double base_orientation 
)
inline

Partial update of the state.

Parameters
[in]base_mass
[in]body_mass
[in]base_position
[in]body_position
[in]base_orientation

Definition at line 172 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

◆ base_mass_

double humoto::pepper_mpc::ModelState::base_mass_

Definition at line 77 of file model_state.h.

◆ base_state_

humoto::rigidbody::RigidBodyState humoto::pepper_mpc::ModelState::base_state_

State of the base.

Definition at line 72 of file model_state.h.

◆ body_mass_

double humoto::pepper_mpc::ModelState::body_mass_

Definition at line 78 of file model_state.h.

◆ body_state_

humoto::rigidbody::PointMassState humoto::pepper_mpc::ModelState::body_state_

State of the body.

Definition at line 75 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.


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