30 #include <mc_rbdyn/rpy_utils.h> 31 #include <mc_rtc/GUIState.h> 45 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
87 void configure(
const mc_rtc::Configuration & config);
111 void updateSupportPath(
const sva::PTransformd & X_0_lf,
const sva::PTransformd & X_0_rf);
120 return plans_.keys();
130 return customPlan_.name;
159 void gait(
const std::string & dir)
166 else if(dir ==
"Turn")
188 if(name == customPlan_.name)
204 targetPose_ = lastBackwardTarget_;
214 targetPose_ = lastForwardTarget_;
224 targetPose_ = lastLateralTarget_;
257 return worldReference_;
274 void restoreDefaults();
281 void runShuffling_();
302 void updateLocalTarget_(
const SE2d & target);
309 void updateWorldTarget_(
const Eigen::Vector3d & desired);
319 SE2d initPose_ = {0., 0., 0.};
320 SE2d lastBackwardTarget_ = {-0.5, 0., 0.};
321 SE2d lastForwardTarget_ = {0.5, 0., 0.};
322 SE2d lastLateralTarget_ = {0.0, 0.3, 0.};
323 SE2d targetPose_ = {0.5, 0., 0.};
324 bool startWithRightFootstep_ =
true;
325 double desiredStepAngle_ = 10. * M_PI / 180.;
326 double desiredStepLength_ = 0.2;
327 double extraStepWidth_ = 0.;
328 double outputVel_ = 0.25;
329 double stepAngle_ = 0.0;
330 double stepLength_ = 0.2;
331 double stepWidth_ = 0.18;
332 mc_rtc::Configuration plans_;
333 std::shared_ptr<mc_rtc::gui::StateBuilder> gui_;
334 std::vector<Eigen::Vector3d> supportPathDisplay_;
335 sva::PTransformd worldReference_;
336 unsigned nbFootsteps_ = 0;
Hermite polynomial with Overall Uniformly-Bounded Accelerations (HOUBA).
void removeGUIElements()
Remove GUI panel.
void addGUIElements()
Add GUI panel.
void updateSupportPath(const sva::PTransformd &X_0_lf, const sva::PTransformd &X_0_rf)
Update support path display.
std::string gait() const
Get current gait as string.
PlanInterpolator(std::shared_ptr< mc_rtc::gui::StateBuilder > gui)
Initialization just stores the GUI handle for later.
static constexpr double MAX_SAGITTAL_STEP_LENGTH
static EIGEN_MAKE_ALIGNED_OPERATOR_NEW constexpr double DEFAULT_EXTRA_STEP_WIDTH
void configure(const mc_rtc::Configuration &config)
Read configuration from dictionary.
Footstep plan interpolator.
static constexpr double IN_PLACE_EXTRA_STEP_WIDTH
void restoreForwardTarget()
Restore last forward target.
void restoreLateralTarget()
Restore last lateral target.
void gait(const std::string &dir)
Update gait.
bool isShown
Is the footstep interpolator tab displayed?
unsigned nbIter
Number of times the interpolator was called.
void restoreBackwardTarget()
Restore last backward target.
FootstepPlan getPlan(std::string name)
Get contact plan.
double stepWidth() const
Get step width.
static constexpr double MAX_EXTRA_STEP_WIDTH
void worldReference(const sva::PTransformd &worldReference)
Set walking target in world frame.
Main controller namespace.
void run()
Generate a new footstep plan.
std::vector< std::string > availablePlans() const
List available contact plans.
void suggestGait()
Suggest gait based on local target coordinates.
static constexpr double IN_PLACE_MAX_STEP_ANGLE
static constexpr double MIN_STEP_LENGTH
const std::string & customPlanName() const
Get name of current custom footstep plan.
void stepWidth(double stepWidth)
Set step width.
const sva::PTransformd & worldReference() const
Get walking target in world frame.
static constexpr double MAX_LATERAL_STEP_LENGTH