26 #define HUMOTO_CONFIG_SECTION_ID "WalkParameters" 27 #define HUMOTO_CONFIG_CONSTRUCTOR WalkParameters 28 #define HUMOTO_CONFIG_ENTRIES \ 29 HUMOTO_CONFIG_COMPOUND_(com_velocity)\ 30 HUMOTO_CONFIG_COMPOUND_(first_stance_com_velocity)\ 31 HUMOTO_CONFIG_COMPOUND_(last_stance_com_velocity)\ 33 HUMOTO_CONFIG_SCALAR_(step_height)\ 34 HUMOTO_CONFIG_SCALAR_(theta_increment)\ 36 HUMOTO_CONFIG_PARENT_CLASS(humoto::walking::StanceFSMParameters) 37 #include HUMOTO_CONFIG_DEFINE_ACCESSORS 65 com_velocity_ << 0.2, 0.;
66 first_stance_com_velocity_ << 0.2, 0.;
67 last_stance_com_velocity_ << 0., 0.;
69 theta_increment_ = 0.0;
82 #define HUMOTO_CONFIG_SECTION_ID "MPCParameters" 83 #define HUMOTO_CONFIG_CONSTRUCTOR MPCParameters 84 #define HUMOTO_CONFIG_ENTRIES \ 85 HUMOTO_CONFIG_SCALAR_(preview_horizon_length)\ 86 HUMOTO_CONFIG_SCALAR_(sampling_time_ms)\ 87 HUMOTO_CONFIG_SCALAR_(subsampling_time_ms)\ 88 HUMOTO_CONFIG_SCALAR_(tds_sampling_time_ms) 89 #include HUMOTO_CONFIG_DEFINE_ACCESSORS 116 if (sampling_time_ms_ % subsampling_time_ms_ == 0)
118 subsamples_num_ = sampling_time_ms_ / subsampling_time_ms_;
122 HUMOTO_THROW_MSG(
"Sampling time should be a multiple of subsampling time.");
126 if (tds_sampling_time_ms_ % subsampling_time_ms_ == 0)
128 tds_subsamples_num_ = tds_sampling_time_ms_ / subsampling_time_ms_;
132 HUMOTO_THROW_MSG(
"Transitional double support sampling time should be a multiple of subsampling time.");
163 preview_horizon_length_ = 16;
164 sampling_time_ms_ = 100;
165 subsampling_time_ms_ = 100;
166 tds_sampling_time_ms_ = 100;
181 const std::size_t sampling_time_ms = 100,
182 const std::size_t subsampling_time_ms = 100,
183 const std::size_t tds_sampling_time_ms = 100)
185 preview_horizon_length_ = preview_horizon_len;
186 sampling_time_ms_ = sampling_time_ms;
187 subsampling_time_ms_ = subsampling_time_ms;
188 tds_sampling_time_ms_ = tds_sampling_time_ms;
201 return (subsampling_time_);
void setDefaults()
Initialize to default values.
double subsampling_time_
Subsampling time in seconds (Ts)
static const char * COP_VARIABLES_ID
double sampling_time_
Sampling time in seconds (T)
std::size_t preview_horizon_length_
Length of the preview horizon (N)
etools::Vector2 com_velocity_
double tds_sampling_time_
Sampling time of a transitional double support in seconds (Ttds)
double getSubsamplingTime() const
getSubsamplingTime
Parameters of an MPC problem. [set_parameters_mpc.m].
Default configurable base is strict.
double HUMOTO_LOCAL convertMillisecondToSecond(const std::size_t milliseconds)
Converts milliseconds to seconds.
#define HUMOTO_THROW_MSG(s)
HUMOTO_THROW_MSG throws an error message concatenated with the name of the function (if supported)...
etools::Vector2 last_stance_com_velocity_
etools::Vector2 first_stance_com_velocity_
Class containing options of the walking pattern generator.
std::size_t subsamples_num_
Number of subsamples per sample (TN)
void finalize()
Compute some derived variables.
WalkParameters()
Default constructor.
void setDefaults()
Default parameters of the walk.
void setDefaults()
Default parameters of the finite state machine.
static const char * FOOTPOS_VARIABLES_ID
std::size_t subsampling_time_ms_
Subsampling time in milliseconds (Ts_ms)
The root namespace of HuMoTo.
MPCParameters(const std::size_t preview_horizon_len=16, const std::size_t sampling_time_ms=100, const std::size_t subsampling_time_ms=100, const std::size_t tds_sampling_time_ms=100)
Constructor.
std::size_t sampling_time_ms_
Sampling time in milliseconds (T_ms)
std::size_t tds_sampling_time_ms_
Sampling time of a transitional double support in milliseconds (Ttds_ms)
std::size_t tds_subsamples_num_
Number of subsamples per doubles support sample (TN_tds)
Class containing parameters of the stance finite state machine.