2 #include <mc_control/MCController.h>
4 #include <ExternalFootstepPlanner/Plan.h>
5 #include <ExternalFootstepPlanner/Request.h>
26 using Request = mc_plugin::ExternalFootstepPlanner::Request;
27 using Foot = mc_plugin::ExternalFootstepPlanner::Foot;
43 void configure(
const mc_rtc::Configuration & config);
47 return ctl_.datastore().call<
bool>(
"ExternalFootstepPlanner::PlanningRequested");
84 const Foot supportFoot,
102 return state_ ==
state &&
ctl_.datastore().call<
bool>(
"ExternalFootstepPlanner::HasPlan");
110 std::vector<lipm_walking::Contact>
plan();
157 ctl_.datastore().call<
void>(
"ExternalFootstepPlanner::Activate");
162 ctl_.datastore().call<
void>(
"ExternalFootstepPlanner::Deactivate");
172 const Foot supportFoot,
176 double allowed_time);
187 const Foot supportFoot,
191 double allowed_time);
194 mc_control::MCController &
ctl_;
Handle requesting/receiving a footstep plan from an external planner.
bool planningRequested() const
void leftFootLandingOffset(const SE2d &offset)
Offset between the left foot and the world target frame, expressed in world target frame.
void requestPlanLocalPositionTarget(const State state, const Foot supportFoot, const utils::SE2d &start_lf, const utils::SE2d &start_rf, const utils::SE2d &localTarget, double allowed_time)
Request a plan in local frame.
void requestPlan(const State state, const Foot supportFoot, const utils::SE2d &start_lf, const utils::SE2d &start_rf, double allowed_time)
Request a plan to the plugin.
ExternalPlanner(mc_control::MCController &ctl)
double allowedTimeSingleSupport() const noexcept
bool planRequested(State state) const noexcept
mc_plugin::ExternalFootstepPlanner::Request Request
void allowedTimeSingleSupport(const double time)
void configure(const mc_rtc::Configuration &config)
External planning configuration.
double allowedTimeStanding_
void rightFootLandingOffset(const SE2d &offset)
void allowedTimeStanding(const double time)
bool hasPlan(State state) const
double allowedTimeSingleSupport_
mc_control::MCController & ctl_
void requestPlanWorldPositionTarget(const State state, const Foot supportFoot, const utils::SE2d &start_lf, const utils::SE2d &start_rf, const utils::SE2d &targetWorld, double allowed_time)
Request a plan with a target expressed in world frame.
SE2d rightFootLandingOffset_
mc_plugin::ExternalFootstepPlanner::Foot Foot
std::vector< lipm_walking::Contact > plan()
Convert plugin's plan to lipm_walking plan format.
SE2d leftFootLandingOffset_
Landing offset of the feet w.r.t target frame, expressed in target frame.
double allowedTimeStanding() const noexcept