Generates endeffector phase durations for predefined gait styles. More...
#include <gait_generator.h>
Public Types | |
enum | Combos { C0, C1, C2, C3, C4, COMBO_COUNT } |
Predefined combinations of different strides. More... | |
enum | Gaits { Stand = 0, Flight, Walk1, Walk2, Walk2E, Run2, Run2E, Run1, Run1E, Run3, Run3E, Hop1, Hop1E, Hop2, Hop3, Hop3E, Hop5, Hop5E, GAIT_COUNT } |
Predefined strides, each with a different gait diagram. More... | |
Public Member Functions | |
GaitGenerator () | |
VecTimes | GetPhaseDurations (double T, EE ee) const |
bool | IsInContactAtStart (EE ee) const |
virtual void | SetCombo (Combos combo)=0 |
Sets a specific sequence of gaits. | |
void | SetGaits (const std::vector< Gaits > &gaits) |
Sets the times_ and contacts_ variables according to the gaits. | |
virtual | ~GaitGenerator () |
Static Public Member Functions | |
static Ptr | MakeGaitGenerator (int leg_count) |
Protected Member Functions | |
GaitInfo | RemoveTransition (const GaitInfo &g) const |
Protected Attributes | |
std::vector< ContactState > | contacts_ |
std::vector< double > | times_ |
Phase times for the complete robot during which no contact state changes. | |
Private Member Functions | |
virtual GaitInfo | GetGait (Gaits gait) const =0 |
VecTimes | GetNormalizedPhaseDurations (EE ee) const |
FootDurations | GetPhaseDurations () const |
Generates endeffector phase durations for predefined gait styles.
These gaits (e.g. quadruped trotting, biped walking) are used to initialize the towr optimization problem.
Definition at line 46 of file gait_generator.h.
Predefined combinations of different strides.
Definition at line 58 of file gait_generator.h.
Predefined strides, each with a different gait diagram.
Stand | |
Flight | |
Walk1 | |
Walk2 | |
Walk2E | |
Run2 | |
Run2E | |
Run1 | |
Run1E | |
Run3 | |
Run3E | |
Hop1 | |
Hop1E | |
Hop2 | |
Hop3 | |
Hop3E | |
Hop5 | |
Hop5E | |
GAIT_COUNT |
Definition at line 63 of file gait_generator.h.
virtual towr::GaitGenerator::~GaitGenerator | ( | ) | [virtual] |
virtual GaitInfo towr::GaitGenerator::GetGait | ( | Gaits | gait | ) | const [private, pure virtual] |
Implemented in towr::BipedGaitGenerator, towr::MonopedGaitGenerator, and towr::QuadrupedGaitGenerator.
GaitGenerator::VecTimes towr::GaitGenerator::GetNormalizedPhaseDurations | ( | EE | ee | ) | const [private] |
Definition at line 66 of file gait_generator.cc.
GaitGenerator::VecTimes towr::GaitGenerator::GetPhaseDurations | ( | double | T, |
EE | ee | ||
) | const |
ee | endeffector for which the phase durations are desired. |
T | total time for all phases, durations are scaled by that. |
Definition at line 55 of file gait_generator.cc.
GaitGenerator::FootDurations towr::GaitGenerator::GetPhaseDurations | ( | ) | const [private] |
Definition at line 77 of file gait_generator.cc.
bool towr::GaitGenerator::IsInContactAtStart | ( | EE | ee | ) | const |
ee | The endeffector/foot/hand. |
Definition at line 108 of file gait_generator.cc.
GaitGenerator::Ptr towr::GaitGenerator::MakeGaitGenerator | ( | int | leg_count | ) | [static] |
Definition at line 44 of file gait_generator.cc.
GaitGenerator::GaitInfo towr::GaitGenerator::RemoveTransition | ( | const GaitInfo & | g | ) | const [protected] |
Removes the last phase that would transition to a new stride. This is usually necessary for a gait change.
Definition at line 132 of file gait_generator.cc.
virtual void towr::GaitGenerator::SetCombo | ( | Combos | combo | ) | [pure virtual] |
Sets a specific sequence of gaits.
The derived class decides what each combo maps to. This function then fills the times_ and contacts_ variables accordingly.
Implemented in towr::QuadrupedGaitGenerator, towr::BipedGaitGenerator, and towr::MonopedGaitGenerator.
void towr::GaitGenerator::SetGaits | ( | const std::vector< Gaits > & | gaits | ) |
Sets the times_ and contacts_ variables according to the gaits.
gaits | The sequence of steps which defines gait. For example use {Stand ,Walk1,Walk1,Stand} to declare walking gait with two steps. |
Definition at line 114 of file gait_generator.cc.
std::vector<ContactState> towr::GaitGenerator::contacts_ [protected] |
The contact state for the complete robot. The size of this vector must be equal to the above times_.
Definition at line 109 of file gait_generator.h.
std::vector<double> towr::GaitGenerator::times_ [protected] |
Phase times for the complete robot during which no contact state changes.
Definition at line 103 of file gait_generator.h.