Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
towr::GaitGenerator Class Reference

Generates endeffector phase durations for predefined gait styles. More...

#include <gait_generator.h>

Inheritance diagram for towr::GaitGenerator:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

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.


Member Enumeration Documentation

Predefined combinations of different strides.

Enumerator:
C0 
C1 
C2 
C3 
C4 
COMBO_COUNT 

Definition at line 58 of file gait_generator.h.

Predefined strides, each with a different gait diagram.

Enumerator:
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.


Constructor & Destructor Documentation

virtual towr::GaitGenerator::~GaitGenerator ( ) [virtual]

Member Function Documentation

virtual GaitInfo towr::GaitGenerator::GetGait ( Gaits  gait) const [private, pure virtual]
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
Returns:
the swing and stance durations for the set gait.
Parameters:
eeendeffector for which the phase durations are desired.
Ttotal 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.

Returns:
true if the foot is initially in contact with the environment.
Parameters:
eeThe 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.

Parameters:
gaitsThe 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.


Member Data Documentation

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.


The documentation for this class was generated from the following files:


towr
Author(s): Alexander W. Winkler
autogenerated on Mon Apr 15 2019 02:42:32