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

Detailed Description

[initialize_model.m]

Todo:
AS. Currently the state of the swing foot is not updated during the swing phase, i.e. it is the same as it was in the end of the preceding TDS. It may be more reasonable to undefine this state instead.

Definition at line 25 of file model.h.

#include <model.h>

Inheritance diagram for humoto::wpg04::Model:
Inheritance graph

Public Member Functions

 Model ()
 Default constructor. More...
 
etools::Matrix2 getADSCoPBounds () const
 Return bounds on position of the CoP in ADS / SS. More...
 
etools::Vector2 getADSPositionFromFoot (const humoto::LeftOrRight::Type left_or_right, const etools::Matrix2 &ref_R, const etools::Vector2 &ref_position) const
 Get position of a foot or aligned double support based on position of an aligned support or a foot. More...
 
double getCoMHeight () const
 Get CoM height. More...
 
humoto::rigidbody::PointMassState getCoMState () const
 Returns current CoM state. More...
 
etools::Vector6 getCState () const
 Get cstate. More...
 
etools::Matrix2 getFootBounds (const humoto::LeftOrRight::Type left_or_right, const FootBoundsType::Type bounds_type) const
 Get bounds on position of a foot. More...
 
etools::Vector2 getFootPositionFromADS (const humoto::LeftOrRight::Type left_or_right, const etools::Matrix2 &ref_R, const etools::Vector2 &ref_position) const
 Get position of a foot or aligned double support based on position of an aligned support or a foot. More...
 
humoto::rigidbody::RigidBodyState getFootState (const humoto::LeftOrRight::Type left_or_right) const
 Returns current foot state. More...
 
etools::Matrix2 getSSCoPBounds () const
 Return bounds on position of the CoP in ADS / SS. More...
 
void log (humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="model") const
 Log. More...
 
void noop () const
 
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 setDefaults ()
 Initialize to default values (HRP2) More...
 
void setFootParameters (const humoto::walking::RobotFootParameters &foot_param)
 Constructor. More...
 
void updateState (const humoto::ModelState &model_state)
 Update model 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...
 

Static Public Member Functions

static humoto::rigidbody::PointMassState convertCoMState (const etools::Vector6 &cstate, const double com_height)
 Converts given cstate vector to CoM state. More...
 
static etools::Vector6 convertCoMState (const humoto::rigidbody::PointMassState &com_state)
 Get cstate. More...
 
static humoto::rigidbody::PointMassState evaluate (const double Ts, const double T, const double com_height, const etools::Vector6 &cstate, const etools::Vector2 &control)
 
static etools::Matrix3 getA3 (const double T, const double omega, const double Tsample)
 Create A matrix of final model. More...
 
static etools::Matrix3 getA3 (const double T, const double omega)
 Create A matrix of final model. More...
 
static etools::Matrix6 getA6 (const double T, const double omega, const double Tsample)
 Create A matrix of final model. More...
 
static etools::Matrix6 getA6 (const double T, const double omega)
 Create A matrix of final model. More...
 
static etools::Vector3 getB3 (const double T, const double omega, const double Tsample)
 Create B matrix of final model. More...
 
static etools::Vector3 getB3 (const double T, const double omega)
 Create A matrix of final model. More...
 
static etools::Matrix6x2 getB6 (const double T, const double omega, const double Tsample)
 Create B matrix of final model. More...
 
static etools::Matrix6x2 getB6 (const double T, const double omega)
 Create B matrix of final model. More...
 
static etools::Matrix1x3 getD3 (const double T, const double omega)
 Create D matrix of final model. More...
 
static etools::Matrix2x6 getD6 (const double T, const double omega)
 Create D matrix of final model. More...
 
static etools::Matrix2x6 getDcpv6 (const double omega)
 Create ksi matrix. More...
 
static etools::Matrix2x6 getDdz6 (const double com_height)
 Create Ddz6 matrix. More...
 
static double getE3 (const double T)
 Create E matrix of final model. More...
 
static etools::Matrix2 getE6 (const double T, const double omega)
 Create E matrix of final model. More...
 
static double getOmega (const double com_height)
 

Public Attributes

etools::Vector2 current_support_position_
 2d position of the current support (center of a foot or ADS) More...
 
const std::size_t Ns_
 Number of state variables. More...
 
const int Nu_
 Number of control variables. More...
 
humoto::wpg04::ModelState state_
 state of the model More...
 

Protected Member Functions

void finalize ()
 Create some useful parameters derived from the primal robot parameters. 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...
 

Static Protected Attributes

static const bool default_crash_on_missing_entry_
 

Private Member Functions

void determineSupportPosition ()
 Determines position of support. More...
 

Constructor & Destructor Documentation

◆ Model()

humoto::wpg04::Model::Model ( )
inline

Default constructor.

Definition at line 84 of file model.h.

Member Function Documentation

◆ convertCoMState() [1/2]

static humoto::rigidbody::PointMassState humoto::walking::PointMassModel6z::convertCoMState ( const etools::Vector6 &  cstate,
const double  com_height 
)
inlinestaticinherited

Converts given cstate vector to CoM state.

Returns
CoM state

Definition at line 117 of file point_mass_model_6z.h.

◆ convertCoMState() [2/2]

static etools::Vector6 humoto::walking::PointMassModel6z::convertCoMState ( const humoto::rigidbody::PointMassState com_state)
inlinestaticinherited

Get cstate.

Definition at line 134 of file point_mass_model_6z.h.

◆ determineSupportPosition()

void humoto::wpg04::Model::determineSupportPosition ( )
inlineprivate

Determines position of support.

assume that in DS feet are aligned

Definition at line 33 of file model.h.

◆ evaluate()

static humoto::rigidbody::PointMassState humoto::walking::PointMassModel6z::evaluate ( const double  Ts,
const double  T,
const double  com_height,
const etools::Vector6 &  cstate,
const etools::Vector2 &  control 
)
inlinestaticinherited

Definition at line 147 of file point_mass_model_6z.h.

◆ finalize()

void humoto::walking::RobotFootParameters::finalize ( )
inlineprotectedvirtualinherited

Create some useful parameters derived from the primal robot parameters.

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

Definition at line 176 of file robot_foot_parameters.h.

◆ getA3() [1/2]

static etools::Matrix3 humoto::walking::PointMassModel6z::getA3 ( const double  T,
const double  omega,
const double  Tsample 
)
inlinestaticinherited

Create A matrix of final model.

Definition at line 169 of file point_mass_model_6z.h.

◆ getA3() [2/2]

static etools::Matrix3 humoto::walking::PointMassModel6z::getA3 ( const double  T,
const double  omega 
)
inlinestaticinherited

Create A matrix of final model.

Definition at line 183 of file point_mass_model_6z.h.

◆ getA6() [1/2]

static etools::Matrix6 humoto::walking::PointMassModel6z::getA6 ( const double  T,
const double  omega,
const double  Tsample 
)
inlinestaticinherited

Create A matrix of final model.

Definition at line 192 of file point_mass_model_6z.h.

◆ getA6() [2/2]

static etools::Matrix6 humoto::walking::PointMassModel6z::getA6 ( const double  T,
const double  omega 
)
inlinestaticinherited

Create A matrix of final model.

Definition at line 206 of file point_mass_model_6z.h.

◆ getADSCoPBounds()

etools::Matrix2 humoto::walking::RobotFootParameters::getADSCoPBounds ( ) const
inlineinherited

Return bounds on position of the CoP in ADS / SS.

Returns
2x2 matrix: [lb, ub]

Definition at line 300 of file robot_foot_parameters.h.

◆ getADSPositionFromFoot()

etools::Vector2 humoto::walking::RobotFootParameters::getADSPositionFromFoot ( const humoto::LeftOrRight::Type  left_or_right,
const etools::Matrix2 ref_R,
const etools::Vector2 &  ref_position 
) const
inlineinherited

Get position of a foot or aligned double support based on position of an aligned support or a foot.

Parameters
[in]left_or_rightleft or right foot
[in]ref_Rorientation of the reference foot / ADS
[in]ref_positionposition of the reference foot / ADS
Returns
2d position.

Definition at line 270 of file robot_foot_parameters.h.

◆ getB3() [1/2]

static etools::Vector3 humoto::walking::PointMassModel6z::getB3 ( const double  T,
const double  omega,
const double  Tsample 
)
inlinestaticinherited

Create B matrix of final model.

Definition at line 215 of file point_mass_model_6z.h.

◆ getB3() [2/2]

static etools::Vector3 humoto::walking::PointMassModel6z::getB3 ( const double  T,
const double  omega 
)
inlinestaticinherited

Create A matrix of final model.

Definition at line 227 of file point_mass_model_6z.h.

◆ getB6() [1/2]

static etools::Matrix6x2 humoto::walking::PointMassModel6z::getB6 ( const double  T,
const double  omega,
const double  Tsample 
)
inlinestaticinherited

Create B matrix of final model.

Definition at line 236 of file point_mass_model_6z.h.

◆ getB6() [2/2]

static etools::Matrix6x2 humoto::walking::PointMassModel6z::getB6 ( const double  T,
const double  omega 
)
inlinestaticinherited

Create B matrix of final model.

Definition at line 251 of file point_mass_model_6z.h.

◆ getCoMHeight()

double humoto::wpg04::Model::getCoMHeight ( ) const
inline

Get CoM height.

Returns
CoM height

Definition at line 142 of file model.h.

◆ getCoMState()

humoto::rigidbody::PointMassState humoto::wpg04::Model::getCoMState ( ) const
inline

Returns current CoM state.

Returns
CoM state

Definition at line 106 of file model.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.

◆ getCState()

etools::Vector6 humoto::wpg04::Model::getCState ( ) const
inline

Get cstate.

Definition at line 129 of file model.h.

◆ getD3()

static etools::Matrix1x3 humoto::walking::PointMassModel6z::getD3 ( const double  T,
const double  omega 
)
inlinestaticinherited

Create D matrix of final model.

Definition at line 260 of file point_mass_model_6z.h.

◆ getD6()

static etools::Matrix2x6 humoto::walking::PointMassModel6z::getD6 ( const double  T,
const double  omega 
)
inlinestaticinherited

Create D matrix of final model.

Definition at line 272 of file point_mass_model_6z.h.

◆ getDcpv6()

static etools::Matrix2x6 humoto::walking::PointMassModel6z::getDcpv6 ( const double  omega)
inlinestaticinherited

Create ksi matrix.

Note
Used to generate matrix for terminal constraint

Definition at line 319 of file point_mass_model_6z.h.

◆ getDdz6()

static etools::Matrix2x6 humoto::walking::PointMassModel6z::getDdz6 ( const double  com_height)
inlinestaticinherited

Create Ddz6 matrix.

Definition at line 304 of file point_mass_model_6z.h.

◆ getE3()

static double humoto::walking::PointMassModel6z::getE3 ( const double  T)
inlinestaticinherited

Create E matrix of final model.

Definition at line 286 of file point_mass_model_6z.h.

◆ getE6()

static etools::Matrix2 humoto::walking::PointMassModel6z::getE6 ( const double  T,
const double  omega 
)
inlinestaticinherited

Create E matrix of final model.

Definition at line 295 of file point_mass_model_6z.h.

◆ getFootBounds()

etools::Matrix2 humoto::walking::RobotFootParameters::getFootBounds ( const humoto::LeftOrRight::Type  left_or_right,
const FootBoundsType::Type  bounds_type 
) const
inlineinherited

Get bounds on position of a foot.

Parameters
[in]left_or_rightleft or right foot
[in]bounds_typetype of the bounds
Returns
2x2 matrix: [lb, ub]

Definition at line 287 of file robot_foot_parameters.h.

◆ getFootPositionFromADS()

etools::Vector2 humoto::walking::RobotFootParameters::getFootPositionFromADS ( const humoto::LeftOrRight::Type  left_or_right,
const etools::Matrix2 ref_R,
const etools::Vector2 &  ref_position 
) const
inlineinherited

Get position of a foot or aligned double support based on position of an aligned support or a foot.

Parameters
[in]left_or_rightleft or right foot
[in]ref_Rorientation of the reference foot / ADS
[in]ref_positionposition of the reference foot / ADS
Returns
2d position.

Definition at line 261 of file robot_foot_parameters.h.

◆ getFootState()

humoto::rigidbody::RigidBodyState humoto::wpg04::Model::getFootState ( const humoto::LeftOrRight::Type  left_or_right) const
inline

Returns current foot state.

Parameters
[in]left_or_rightleft/right
Returns
foot state

Definition at line 119 of file model.h.

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

◆ getOmega()

static double humoto::walking::PointMassModel6z::getOmega ( const double  com_height)
inlinestaticinherited

Definition at line 106 of file point_mass_model_6z.h.

◆ getSSCoPBounds()

etools::Matrix2 humoto::walking::RobotFootParameters::getSSCoPBounds ( ) const
inlineinherited

Return bounds on position of the CoP in ADS / SS.

Returns
2x2 matrix: [lb, ub]

Definition at line 307 of file robot_foot_parameters.h.

◆ log()

void humoto::wpg04::Model::log ( humoto::Logger logger,
const LogEntryName parent = LogEntryName(),
const std::string &  name = "model" 
) const
inlinevirtual

Log.

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

Implements humoto::Model.

Definition at line 222 of file model.h.

◆ noop()

void humoto::Model::noop ( ) const
inlineinherited

Definition at line 57 of file model.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()

void humoto::walking::RobotFootParameters::setDefaults ( )
inlinevirtualinherited

Initialize to default values (HRP2)

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

Definition at line 238 of file robot_foot_parameters.h.

◆ setFootParameters()

void humoto::wpg04::Model::setFootParameters ( const humoto::walking::RobotFootParameters foot_param)
inline

Constructor.

Parameters
[in]foot_paramparameters of the robot

Definition at line 95 of file model.h.

◆ updateState()

void humoto::wpg04::Model::updateState ( const humoto::ModelState model_state)
inlinevirtual

Update model state.

Parameters
[in]model_statemodel state.

Implements humoto::Model.

Definition at line 154 of file model.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

◆ current_support_position_

etools::Vector2 humoto::wpg04::Model::current_support_position_

2d position of the current support (center of a foot or ADS)

Definition at line 77 of file model.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.

◆ Ns_

const std::size_t humoto::walking::PointMassModel6z::Ns_
inherited

Number of state variables.

Definition at line 91 of file point_mass_model_6z.h.

◆ Nu_

const int humoto::walking::PointMassModel6z::Nu_
inherited

Number of control variables.

Definition at line 94 of file point_mass_model_6z.h.

◆ state_

humoto::wpg04::ModelState humoto::wpg04::Model::state_

state of the model

Definition at line 75 of file model.h.


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