lipm_walking_controller
1.6.0
|
Handle requesting/receiving a footstep plan from an external planner. More...
#include <lipm_walking/ExternalPlanner.h>
Public Types | |
enum | State { Standing , DoubleSupport , SingleSupport } |
using | SE2d = lipm_walking::utils::SE2d |
using | Request = mc_plugin::ExternalFootstepPlanner::Request |
using | Foot = mc_plugin::ExternalFootstepPlanner::Foot |
Public Member Functions | |
ExternalPlanner (mc_control::MCController &ctl) | |
void | configure (const mc_rtc::Configuration &config) |
External planning configuration. More... | |
bool | planningRequested () const |
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. More... | |
void | cancelRequest () |
bool | planRequested (State state) const noexcept |
bool | hasPlan (State state) const |
std::vector< lipm_walking::Contact > | plan () |
Convert plugin's plan to lipm_walking plan format. More... | |
State | state () const |
void | leftFootLandingOffset (const SE2d &offset) |
Offset between the left foot and the world target frame, expressed in world target frame. More... | |
void | rightFootLandingOffset (const SE2d &offset) |
void | allowedTimeSingleSupport (const double time) |
double | allowedTimeSingleSupport () const noexcept |
void | allowedTimeStanding (const double time) |
double | allowedTimeStanding () const noexcept |
void | activate () |
void | deactivate () |
Protected Member Functions | |
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. More... | |
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. More... | |
Protected Attributes | |
mc_control::MCController & | ctl_ |
State | state_ = State::Standing |
bool | requested_ = false |
double | allowedTimeSingleSupport_ = 0.5 |
double | allowedTimeStanding_ = 2.0 |
SE2d | leftFootLandingOffset_ {0., 0.15, 0.} |
Landing offset of the feet w.r.t target frame, expressed in target frame. More... | |
SE2d | rightFootLandingOffset_ {0, -0.15, 0.} |
Handle requesting/receiving a footstep plan from an external planner.
For now this is intended to be used along with the mc_plugin_footstep_plan plugin that handles the actual communication with the planner, and conversion to a FootstepPlan.
Definition at line 23 of file ExternalPlanner.h.
using lipm_walking::ExternalPlanner::Foot = mc_plugin::ExternalFootstepPlanner::Foot |
Definition at line 27 of file ExternalPlanner.h.
using lipm_walking::ExternalPlanner::Request = mc_plugin::ExternalFootstepPlanner::Request |
Definition at line 26 of file ExternalPlanner.h.
Definition at line 25 of file ExternalPlanner.h.
Enumerator | |
---|---|
Standing | |
DoubleSupport | |
SingleSupport |
Definition at line 29 of file ExternalPlanner.h.
lipm_walking::ExternalPlanner::ExternalPlanner | ( | mc_control::MCController & | ctl | ) |
Definition at line 14 of file ExternalPlanner.cpp.
|
inline |
Definition at line 155 of file ExternalPlanner.h.
|
inlinenoexcept |
Definition at line 140 of file ExternalPlanner.h.
|
inline |
Definition at line 135 of file ExternalPlanner.h.
|
inlinenoexcept |
Definition at line 150 of file ExternalPlanner.h.
|
inline |
Definition at line 145 of file ExternalPlanner.h.
|
inline |
Definition at line 89 of file ExternalPlanner.h.
void lipm_walking::ExternalPlanner::configure | ( | const mc_rtc::Configuration & | config | ) |
External planning configuration.
config | Config in the format of the "external" plan section of LIPMWalking configuration |
Definition at line 16 of file ExternalPlanner.cpp.
|
inline |
Definition at line 160 of file ExternalPlanner.h.
|
inline |
Definition at line 100 of file ExternalPlanner.h.
|
inline |
Offset between the left foot and the world target frame, expressed in world target frame.
offset | Offset expressed in world target frame |
Definition at line 125 of file ExternalPlanner.h.
std::vector< lipm_walking::Contact > lipm_walking::ExternalPlanner::plan | ( | ) |
Convert plugin's plan to lipm_walking plan format.
Definition at line 104 of file ExternalPlanner.cpp.
|
inline |
Definition at line 45 of file ExternalPlanner.h.
|
inlinenoexcept |
Definition at line 95 of file ExternalPlanner.h.
void lipm_walking::ExternalPlanner::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.
The target is set within the ExternalFootstepPlannerPlugin (from GUI or other inputs).
state | Walking state for which the computed plan is intended |
supportFoot | Starting support foot (first swing foot will be the opposite foot) |
start_lf | Starting configuration that the left foot will have in "state" |
start_rf | Starting configuration for the right foot will have in "state" |
allowed_time | Time allowed for the planner to compute a solution. This should be less than the time available between when the request is made and when it is expected to be used. Example:
|
Definition at line 34 of file ExternalPlanner.cpp.
|
protected |
Request a plan in local frame.
The local frame is defined as the frame halfway between start_lf and start_rf
Definition at line 89 of file ExternalPlanner.cpp.
|
protected |
Request a plan with a target expressed in world frame.
Definition at line 64 of file ExternalPlanner.cpp.
|
inline |
Definition at line 130 of file ExternalPlanner.h.
|
inline |
Definition at line 112 of file ExternalPlanner.h.
|
protected |
Definition at line 197 of file ExternalPlanner.h.
|
protected |
Definition at line 198 of file ExternalPlanner.h.
|
protected |
Definition at line 194 of file ExternalPlanner.h.
|
protected |
Landing offset of the feet w.r.t target frame, expressed in target frame.
Definition at line 206 of file ExternalPlanner.h.
|
protected |
Definition at line 196 of file ExternalPlanner.h.
|
protected |
Definition at line 207 of file ExternalPlanner.h.
|
protected |
Definition at line 195 of file ExternalPlanner.h.