lipm_walking::PlanInterpolator Struct Reference

Footstep plan interpolator. More...

#include <lipm_walking/PlanInterpolator.h>

Public Types

enum  Gait {
  Gait::Walk,
  Gait::Shuffle,
  Gait::Turn
}
 Gait type. More...
 

Public Member Functions

 PlanInterpolator (std::shared_ptr< mc_rtc::gui::StateBuilder > gui)
 Initialization just stores the GUI handle for later. More...
 
void addGUIElements ()
 Add GUI panel. More...
 
void configure (const mc_rtc::Configuration &config)
 Read configuration from dictionary. More...
 
void removeGUIElements ()
 Remove GUI panel. More...
 
void run ()
 Generate a new footstep plan. More...
 
void suggestGait ()
 Suggest gait based on local target coordinates. More...
 
void updateSupportPath (const sva::PTransformd &X_0_lf, const sva::PTransformd &X_0_rf)
 Update support path display. More...
 
std::vector< std::string > availablePlans () const
 List available contact plans. More...
 
const std::string & customPlanName () const
 Get name of current custom footstep plan. More...
 
std::string gait () const
 Get current gait as string. More...
 
void gait (const std::string &dir)
 Update gait. More...
 
FootstepPlan getPlan (std::string name)
 Get contact plan. More...
 
void restoreBackwardTarget ()
 Restore last backward target. More...
 
void restoreForwardTarget ()
 Restore last forward target. More...
 
void restoreLateralTarget ()
 Restore last lateral target. More...
 
double stepWidth () const
 Get step width. More...
 
void stepWidth (double stepWidth)
 Set step width. More...
 
const sva::PTransformd & worldReference () const
 Get walking target in world frame. More...
 
void worldReference (const sva::PTransformd &worldReference)
 Set walking target in world frame. More...
 

Public Attributes

bool isShown = false
 Is the footstep interpolator tab displayed? More...
 
unsigned nbIter = 0
 Number of times the interpolator was called. More...
 

Static Public Attributes

static EIGEN_MAKE_ALIGNED_OPERATOR_NEW constexpr double DEFAULT_EXTRA_STEP_WIDTH = 0.
 
static constexpr double IN_PLACE_EXTRA_STEP_WIDTH = 0.02
 
static constexpr double IN_PLACE_MAX_STEP_ANGLE = 45.
 
static constexpr double MAX_EXTRA_STEP_WIDTH = 0.05
 
static constexpr double MAX_LATERAL_STEP_LENGTH = 0.2
 
static constexpr double MAX_SAGITTAL_STEP_LENGTH = 0.4
 
static constexpr double MIN_STEP_LENGTH = 0.001
 

Detailed Description

Footstep plan interpolator.

Definition at line 43 of file PlanInterpolator.h.

Member Enumeration Documentation

Gait type.

Walking is the most common one, where footsteps alternate on each side of the support path. Shuffling is used for lateral stepping: after each step, the robot brings back the other foot next to the current one. Turning is a special pattern where only footstep orientations change.

Enumerator
Walk 
Shuffle 
Turn 

Definition at line 63 of file PlanInterpolator.h.

Constructor & Destructor Documentation

lipm_walking::PlanInterpolator::PlanInterpolator ( std::shared_ptr< mc_rtc::gui::StateBuilder >  gui)
inline

Initialization just stores the GUI handle for later.

Parameters
guiGUI handle.

Definition at line 75 of file PlanInterpolator.h.

Member Function Documentation

void lipm_walking::PlanInterpolator::addGUIElements ( )

Add GUI panel.

Definition at line 40 of file PlanInterpolator.cpp.

std::vector<std::string> lipm_walking::PlanInterpolator::availablePlans ( ) const
inline

List available contact plans.

Returns
keys Names of available contact plans.

Definition at line 118 of file PlanInterpolator.h.

void lipm_walking::PlanInterpolator::configure ( const mc_rtc::Configuration &  config)

Read configuration from dictionary.

Parameters
configConfiguration dictionary.

Definition at line 157 of file PlanInterpolator.cpp.

const std::string& lipm_walking::PlanInterpolator::customPlanName ( ) const
inline

Get name of current custom footstep plan.

Returns
name Name of custom plan.

Definition at line 128 of file PlanInterpolator.h.

std::string lipm_walking::PlanInterpolator::gait ( ) const
inline

Get current gait as string.

Returns
gait Current gait string.

Definition at line 138 of file PlanInterpolator.h.

void lipm_walking::PlanInterpolator::gait ( const std::string &  dir)
inline

Update gait.

Parameters
dirNew gait direction.

Definition at line 159 of file PlanInterpolator.h.

FootstepPlan lipm_walking::PlanInterpolator::getPlan ( std::string  name)
inline

Get contact plan.

Returns
plan Footstep plan.

Definition at line 186 of file PlanInterpolator.h.

void lipm_walking::PlanInterpolator::removeGUIElements ( )

Remove GUI panel.

Definition at line 114 of file PlanInterpolator.cpp.

void lipm_walking::PlanInterpolator::restoreBackwardTarget ( )
inline

Restore last backward target.

Definition at line 201 of file PlanInterpolator.h.

void lipm_walking::PlanInterpolator::restoreForwardTarget ( )
inline

Restore last forward target.

Definition at line 211 of file PlanInterpolator.h.

void lipm_walking::PlanInterpolator::restoreLateralTarget ( )
inline

Restore last lateral target.

Definition at line 221 of file PlanInterpolator.h.

void lipm_walking::PlanInterpolator::run ( )

Generate a new footstep plan.

Definition at line 188 of file PlanInterpolator.cpp.

double lipm_walking::PlanInterpolator::stepWidth ( ) const
inline

Get step width.

Returns
width Step width.

Definition at line 233 of file PlanInterpolator.h.

void lipm_walking::PlanInterpolator::stepWidth ( double  stepWidth)
inline

Set step width.

  • Parameters
    stepWidthStep width.
    Note
    Step width is defined as the lateral distance between left and right foot centers. See Figure 3-9 of Human Walking handbook (Editors J. Rose and J. G. Gamble).

Definition at line 247 of file PlanInterpolator.h.

void lipm_walking::PlanInterpolator::suggestGait ( )

Suggest gait based on local target coordinates.

Definition at line 143 of file PlanInterpolator.cpp.

void lipm_walking::PlanInterpolator::updateSupportPath ( const sva::PTransformd &  X_0_lf,
const sva::PTransformd &  X_0_rf 
)

Update support path display.

Parameters
X_0_lfLeft foot transform.
X_0_rfRight foot transform.

Definition at line 484 of file PlanInterpolator.cpp.

const sva::PTransformd& lipm_walking::PlanInterpolator::worldReference ( ) const
inline

Get walking target in world frame.

Definition at line 255 of file PlanInterpolator.h.

void lipm_walking::PlanInterpolator::worldReference ( const sva::PTransformd &  worldReference)
inline

Set walking target in world frame.

Parameters
worldReferenceNew target.

Definition at line 265 of file PlanInterpolator.h.

Member Data Documentation

EIGEN_MAKE_ALIGNED_OPERATOR_NEW constexpr double lipm_walking::PlanInterpolator::DEFAULT_EXTRA_STEP_WIDTH = 0.
static

Definition at line 47 of file PlanInterpolator.h.

constexpr double lipm_walking::PlanInterpolator::IN_PLACE_EXTRA_STEP_WIDTH = 0.02
static

Definition at line 48 of file PlanInterpolator.h.

constexpr double lipm_walking::PlanInterpolator::IN_PLACE_MAX_STEP_ANGLE = 45.
static

Definition at line 49 of file PlanInterpolator.h.

bool lipm_walking::PlanInterpolator::isShown = false

Is the footstep interpolator tab displayed?

Definition at line 312 of file PlanInterpolator.h.

constexpr double lipm_walking::PlanInterpolator::MAX_EXTRA_STEP_WIDTH = 0.05
static

Definition at line 50 of file PlanInterpolator.h.

constexpr double lipm_walking::PlanInterpolator::MAX_LATERAL_STEP_LENGTH = 0.2
static

Definition at line 51 of file PlanInterpolator.h.

constexpr double lipm_walking::PlanInterpolator::MAX_SAGITTAL_STEP_LENGTH = 0.4
static

Definition at line 52 of file PlanInterpolator.h.

constexpr double lipm_walking::PlanInterpolator::MIN_STEP_LENGTH = 0.001
static

Definition at line 53 of file PlanInterpolator.h.

unsigned lipm_walking::PlanInterpolator::nbIter = 0

Number of times the interpolator was called.

Definition at line 313 of file PlanInterpolator.h.