43 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
77 void load(
const mc_rtc::Configuration & config);
84 void reset(
unsigned startIndex);
98 void save(mc_rtc::Configuration & config)
const;
109 void updateInitialTransform(
const sva::PTransformd & X_0_lf,
const sva::PTransformd & X_0_rf,
double initHeight);
116 contacts_.push_back(step);
132 comHeight_ =
clamp(height, 0., 2.);
148 return doubleSupportDuration_;
158 doubleSupportDuration_ =
clamp(duration, 0., 1.);
166 return finalDSPDuration_;
174 return (torsoPitch_ > -10.);
184 finalDSPDuration_ =
clamp(duration, 0.1, 1.6);
192 return initDSPDuration_;
200 initDSPDuration_ =
clamp(duration, 0.1, 1.6);
218 if(supportContact_.
swingConfig.has(
"landing_duration"))
220 return supportContact_.
swingConfig(
"landing_duration");
222 return landingDuration_;
232 landingDuration_ =
clamp(duration, 0., 0.5);
244 return landingPitch_;
252 constexpr
double MIN_LANDING_PITCH = -1.;
253 constexpr
double MAX_LANDING_PITCH = 1.;
254 landingPitch_ =
clamp(pitch, MIN_LANDING_PITCH, MAX_LANDING_PITCH);
288 return singleSupportDuration_;
296 singleSupportDuration_ =
clamp(duration, 0., 2.);
304 return supportContact_;
312 std::swap(contacts_[0], contacts_[1]);
332 constexpr
double MIN_SWING_FOOT_HEIGHT = 0.;
333 constexpr
double MAX_SWING_FOOT_HEIGHT = 0.25;
334 swingHeight_ =
clamp(height, MIN_SWING_FOOT_HEIGHT, MAX_SWING_FOOT_HEIGHT);
342 if(supportContact_.
swingConfig.has(
"takeoff_duration"))
344 return supportContact_.
swingConfig(
"takeoff_duration");
346 return takeoffDuration_;
356 takeoffDuration_ =
clamp(duration, 0., 0.5);
368 return takeoffOffset_;
376 takeoffOffset_ = offset;
388 return takeoffPitch_;
396 constexpr
double MIN_TAKEOFF_PITCH = -1.;
397 constexpr
double MAX_TAKEOFF_PITCH = 1.;
398 takeoffPitch_ =
clamp(pitch, MIN_TAKEOFF_PITCH, MAX_TAKEOFF_PITCH);
406 return targetContact_;
434 Eigen::Vector3d takeoffOffset_ = Eigen::Vector3d::Zero();
435 double comHeight_ = 0.8;
436 double doubleSupportDuration_ = 0.2;
437 double finalDSPDuration_ = 0.6;
438 double initDSPDuration_ = 0.6;
439 double landingDuration_ = 0.15;
440 double landingPitch_ = 0.;
441 double singleSupportDuration_ = 0.8;
442 double swingHeight_ = 0.04;
443 double takeoffDuration_ = 0.05;
444 double takeoffPitch_ = 0.;
445 double torsoPitch_ = -100.;
446 std::vector<Contact> contacts_;
447 sva::PTransformd X_0_init_;
448 unsigned nextFootstep_ = 0;
466 mc_rtc::Configuration config;
double clamp(double v, double vMin, double vMax)
Clamp a value in a given interval.
Framework namespace, only used to add a configuration loader.
Main controller namespace.