Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

GaitedFootstepMC Class Reference

Executes a series of footsteps, probably generated by applying astar() to a GaitedFootsteps domain. More...

#include <GaitedFootstepMC.h>

Inheritance diagram for GaitedFootstepMC:

Detailed Description

Executes a series of footsteps, probably generated by applying astar() to a GaitedFootsteps domain.

Definition at line 12 of file GaitedFootstepMC.h.

List of all members.

Public Member Functions

 GaitedFootstepMC ()
 Constructor.
virtual int updateOutputs ()
 is called once per update cycle, can do any processing you need to change your priorities or set output commands on the MotionManager
virtual int isDirty ()
 not used by MotionManager at the moment, but could be used to reduce recomputation, and you may find it useful
virtual int isAlive ()
 used to prune "dead" motions from the MotionManager
void setGait (const XWalkParameters &p, bool resetSpeeds=true)
 Assign gait settings.
void setGait (const std::string &file, bool resetSpeeds=true)
 Load gait parameters from a file.
void setSteps (const std::vector< GaitedFootsteps::State > &st)
 Specify steps to perform.
void setSpeed (fmat::fmatReal x, fmat::fmatReal y, fmat::fmatReal a)
 Specify speeds for translation (mm/s) and rotation (rad/s).

Protected Member Functions

fmat::Column< 2 > curBodyOffset (double t)
 updates active step and returns offset of body position from current step's initial location
bool advanceStep ()
 increments curStep and dependent values
void solveIK (unsigned int leg, const IKSolver::Point &tgt)
 solves inverse kinematics and send affected output values to motion manager
virtual void doStart ()
 Override this if you want to run some startup code after being added to the MotionManager.
virtual void doStop ()
 Override this if you want to clean up after removal from MotionManager.

Protected Attributes

XWalkParameters xp
fmat::Column< 3 > ground
fmat::Column< 3 > gravity
std::vector
< GaitedFootsteps::State
steps
unsigned int curStep
 current step index, indicates transition to curStep+1, never increments past steps.size()-1
fmat::Column< 2 > xySpeed
fmat::fmatReal aSpeed
bool newStep
double stepStartTime
 clock time in second of beginning of step
double stepDuration
 duration in seconds
bool support [NumLegs]
 set to true if the leg is in support phase (i.e. not moving to new contact)
DriverMessaging::FixedPoints contactMsg
 list of current contact points, for better Mirage simulation

Static Protected Attributes

static KinematicJointkine = NULL
static KinematicJointchildMap [NumReferenceFrames]

Constructor & Destructor Documentation

GaitedFootstepMC::GaitedFootstepMC (  ) 

Constructor.

Definition at line 15 of file GaitedFootstepMC.h.


Member Function Documentation

bool GaitedFootstepMC::advanceStep (  )  [protected]

increments curStep and dependent values

internal function, assumes curStep is at most next-to-last

Definition at line 113 of file GaitedFootstepMC.cc.

Referenced by setSteps(), and updateOutputs().

fmat::Column< 2 > GaitedFootstepMC::curBodyOffset ( double  t  )  [protected]

updates active step and returns offset of body position from current step's initial location

internal function, assumes curStep is at most next-to-last

Definition at line 106 of file GaitedFootstepMC.cc.

Referenced by updateOutputs().

virtual void GaitedFootstepMC::doStart (  )  [protected, virtual]

Override this if you want to run some startup code after being added to the MotionManager.

Reimplemented from MotionCommand.

Definition at line 71 of file GaitedFootstepMC.h.

virtual void GaitedFootstepMC::doStop (  )  [protected, virtual]

Override this if you want to clean up after removal from MotionManager.

The old MotionManagerMsg::mc_id will still be available, but this value is no longer valid within the MotionManager. Only use it if you need to clean up associated values stored elsewhere.

Reimplemented from MotionCommand.

Definition at line 72 of file GaitedFootstepMC.h.

virtual int GaitedFootstepMC::isAlive (  )  [virtual]

used to prune "dead" motions from the MotionManager

note that a motion could be "paused" or inactive and therefore not dirty, but still alive, biding its time to "strike" ;)

Returns:
zero if the motion is still processing, non-zero otherwise

Implements MotionCommand.

Definition at line 29 of file GaitedFootstepMC.h.

virtual int GaitedFootstepMC::isDirty (  )  [virtual]

not used by MotionManager at the moment, but could be used to reduce recomputation, and you may find it useful

Returns:
zero if none of the commands have changed since last getJointCmd(), else non-zero

Implements MotionCommand.

Definition at line 28 of file GaitedFootstepMC.h.

void GaitedFootstepMC::setGait ( const std::string &  file,
bool  resetSpeeds = true 
)

Load gait parameters from a file.

Definition at line 40 of file GaitedFootstepMC.h.

void GaitedFootstepMC::setGait ( const XWalkParameters p,
bool  resetSpeeds = true 
)

Assign gait settings.

Definition at line 32 of file GaitedFootstepMC.h.

Referenced by GaitedFootstepMC().

void GaitedFootstepMC::setSpeed ( fmat::fmatReal  x,
fmat::fmatReal  y,
fmat::fmatReal  a 
)

Specify speeds for translation (mm/s) and rotation (rad/s).

Does not take affect until next step

Definition at line 57 of file GaitedFootstepMC.h.

Referenced by setGait().

void GaitedFootstepMC::setSteps ( const std::vector< GaitedFootsteps::State > &  st  ) 

Specify steps to perform.

Definition at line 47 of file GaitedFootstepMC.h.

void GaitedFootstepMC::solveIK ( unsigned int  leg,
const IKSolver::Point tgt 
) [protected]

solves inverse kinematics and send affected output values to motion manager

Definition at line 143 of file GaitedFootstepMC.cc.

Referenced by updateOutputs().

int GaitedFootstepMC::updateOutputs (  )  [virtual]

is called once per update cycle, can do any processing you need to change your priorities or set output commands on the MotionManager

Returns:
zero if no changes were made, non-zero otherwise
See also:
RobotInfo::NumFrames
RobotInfo::FrameTime

Implements MotionCommand.

Definition at line 11 of file GaitedFootstepMC.cc.


Member Data Documentation

Definition at line 81 of file GaitedFootstepMC.h.

Referenced by setSpeed().

Definition at line 89 of file GaitedFootstepMC.h.

Referenced by GaitedFootstepMC(), and solveIK().

list of current contact points, for better Mirage simulation

Definition at line 86 of file GaitedFootstepMC.h.

Referenced by updateOutputs().

unsigned int GaitedFootstepMC::curStep [protected]

current step index, indicates transition to curStep+1, never increments past steps.size()-1

Definition at line 79 of file GaitedFootstepMC.h.

Referenced by advanceStep(), curBodyOffset(), isAlive(), isDirty(), setSteps(), and updateOutputs().

Definition at line 76 of file GaitedFootstepMC.h.

Referenced by setGait(), and updateOutputs().

Definition at line 75 of file GaitedFootstepMC.h.

Referenced by setGait(), and updateOutputs().

KinematicJoint * GaitedFootstepMC::kine = NULL [static, protected]

Definition at line 88 of file GaitedFootstepMC.h.

Referenced by GaitedFootstepMC().

bool GaitedFootstepMC::newStep [protected]

Definition at line 82 of file GaitedFootstepMC.h.

Referenced by advanceStep(), and updateOutputs().

double GaitedFootstepMC::stepDuration [protected]

duration in seconds

Definition at line 84 of file GaitedFootstepMC.h.

Referenced by advanceStep(), curBodyOffset(), setSteps(), and updateOutputs().

double GaitedFootstepMC::stepStartTime [protected]

clock time in second of beginning of step

Definition at line 83 of file GaitedFootstepMC.h.

Referenced by advanceStep(), setSteps(), and updateOutputs().

bool GaitedFootstepMC::support[NumLegs] [protected]

set to true if the leg is in support phase (i.e. not moving to new contact)

Definition at line 85 of file GaitedFootstepMC.h.

Referenced by advanceStep(), and updateOutputs().

Definition at line 74 of file GaitedFootstepMC.h.

Referenced by advanceStep(), setGait(), and updateOutputs().

Definition at line 80 of file GaitedFootstepMC.h.

Referenced by advanceStep(), and setSpeed().


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:08 2016 by Doxygen 1.6.3