Generators¶
Gait generators are used to create the contact phases needed for a gait.
GaitGenerator¶
-
namespace
gambol -
class
GaitGenerator¶ - #include <GaitGenerator.h>
Generates endeffector phase durations for predefined gait styles.
These gaits (e.g. quadruped trotting, biped walking) are used to initialize the towr optimization problem.
Subclassed by gambol::GaitGeneratorBiped, gambol::GaitGeneratorBipedFeet, gambol::GaitGeneratorMonoped, gambol::GaitGeneratorQuadruped, gambol::GaitGeneratorSnake
Public Types
-
enum
Combos¶ Predefined combinations of different strides.
Values:
-
enumerator
C0¶
-
enumerator
C1¶
-
enumerator
C2¶
-
enumerator
C3¶
-
enumerator
C4¶
-
enumerator
COMBO_COUNT¶
-
enumerator
-
enum
Gaits¶ Predefined strides, each with a different gait diagram.
Values:
-
enumerator
Stand¶
-
enumerator
Flight¶
-
enumerator
Walk1¶
-
enumerator
Walk1B¶
-
enumerator
Walk1E¶
-
enumerator
Walk2¶
-
enumerator
Walk2E¶
-
enumerator
Walk3¶
-
enumerator
Run2¶
-
enumerator
Run2E¶
-
enumerator
Run1¶
-
enumerator
Run1E¶
-
enumerator
Run3¶
-
enumerator
Run3E¶
-
enumerator
Hop1¶
-
enumerator
Hop1E¶
-
enumerator
Hop2¶
-
enumerator
Hop3¶
-
enumerator
Hop3E¶
-
enumerator
Hop5¶
-
enumerator
Hop5E¶
-
enumerator
Balance¶
-
enumerator
GAIT_COUNT¶
-
enumerator
-
using
Ptr= std::shared_ptr<GaitGenerator>¶
-
using
VecTimes= std::vector<double>¶
-
using
ContactState= std::vector<bool>¶
-
using
GaitInfo= std::pair<VecTimes, std::vector<ContactState>>¶
-
using
EE= uint¶
Public Functions
-
GaitGenerator() = default¶
-
virtual
~GaitGenerator() = default¶
-
VecTimes
GetPhaseDurations(double T, EE ee) const¶ - Parameters
ee – endeffector for which the phase durations are desired.
T – total time for all phases, durations are scaled by that.
- Returns
the swing and stance durations for the set gait.
-
bool
IsInContactAtStart(EE ee) const¶ - Parameters
ee – The endeffector/foot/hand.
- Returns
true if the foot is initially in contact with the environment.
-
std::vector<bool>
IsInContactAtStart() const¶ Get contac_at_start for all end-effectors
-
int
GetSteps(EE ee = 0) const¶ - Parameters
ee – The end-effector
- Returns
Number of steps for a specific end-effector
Protected Functions
Protected Attributes
-
std::vector<double>
times_¶ Phase times for the complete robot during which no contact state changes.
-
std::vector<ContactState>
contacts_¶ The contact state for the complete robot. The size of this vector must be equal to the above times_.
-
enum
-
class