lipm_walking::FootstepPlan Struct Reference

Sequence of footsteps with gait parameters. More...

#include <lipm_walking/FootstepPlan.h>

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW void complete (const Sole &sole)
 Complete contacts from sole parameters. More...
 
sva::PTransformd computeInitialTransform (const mc_rbdyn::Robot &robot) const
 Compute initial floating-base transform over first contact. More...
 
void goToNextFootstep ()
 Advance to next footstep in plan. More...
 
void goToNextFootstep (const sva::PTransformd &actualTargetPose)
 Advance to next footstep in plan, taking into account drift in reaching target contact. More...
 
void load (const mc_rtc::Configuration &config)
 Load plan from configuration dictionary. More...
 
void reset (unsigned startIndex)
 Rewind plan to a given contact. More...
 
void restorePreviousFootstep ()
 Rewind one footstep back in plan. More...
 
void save (mc_rtc::Configuration &config) const
 Save plan to configuration dictionary. More...
 
void updateInitialTransform (const sva::PTransformd &X_0_lf, const sva::PTransformd &X_0_rf, double initHeight)
 Update plan coordinates from robot foot transforms. More...
 
void appendContact (Contact step)
 Append footstep to plan. More...
 
double comHeight () const
 Default CoM height above ground contact. More...
 
void comHeight (double height)
 Set default CoM height above ground contact. More...
 
const std::vector< Contact > & contacts () const
 Reference to list of contacts. More...
 
double doubleSupportDuration () const
 Default double-support duration. More...
 
void doubleSupportDuration (double duration)
 Set default double-support duration. More...
 
double finalDSPDuration () const
 Get final double support phase duration. More...
 
bool hasTorsoPitch () const
 Does the plan provide a reference torso pitch? More...
 
void finalDSPDuration (double duration)
 Set final double support phase duration. More...
 
double initDSPDuration () const
 Get initial double support phase duration. More...
 
void initDSPDuration (double duration)
 Set initial double support phase duration. More...
 
const sva::PTransformd & initPose ()
 Initial transform with respect to world frame. More...
 
double landingDuration () const
 Get swing foot landing ratio. More...
 
void landingDuration (double duration)
 Set swing foot landing duration. More...
 
double landingPitch () const
 Get swing foot landing pitch angle. More...
 
void landingPitch (double pitch)
 Set swing foot takeoff pitch angle. More...
 
const ContactnextContact () const
 Next contact in plan. More...
 
const ContactprevContact () const
 Previous contact in plan. More...
 
void resetContacts (const std::vector< Contact > &contacts)
 Reset contacts from another footstep plan. More...
 
double singleSupportDuration () const
 Default single-support duration. More...
 
void singleSupportDuration (double duration)
 Set single-support duration. More...
 
const ContactsupportContact () const
 Current support contact. More...
 
void swapFirstTwoContacts ()
 Swap first two contacts in plan. More...
 
double swingHeight () const
 Default swing-foot height. More...
 
void swingHeight (double height)
 Set default swing-foot height. More...
 
double takeoffDuration () const
 Get swing foot takeoff duration. More...
 
void takeoffDuration (double duration)
 Set swing foot takeoff duration. More...
 
Eigen::Vector3d takeoffOffset () const
 Get swing foot takeoff offset. More...
 
void takeoffOffset (const Eigen::Vector3d &offset)
 Set swing foot takeoff offset. More...
 
double takeoffPitch () const
 Get swing foot takeoff pitch angle. More...
 
void takeoffPitch (double pitch)
 Set swing foot takeoff pitch angle. More...
 
const ContacttargetContact () const
 Current target contact. More...
 
double torsoPitch () const
 Reference torso pitch angle. More...
 
void rewind ()
 Rewind plan to the beginning. More...
 

Public Attributes

mc_rtc::Configuration mpcConfig
 
std::string name = ""
 

Detailed Description

Sequence of footsteps with gait parameters.

Definition at line 41 of file FootstepPlan.h.

Member Function Documentation

void lipm_walking::FootstepPlan::appendContact ( Contact  step)
inline

Append footstep to plan.

Definition at line 114 of file FootstepPlan.h.

double lipm_walking::FootstepPlan::comHeight ( ) const
inline

Default CoM height above ground contact.

Definition at line 122 of file FootstepPlan.h.

void lipm_walking::FootstepPlan::comHeight ( double  height)
inline

Set default CoM height above ground contact.

Definition at line 130 of file FootstepPlan.h.

void lipm_walking::FootstepPlan::complete ( const Sole sole)

Complete contacts from sole parameters.

Parameters
soleSole parameters.

Definition at line 96 of file FootstepPlan.cpp.

sva::PTransformd lipm_walking::FootstepPlan::computeInitialTransform ( const mc_rbdyn::Robot &  robot) const

Compute initial floating-base transform over first contact.

Parameters
robotRobot model.

Definition at line 161 of file FootstepPlan.cpp.

const std::vector<Contact>& lipm_walking::FootstepPlan::contacts ( ) const
inline

Reference to list of contacts.

Definition at line 138 of file FootstepPlan.h.

double lipm_walking::FootstepPlan::doubleSupportDuration ( ) const
inline

Default double-support duration.

Definition at line 146 of file FootstepPlan.h.

void lipm_walking::FootstepPlan::doubleSupportDuration ( double  duration)
inline

Set default double-support duration.

Parameters
durationNew duration.

Definition at line 156 of file FootstepPlan.h.

double lipm_walking::FootstepPlan::finalDSPDuration ( ) const
inline

Get final double support phase duration.

Definition at line 164 of file FootstepPlan.h.

void lipm_walking::FootstepPlan::finalDSPDuration ( double  duration)
inline

Set final double support phase duration.

Parameters
durationNew duration.

Definition at line 182 of file FootstepPlan.h.

void lipm_walking::FootstepPlan::goToNextFootstep ( )

Advance to next footstep in plan.

Definition at line 125 of file FootstepPlan.cpp.

void lipm_walking::FootstepPlan::goToNextFootstep ( const sva::PTransformd &  actualTargetPose)

Advance to next footstep in plan, taking into account drift in reaching target contact.

Parameters
actualTargetPoseActual target pose.

Definition at line 134 of file FootstepPlan.cpp.

bool lipm_walking::FootstepPlan::hasTorsoPitch ( ) const
inline

Does the plan provide a reference torso pitch?

Definition at line 172 of file FootstepPlan.h.

double lipm_walking::FootstepPlan::initDSPDuration ( ) const
inline

Get initial double support phase duration.

Definition at line 190 of file FootstepPlan.h.

void lipm_walking::FootstepPlan::initDSPDuration ( double  duration)
inline

Set initial double support phase duration.

Definition at line 198 of file FootstepPlan.h.

const sva::PTransformd& lipm_walking::FootstepPlan::initPose ( )
inline

Initial transform with respect to world frame.

Returns
X_0_init Initial transform of the plan.

Definition at line 208 of file FootstepPlan.h.

double lipm_walking::FootstepPlan::landingDuration ( ) const
inline

Get swing foot landing ratio.

Definition at line 216 of file FootstepPlan.h.

void lipm_walking::FootstepPlan::landingDuration ( double  duration)
inline

Set swing foot landing duration.

Parameters
durationNew duration.

Definition at line 230 of file FootstepPlan.h.

double lipm_walking::FootstepPlan::landingPitch ( ) const
inline

Get swing foot landing pitch angle.

Definition at line 238 of file FootstepPlan.h.

void lipm_walking::FootstepPlan::landingPitch ( double  pitch)
inline

Set swing foot takeoff pitch angle.

Definition at line 250 of file FootstepPlan.h.

void lipm_walking::FootstepPlan::load ( const mc_rtc::Configuration &  config)

Load plan from configuration dictionary.

Parameters
configConfiguration dictionary.

Definition at line 53 of file FootstepPlan.cpp.

const Contact& lipm_walking::FootstepPlan::nextContact ( ) const
inline

Next contact in plan.

Definition at line 260 of file FootstepPlan.h.

const Contact& lipm_walking::FootstepPlan::prevContact ( ) const
inline

Previous contact in plan.

Definition at line 268 of file FootstepPlan.h.

void lipm_walking::FootstepPlan::reset ( unsigned  startIndex)

Rewind plan to a given contact.

Parameters
startIndexIndex of first support contact.

Definition at line 117 of file FootstepPlan.cpp.

void lipm_walking::FootstepPlan::resetContacts ( const std::vector< Contact > &  contacts)
inline

Reset contacts from another footstep plan.

Parameters
contactsNew sequence of contacts.

Definition at line 278 of file FootstepPlan.h.

void lipm_walking::FootstepPlan::restorePreviousFootstep ( )

Rewind one footstep back in plan.

Note
This function cannot rewind more than one step. It is only used when activating a DoubleSupport to Standing transition.

Definition at line 148 of file FootstepPlan.cpp.

void lipm_walking::FootstepPlan::rewind ( )
inline

Rewind plan to the beginning.

Definition at line 420 of file FootstepPlan.h.

void lipm_walking::FootstepPlan::save ( mc_rtc::Configuration &  config) const

Save plan to configuration dictionary.

Parameters
configConfiguration dictionary.

Definition at line 73 of file FootstepPlan.cpp.

double lipm_walking::FootstepPlan::singleSupportDuration ( ) const
inline

Default single-support duration.

Definition at line 286 of file FootstepPlan.h.

void lipm_walking::FootstepPlan::singleSupportDuration ( double  duration)
inline

Set single-support duration.

Definition at line 294 of file FootstepPlan.h.

const Contact& lipm_walking::FootstepPlan::supportContact ( ) const
inline

Current support contact.

Definition at line 302 of file FootstepPlan.h.

void lipm_walking::FootstepPlan::swapFirstTwoContacts ( )
inline

Swap first two contacts in plan.

Definition at line 310 of file FootstepPlan.h.

double lipm_walking::FootstepPlan::swingHeight ( ) const
inline

Default swing-foot height.

Definition at line 318 of file FootstepPlan.h.

void lipm_walking::FootstepPlan::swingHeight ( double  height)
inline

Set default swing-foot height.

Definition at line 330 of file FootstepPlan.h.

double lipm_walking::FootstepPlan::takeoffDuration ( ) const
inline

Get swing foot takeoff duration.

Definition at line 340 of file FootstepPlan.h.

void lipm_walking::FootstepPlan::takeoffDuration ( double  duration)
inline

Set swing foot takeoff duration.

Parameters
durationNew duration.

Definition at line 354 of file FootstepPlan.h.

Eigen::Vector3d lipm_walking::FootstepPlan::takeoffOffset ( ) const
inline

Get swing foot takeoff offset.

Definition at line 362 of file FootstepPlan.h.

void lipm_walking::FootstepPlan::takeoffOffset ( const Eigen::Vector3d &  offset)
inline

Set swing foot takeoff offset.

Definition at line 374 of file FootstepPlan.h.

double lipm_walking::FootstepPlan::takeoffPitch ( ) const
inline

Get swing foot takeoff pitch angle.

Definition at line 382 of file FootstepPlan.h.

void lipm_walking::FootstepPlan::takeoffPitch ( double  pitch)
inline

Set swing foot takeoff pitch angle.

Definition at line 394 of file FootstepPlan.h.

const Contact& lipm_walking::FootstepPlan::targetContact ( ) const
inline

Current target contact.

Definition at line 404 of file FootstepPlan.h.

double lipm_walking::FootstepPlan::torsoPitch ( ) const
inline

Reference torso pitch angle.

Definition at line 412 of file FootstepPlan.h.

void lipm_walking::FootstepPlan::updateInitialTransform ( const sva::PTransformd &  X_0_lf,
const sva::PTransformd &  X_0_rf,
double  initHeight 
)

Update plan coordinates from robot foot transforms.

Parameters
X_0_lfLeft foot transform.
X_0_rfRight foot transform.
initHeightHeight of first two contacts after transform.

Definition at line 171 of file FootstepPlan.cpp.

Member Data Documentation

mc_rtc::Configuration lipm_walking::FootstepPlan::mpcConfig

Definition at line 426 of file FootstepPlan.h.

std::string lipm_walking::FootstepPlan::name = ""

Definition at line 427 of file FootstepPlan.h.