51 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
85 void load(
const mc_rtc::Configuration & config);
92 void reset(
unsigned startIndex);
106 void save(mc_rtc::Configuration & config)
const;
117 void updateInitialTransform(
const sva::PTransformd & X_0_lf,
const sva::PTransformd & X_0_rf,
double initHeight);
124 contacts_.push_back(step);
140 comHeight_ =
clamp(height, 0., 2.);
156 return doubleSupportDuration_;
166 doubleSupportDuration_ =
clamp(duration, 0., 1.);
174 return finalDSPDuration_;
182 return (torsoPitch_ > -10.);
192 finalDSPDuration_ =
clamp(duration, 0.1, 1.6);
200 return initDSPDuration_;
208 initDSPDuration_ =
clamp(duration, 0.1, 1.6);
226 if(supportContact_.
swingConfig.has(
"landing_duration"))
228 return supportContact_.
swingConfig(
"landing_duration");
230 return landingDuration_;
240 landingDuration_ =
clamp(duration, 0., 0.5);
252 return landingPitch_;
260 constexpr
double MIN_LANDING_PITCH = -1.;
261 constexpr
double MAX_LANDING_PITCH = 1.;
262 landingPitch_ =
clamp(pitch, MIN_LANDING_PITCH, MAX_LANDING_PITCH);
296 return singleSupportDuration_;
304 singleSupportDuration_ =
clamp(duration, 0., 2.);
312 return supportContact_;
320 std::swap(contacts_[0], contacts_[1]);
340 constexpr
double MIN_SWING_FOOT_HEIGHT = 0.;
341 constexpr
double MAX_SWING_FOOT_HEIGHT = 0.25;
342 swingHeight_ =
clamp(height, MIN_SWING_FOOT_HEIGHT, MAX_SWING_FOOT_HEIGHT);
350 if(supportContact_.
swingConfig.has(
"takeoff_duration"))
352 return supportContact_.
swingConfig(
"takeoff_duration");
354 return takeoffDuration_;
364 takeoffDuration_ =
clamp(duration, 0., 0.5);
376 return takeoffOffset_;
384 takeoffOffset_ = offset;
396 return takeoffPitch_;
404 constexpr
double MIN_TAKEOFF_PITCH = -1.;
405 constexpr
double MAX_TAKEOFF_PITCH = 1.;
406 takeoffPitch_ =
clamp(pitch, MIN_TAKEOFF_PITCH, MAX_TAKEOFF_PITCH);
414 return targetContact_;
460 Eigen::Vector3d takeoffOffset_ = Eigen::Vector3d::Zero();
461 double comHeight_ = 0.8;
462 double doubleSupportDuration_ = 0.2;
463 double finalDSPDuration_ = 0.6;
464 double initDSPDuration_ = 0.6;
465 double landingDuration_ = 0.15;
466 double landingPitch_ = 0.;
467 double singleSupportDuration_ = 0.8;
468 double swingHeight_ = 0.04;
469 double takeoffDuration_ = 0.05;
470 double takeoffPitch_ = 0.;
471 double torsoPitch_ = -100.;
472 std::vector<Contact> contacts_;
473 sva::PTransformd X_0_init_;
474 unsigned nextFootstep_ = 0;
492 mc_rtc::Configuration config;
double clamp(double v, double vMin, double vMax)