26 #define HUMOTO_CONFIG_SECTION_ID "RobotParameters" 27 #define HUMOTO_CONFIG_CONSTRUCTOR RobotParameters 28 #define HUMOTO_CONFIG_ENTRIES \ 29 HUMOTO_CONFIG_SCALAR_(base_radius) \ 30 HUMOTO_CONFIG_SCALAR_(max_nominal_base_velocity) \ 31 HUMOTO_CONFIG_SCALAR_(max_nominal_base_acceleration) \ 32 HUMOTO_CONFIG_SCALAR_(max_base_velocity) \ 33 HUMOTO_CONFIG_SCALAR_(max_base_acceleration) \ 34 HUMOTO_CONFIG_COMPOUND_(body_bounds) 35 #include HUMOTO_CONFIG_DEFINE_ACCESSORS 59 cop_bounds_ << -cop_bound, cop_bound,
60 -cop_bound, cop_bound;
66 nominal_base_velocity_bounds_ << -velocity_bound, velocity_bound,
67 -velocity_bound, velocity_bound;
72 base_velocity_bounds_ << -velocity_bound, velocity_bound,
73 -velocity_bound, velocity_bound;
79 nominal_base_acceleration_bounds_ << -acceleration_bound, acceleration_bound,
80 -acceleration_bound, acceleration_bound;
85 base_acceleration_bounds_ << -acceleration_bound, acceleration_bound,
86 -acceleration_bound, acceleration_bound;
110 max_nominal_base_velocity_ = 0.5;
111 max_nominal_base_acceleration_ = 1.0;
112 max_base_velocity_ = 1.4;
113 max_base_acceleration_ = 1.7;
115 body_bounds_ << -0.06, 0.06,
143 return(nominal_base_velocity_bounds_);
149 return(nominal_base_acceleration_bounds_);
155 return(body_bounds_);
167 MAINTAIN_POSITION = 1,
168 MAINTAIN_VELOCITY = 2
178 #define HUMOTO_CONFIG_SECTION_ID "MotionParameters" 179 #define HUMOTO_CONFIG_CONSTRUCTOR MotionParameters 180 #define HUMOTO_CONFIG_ENTRIES \ 181 HUMOTO_CONFIG_COMPOUND_(base_velocity)\ 182 HUMOTO_CONFIG_COMPOUND_(base_position)\ 183 HUMOTO_CONFIG_SCALAR_(base_angular_velocity)\ 184 HUMOTO_CONFIG_ENUM_(motion_mode) \ 185 HUMOTO_CONFIG_SCALAR_(duration_ms) 186 #include HUMOTO_CONFIG_DEFINE_ACCESSORS 190 const static std::ptrdiff_t UNLIMITED_DURATION = -1;
225 base_velocity_.setZero();
226 base_position_.setZero();
227 base_angular_velocity_ = 0.0;
228 duration_ms_ = UNLIMITED_DURATION;
248 return(base_velocity_);
259 return(base_position_);
270 return(base_angular_velocity_);
281 #define HUMOTO_CONFIG_SECTION_ID "MPCParameters" 282 #define HUMOTO_CONFIG_CONSTRUCTOR MPCParameters 283 #define HUMOTO_CONFIG_ENTRIES \ 284 HUMOTO_CONFIG_SCALAR_(preview_horizon_length) \ 285 HUMOTO_CONFIG_SCALAR_(sampling_time_ms) \ 286 HUMOTO_CONFIG_SCALAR_(subsampling_time_ms) 287 #include HUMOTO_CONFIG_DEFINE_ACCESSORS 328 preview_horizon_length_ = 15;
329 sampling_time_ms_ = 100;
330 subsampling_time_ms_ = sampling_time_ms_;
344 const std::size_t sampling_time_ms = 100,
345 const std::size_t subsampling_time_ms = 100)
347 preview_horizon_length_ = preview_horizon_len;
348 sampling_time_ms_ = sampling_time_ms;
349 subsampling_time_ms_ = subsampling_time_ms;
362 return (sampling_time_);
373 return (subsampling_time_);
double max_base_acceleration_
double getSubsamplingTime() const
Get subsampling time in seconds.
static const char * BODY_JERK_VARIABLES_ID
etools::Vector2 getBaseVelocity() const
Get base reference velocity.
MotionMode::Mode motion_mode_
std::size_t preview_horizon_length_
Length of the preview horizon (N)
double getBaseAngularVelocity() const
Get theta increment.
void setDefaults()
Default parameters of the walk.
etools::Matrix2 getBodyBounds() const
Get respective bounds.
RobotParameters()
Default constructor.
void finalize()
Finalize initialization.
void finalize()
Compute some derived variables.
static const char * BASE_VEL_VARIABLES_ID
etools::Matrix2 nominal_base_acceleration_bounds_
etools::Vector2 base_position_
double subsampling_time_
Subsampling time in seconds (Ts)
std::ptrdiff_t duration_ms_
Default configurable base is strict.
double HUMOTO_LOCAL convertMillisecondToSecond(const std::size_t milliseconds)
Converts milliseconds to seconds.
double base_angular_velocity_
void setIdle()
Idle parameters of the motion.
etools::Matrix2 getNominalBaseAccelerationBounds() const
Get respective bounds.
double max_nominal_base_acceleration_
double max_base_velocity_
Parameters of the motion.
etools::Matrix2 getCoPBounds() const
Get respective bounds.
double sampling_time_
Sampling time in seconds (T)
void setDefaults()
Initialize to default values.
std::size_t sampling_time_ms_
Sampling time in milliseconds (T_ms)
std::size_t subsampling_time_ms_
Subsampling time in milliseconds (Ts_ms)
Parameters of the MPC problem.
MPCParameters(const std::size_t preview_horizon_len=15, const std::size_t sampling_time_ms=100, const std::size_t subsampling_time_ms=100)
Constructor.
etools::Matrix2 base_acceleration_bounds_
void finalize()
Finalize & check.
The root namespace of HuMoTo.
etools::Vector2 base_velocity_
etools::Matrix2 cop_bounds_
Parameters of the motion.
double max_nominal_base_velocity_
etools::Matrix2 nominal_base_velocity_bounds_
etools::Matrix2 getNominalBaseVelocityBounds() const
Get respective bounds.
etools::Vector2 getBasePosition() const
Get base reference position.
etools::Matrix2 body_bounds_
void setDefaults()
Set members to their default values.
double HUMOTO_LOCAL getEncircledSquareSide(const double radius)
Function computing side length of a square inscribed inside of a circle of given radius.
etools::Matrix2 base_velocity_bounds_
MotionParameters()
Default constructor.
double getSamplingTime() const
Get sampling time in seconds.