Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

CMPackWalkMC Class Reference

A nice walking class from Carnegie Mellon University's 2001 Robosoccer team, modified to fit this framework, see their license More...

#include <CMPackWalkMC.h>

Inheritance diagram for CMPackWalkMC:

Detailed Description

A nice walking class from Carnegie Mellon University's 2001 Robosoccer team, modified to fit this framework, see their license

Moves the feet through a looping path in order to walk - default parameters use a walk low to the ground so you don't walk over the ball.

There are around 50 parameters which control the walk - these are loaded from a file and can modify almost every aspect of the the gait. It's a binary file format, I recommend using our Walk Edit menu to edit the parameters in real time and get immediate feedback. It's a tricky job to find a good set of parameters.

And then, once you have it walking, there's a whole different problem of actually moving at the speed that's requested. That's what the calibration parameters do - map the requested target speed to the command to pass to the engine so the resulting motion will hopefully match what you asked for.

You'll probably want to take a look at the setTargetVelocity() function to control the direction of the walk.

This class is in some dire need of some cleanup - we (Tekkotsu) didn't write it, have none the less hacked around and added stuff on top of it. So pardon the mess, unless you're feeling ambitious to write your own ;)

This portion of the code falls under CMPack's license:

  =========================================================================
    CMPack'02 Source Code Release for OPEN-R SDK v1.0
    Copyright (C) 2002 Multirobot Lab [Project Head: Manuela Veloso]
    School of Computer Science, Carnegie Mellon University
  -------------------------------------------------------------------------
    This software is distributed under the GNU General Public License,
    version 2.  If you do not have a copy of this licence, visit
    www.gnu.org, or write: Free Software Foundation, 59 Temple Place,
    Suite 330 Boston, MA 02111-1307 USA.  This program is distributed
    in the hope that it will be useful, but WITHOUT ANY WARRANTY,
    including MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  -------------------------------------------------------------------------
    Additionally licensed to Sony Corporation under the following terms:

    This software is provided by the copyright holders AS IS and any
    express or implied warranties, including, but not limited to, the
    implied warranties of merchantability and fitness for a particular
    purpose are disclaimed.  In no event shall authors be liable for
    any direct, indirect, incidental, special, exemplary, or consequential
    damages (including, but not limited to, procurement of substitute
    goods or services; loss of use, data, or profits; or business
    interruption) however caused and on any theory of liability, whether
    in contract, strict liability, or tort (including negligence or
    otherwise) arising in any way out of the use of this software, even if
    advised of the possibility of such damage.
  =========================================================================

Definition at line 70 of file CMPackWalkMC.h.

List of all members.

Classes

struct  CalibrationParam
 holds information to correct for slippage, non-idealities More...
struct  LegParam
 holds parameters about how to move each leg More...
struct  LegWalkState
 holds state about each leg's path More...
struct  WalkParam
 holds more general parameters about the walk More...

Public Types

enum  AccelerationStyle_t { CALIBRATION_ACCEL, INF_ACCEL, DEFAULT_ACCEL }
 

used to specify value for acc_style

More...
typedef SplinePath< vector3d,
float
splinepath
 for convenience
typedef HermiteSplineSegment
< vector3d, float
spline
 for convenience

Public Member Functions

 CMPackWalkMC (const char *pfile=NULL)
 constructor
virtual void start ()
 sends an activate LocomotionEvent
virtual void stop ()
 sends a deactivate LocomotionEvent
virtual void zeroVelocities ()
 Posts a LocomotionEvent. Also forces an output frame setting wheel velocities to zero; needed because if we remove a motion command there may be nothing left to zero the velocities.
virtual int updateOutputs ()
 calculates current positions of the legs or speeds of the wheels
virtual int isDirty ()
 Returns true if we are walking. This modified isDirty allows the AIBO to slow down to a stop rather than stopping immediately.
virtual int isAlive ()
 Will prune if we've taken the requested number of steps.
virtual unsigned int getBinSize () const
 Calculates space needed to save - if you can't precisely add up the size, just make sure to overestimate and things will still work.
virtual unsigned int loadBuffer (const char buf[], unsigned int len, const char *filename=NULL)
 Load from a saved buffer in memory.
virtual unsigned int saveBuffer (char buf[], unsigned int len) const
 Save to a given buffer in memory.
virtual unsigned int loadFile (const char *filename)
 initiate opening of the specified file and loading/saving of all appropriate information.
virtual unsigned int saveFile (const char *filename) const
 initiate opening of the specified file and loading/saving of all appropriate information.
const vector3d & getTargetVelocity ()
 returns current velocity we're trying to go
const vector3d & getCurVelocity () const
 returns the velocity we're actually moving (subject to clipping at max_accel_xya), doesn't reflect value of getPaused()...
unsigned int getStartTravelTime ()
 returns the time at which we started traveling along the current vector, in milliseconds
unsigned int getTravelTime ()
 returns the amount of time we've been traveling along the current vector, in milliseconds
void setTargetVelocity (double dx, double dy, double da)
 set the direction to walk
void setTargetVelocity (double dx, double dy, double da, double time)
 set the direction to walk
void setTargetDisplacement (double dx, double dy, double da, double time)
 recalculates the target velocity so steps are of a given length to achieve the specified displacement in n steps
int getRemainingSteps () const
 returns remaining steps (step_count) (negative means infinite)
float getStepThreshold () const
 returns the step threshold -- see step_threshold
void setStepThreshold (float st)
 sets the step threshold -- see step_threshold
void setPaused (bool p)
 if set to true, will stop moving
bool getPaused () const
 if is true, we aren't moving
void setHeight (double h)
 sets WalkParam::body_height of wp
double getHeight ()
 gets WalkParam::body_height of wp
void setAngle (double a)
 sets WalkParam::body_angle of wp
double getAngle ()
 gets WalkParam::body_angle of wp
void setHop (double h)
 sets WalkParam::hop of wp
double getHop ()
 gets WalkParam::hop of wp
void setSway (double h)
 sets WalkParam::sway of wp
double getSway ()
 gets WalkParam::sway of wp
void setPeriod (long p)
 sets WalkParam::period of wp
long getPeriod ()
 gets WalkParam::period of wp
void setSlowMo (float p)
 sets slowmo
floatgetSlowMo ()
 gets slowmo
virtual void setAccelerationStyle (AccelerationStyle_t acc)
 sets acc_style
virtual AccelerationStyle_t getAccelerationStyle () const
 returns acc_style
const vector3d & getLegPosition (LegOrder_t i) const
 returns the current leg position of leg i
struct WalkParamgetWP ()
struct CalibrationParamgetCP ()
 returns the current walk parameter structure
void resetLegPos ()
 returns the current walk calibration parameter
float getMaxXVel () const
 more portable than directly accessing MAX_DX
float getMaxYVel () const
 more portable than directly accessing MAX_DY
float getMaxAVel () const
 more portable than directly accessing MAX_DA

Static Public Attributes

static const float MAX_DX = 180
 maximum forward velocity, for setTargetDisplacement
static const float MAX_DY = 140
 maximum sideways velocity, for setTargetDisplacement
static const float MAX_DA = 1.8f
 maximum angular velocity, for setTargetDisplacement
static const vector3d max_accel_xya
 maximum acceleration of x, y, and a velocity

Protected Member Functions

void init (const char *pfile)
 does some setup stuff, calls loadFile(pfile)

Static Protected Member Functions

static void applyCalibration (const float mat[3][11], const vector3d &in, vector3d &out)
 converts in to calibration parameters and multiplies through the calibration matrix

Protected Attributes

OutputCmd cmds [NumOutputs][NumFrames]
 holds current joint commands
bool isPaused
 true if we are paused
WalkParam wp
 current walking parameters (note that it's not static - different CMPackWalkMC's can have different setting, handy...
CalibrationParam cp
 calibration parameters for current walk.
LegWalkState legw [NumLegs]
 current state of each leg
vector3d legpos [NumLegs]
 current position of each leg
splinepath body_loc
 the path the body goes through while walking (?)
splinepath body_angle
 the path the body goes through while walking (?)
vector3d liftPos [NumLegs]
 position each of the feet was last lifted
vector3d downPos [NumLegs]
 position each of the feet is next going to be set down
AccelerationStyle_t acc_style
 lets you switch between finite or infinite acceleration models
int step_count
 number of steps to take before stopping; if negative, walk forever.
float step_threshold
 point in a leg's cycle where the step counter should be decremented; 0 - leg lift, .25 - mid-air, .5 - leg down, .75 - mid-ground
double last_cycle
 where the walk is in it its cycle, updated at the end of each call to updateOutputs()
vector3d pos_delta
 how much we've moved
float angle_delta
 how much we've turned
unsigned int travelTime
 the time of the last call to setTargetVelocity - handy to check the time we've been traveling current vector
int time
 time of last call to updateOutputs() (scaled by slowmo)
int TimeStep
 time to pretend passes between each call to updateOutputs() - usually RobotInfo::FrameTime
float slowmo
 scales time values to make the walk move in slow motion for analysis (or fast forward)
int CycleOffset
int TimeOffset
bool NewCycleOffset
vector3d target_disp_xya
 requested displacement
vector3d vel_xya
 the current velocity we're moving
vector3d target_vel_xya
 the velocity that was requested
vector3d last_target_vel_xya
 the velocity that was last sent to motion

Member Typedef Documentation

typedef HermiteSplineSegment<vector3d,float> CMPackWalkMC::spline

for convenience

Definition at line 73 of file CMPackWalkMC.h.

typedef SplinePath<vector3d,float> CMPackWalkMC::splinepath

for convenience

Definition at line 72 of file CMPackWalkMC.h.


Member Enumeration Documentation

used to specify value for acc_style

Enumerator:
CALIBRATION_ACCEL 

use the acceleration specified by the calibration parameters

INF_ACCEL 

ignore calibration acceleration (attempt infinite acceleration)

DEFAULT_ACCEL 

reference the value of Config::motion_config::walk_acceleration

Definition at line 206 of file CMPackWalkMC.h.


Constructor & Destructor Documentation

CMPackWalkMC::CMPackWalkMC ( const char *  pfile = NULL  ) 

constructor

Definition at line 75 of file CMPackWalkMC.cc.


Member Function Documentation

void CMPackWalkMC::applyCalibration ( const float  mat[3][11],
const vector3d &  in,
vector3d &  out 
) [static, protected]

converts in to calibration parameters and multiplies through the calibration matrix

Definition at line 737 of file CMPackWalkMC.cc.

Referenced by updateOutputs().

virtual AccelerationStyle_t CMPackWalkMC::getAccelerationStyle (  )  const [virtual]

returns acc_style

Definition at line 212 of file CMPackWalkMC.h.

double CMPackWalkMC::getAngle (  ) 

gets WalkParam::body_angle of wp

Definition at line 195 of file CMPackWalkMC.h.

unsigned int CMPackWalkMC::getBinSize (  )  const [virtual]

Calculates space needed to save - if you can't precisely add up the size, just make sure to overestimate and things will still work.

getBinSize is used for reserving buffers during serialization, but does not necessarily determine the actual size of what is written -- the return value of saveBuffer() specifies that after the data actually has been written. If getBinSize overestimates, the extra memory allocation is only temporary, no extra filler bytes are actually stored.

Returns:
number of bytes read/written, 0 if error (or empty)

Implements LoadSave.

Definition at line 164 of file CMPackWalkMC.cc.

struct CalibrationParam& CMPackWalkMC::getCP (  )  [read]

returns the current walk parameter structure

Definition at line 220 of file CMPackWalkMC.h.

const vector3d& CMPackWalkMC::getCurVelocity (  )  const

returns the velocity we're actually moving (subject to clipping at max_accel_xya), doesn't reflect value of getPaused()...

Definition at line 153 of file CMPackWalkMC.h.

double CMPackWalkMC::getHeight (  ) 

gets WalkParam::body_height of wp

Definition at line 193 of file CMPackWalkMC.h.

double CMPackWalkMC::getHop (  ) 

gets WalkParam::hop of wp

Definition at line 197 of file CMPackWalkMC.h.

const vector3d& CMPackWalkMC::getLegPosition ( LegOrder_t  i  )  const

returns the current leg position of leg i

Definition at line 216 of file CMPackWalkMC.h.

float CMPackWalkMC::getMaxAVel (  )  const

more portable than directly accessing MAX_DA

Definition at line 234 of file CMPackWalkMC.h.

Referenced by setTargetDisplacement().

float CMPackWalkMC::getMaxXVel (  )  const

more portable than directly accessing MAX_DX

Definition at line 232 of file CMPackWalkMC.h.

Referenced by setTargetDisplacement().

float CMPackWalkMC::getMaxYVel (  )  const

more portable than directly accessing MAX_DY

Definition at line 233 of file CMPackWalkMC.h.

Referenced by setTargetDisplacement().

bool CMPackWalkMC::getPaused (  )  const

if is true, we aren't moving

Definition at line 191 of file CMPackWalkMC.h.

long CMPackWalkMC::getPeriod (  ) 

gets WalkParam::period of wp

Definition at line 201 of file CMPackWalkMC.h.

int CMPackWalkMC::getRemainingSteps (  )  const

returns remaining steps (step_count) (negative means infinite)

Definition at line 184 of file CMPackWalkMC.h.

float* CMPackWalkMC::getSlowMo (  ) 

gets slowmo

Definition at line 203 of file CMPackWalkMC.h.

unsigned int CMPackWalkMC::getStartTravelTime (  ) 

returns the time at which we started traveling along the current vector, in milliseconds

Definition at line 155 of file CMPackWalkMC.h.

Referenced by getTravelTime().

float CMPackWalkMC::getStepThreshold (  )  const

returns the step threshold -- see step_threshold

Definition at line 187 of file CMPackWalkMC.h.

double CMPackWalkMC::getSway (  ) 

gets WalkParam::sway of wp

Definition at line 199 of file CMPackWalkMC.h.

const vector3d& CMPackWalkMC::getTargetVelocity (  ) 

returns current velocity we're trying to go

Definition at line 151 of file CMPackWalkMC.h.

unsigned int CMPackWalkMC::getTravelTime (  ) 

returns the amount of time we've been traveling along the current vector, in milliseconds

Definition at line 157 of file CMPackWalkMC.h.

Referenced by updateOutputs().

struct WalkParam& CMPackWalkMC::getWP (  )  [read]

Definition at line 219 of file CMPackWalkMC.h.

void CMPackWalkMC::init ( const char *  pfile  )  [protected]

does some setup stuff, calls loadFile(pfile)

Definition at line 125 of file CMPackWalkMC.cc.

Referenced by CMPackWalkMC().

virtual int CMPackWalkMC::isAlive (  )  [virtual]

Will prune if we've taken the requested number of steps.

Implements MotionCommand.

Definition at line 142 of file CMPackWalkMC.h.

int CMPackWalkMC::isDirty (  )  [virtual]

Returns true if we are walking. This modified isDirty allows the AIBO to slow down to a stop rather than stopping immediately.

Implements MotionCommand.

Definition at line 146 of file CMPackWalkMC.cc.

Referenced by updateOutputs().

unsigned int CMPackWalkMC::loadBuffer ( const char  buf[],
unsigned int  len,
const char *  filename = NULL 
) [virtual]

Load from a saved buffer in memory.

Parameters:
buf pointer to the memory where you should begin loading
len length of buf available (this isn't necessarily all yours, there might be other things following your data)
Returns:
the number of bytes actually used

Implements LoadSave.

Definition at line 172 of file CMPackWalkMC.cc.

unsigned int CMPackWalkMC::loadFile ( const char *  filename  )  [virtual]

initiate opening of the specified file and loading/saving of all appropriate information.

Parameters:
filename the file to load/save
Returns:
number of bytes read/written, 0 if error (or empty)

Reimplemented from LoadSave.

Definition at line 272 of file CMPackWalkMC.cc.

Referenced by init().

void CMPackWalkMC::resetLegPos (  ) 

returns the current walk calibration parameter

takes current leg positions from WorldState and tries to match the point in the cycle most like it

Definition at line 703 of file CMPackWalkMC.cc.

Referenced by init(), and updateOutputs().

unsigned int CMPackWalkMC::saveBuffer ( char  buf[],
unsigned int  len 
) const [virtual]

Save to a given buffer in memory.

Parameters:
buf pointer to the memory where you should begin writing
len length of buf available. (this isn't necessarily all yours, constrain yourself to what you returned in getBinSize() )
Returns:
the number of bytes actually used

Implements LoadSave.

Definition at line 232 of file CMPackWalkMC.cc.

unsigned int CMPackWalkMC::saveFile ( const char *  filename  )  const [virtual]

initiate opening of the specified file and loading/saving of all appropriate information.

Parameters:
filename the file to load/save
Returns:
number of bytes read/written, 0 if error (or empty)

Reimplemented from LoadSave.

Definition at line 275 of file CMPackWalkMC.cc.

virtual void CMPackWalkMC::setAccelerationStyle ( AccelerationStyle_t  acc  )  [virtual]

sets acc_style

Definition at line 211 of file CMPackWalkMC.h.

void CMPackWalkMC::setAngle ( double  a  ) 

sets WalkParam::body_angle of wp

Definition at line 194 of file CMPackWalkMC.h.

void CMPackWalkMC::setHeight ( double  h  ) 

sets WalkParam::body_height of wp

Definition at line 192 of file CMPackWalkMC.h.

void CMPackWalkMC::setHop ( double  h  ) 

sets WalkParam::hop of wp

Definition at line 196 of file CMPackWalkMC.h.

void CMPackWalkMC::setPaused ( bool  p  ) 

if set to true, will stop moving

Definition at line 190 of file CMPackWalkMC.h.

void CMPackWalkMC::setPeriod ( long  p  ) 

sets WalkParam::period of wp

Definition at line 200 of file CMPackWalkMC.h.

void CMPackWalkMC::setSlowMo ( float  p  ) 

sets slowmo

Definition at line 202 of file CMPackWalkMC.h.

void CMPackWalkMC::setStepThreshold ( float  st  ) 

sets the step threshold -- see step_threshold

Definition at line 188 of file CMPackWalkMC.h.

void CMPackWalkMC::setSway ( double  h  ) 

sets WalkParam::sway of wp

Definition at line 198 of file CMPackWalkMC.h.

void CMPackWalkMC::setTargetDisplacement ( double  dx,
double  dy,
double  da,
double  time 
)

recalculates the target velocity so steps are of a given length to achieve the specified displacement in n steps

Parameters:
dx length of displacement in millimeters along body's x axis
dy length of displacement in millimeters along body's y axis
da amount to turn in radians, counter-clockwise viewed from above
time (seconds) duration in which to do the displacement (thus controls velocity); time will be rounded to the nearest step time. (This is internally converted to number of steps)
See also:
setTargetVelocity()

Definition at line 337 of file CMPackWalkMC.cc.

void CMPackWalkMC::setTargetVelocity ( double  dx,
double  dy,
double  da,
double  time 
)

set the direction to walk

Parameters:
dx forward velocity (millimeters per second)
dy left velocity (millimeters per second)
da counterclockwise velocity (radians per second)
time (seconds) duration to walk before stopping and posting a status event; time will be rounded to the nearest step time. (This is internally converted to number of steps)

Definition at line 305 of file CMPackWalkMC.cc.

void CMPackWalkMC::setTargetVelocity ( double  dx,
double  dy,
double  da 
)

set the direction to walk

Parameters:
dx forward velocity (millimeters per second)
dy left velocity (millimeters per second)
da counterclockwise velocity (radians per second)

Definition at line 279 of file CMPackWalkMC.cc.

Referenced by setTargetDisplacement(), setTargetVelocity(), and zeroVelocities().

void CMPackWalkMC::start (  )  [virtual]

sends an activate LocomotionEvent

Reimplemented from MotionCommand.

Definition at line 98 of file CMPackWalkMC.cc.

void CMPackWalkMC::stop (  )  [virtual]

sends a deactivate LocomotionEvent

Reimplemented from MotionCommand.

Definition at line 106 of file CMPackWalkMC.cc.

int CMPackWalkMC::updateOutputs (  )  [virtual]

calculates current positions of the legs or speeds of the wheels

Implements MotionCommand.

Definition at line 362 of file CMPackWalkMC.cc.

void CMPackWalkMC::zeroVelocities (  )  [virtual]

Posts a LocomotionEvent. Also forces an output frame setting wheel velocities to zero; needed because if we remove a motion command there may be nothing left to zero the velocities.

Definition at line 111 of file CMPackWalkMC.cc.

Referenced by stop().


Member Data Documentation

lets you switch between finite or infinite acceleration models

Definition at line 260 of file CMPackWalkMC.h.

Referenced by getAccelerationStyle(), setAccelerationStyle(), and updateOutputs().

how much we've turned

Definition at line 268 of file CMPackWalkMC.h.

Referenced by updateOutputs().

the path the body goes through while walking (?)

Definition at line 256 of file CMPackWalkMC.h.

Referenced by init().

the path the body goes through while walking (?)

Definition at line 255 of file CMPackWalkMC.h.

Referenced by init().

OutputCmd CMPackWalkMC::cmds[NumOutputs][NumFrames] [protected]

holds current joint commands

Definition at line 240 of file CMPackWalkMC.h.

Referenced by updateOutputs().

calibration parameters for current walk.

Definition at line 252 of file CMPackWalkMC.h.

Referenced by getBinSize(), getCP(), loadBuffer(), saveBuffer(), setTargetVelocity(), and updateOutputs().

int CMPackWalkMC::CycleOffset [protected]

The CycleOffset variable is used to ensure that each time the AIBO starts walking, it starts at the same point in the walk cycle as where it stopped. This measure is intended to decrease the amount of jerking (and hence deviation) that occurs when the AIBO starts walking forward and then suddenly stops.

Definition at line 281 of file CMPackWalkMC.h.

Referenced by updateOutputs().

vector3d CMPackWalkMC::downPos[NumLegs] [protected]

position each of the feet is next going to be set down

Definition at line 258 of file CMPackWalkMC.h.

Referenced by updateOutputs().

bool CMPackWalkMC::isPaused [protected]

true if we are paused

Definition at line 249 of file CMPackWalkMC.h.

Referenced by getPaused(), isDirty(), and setPaused().

double CMPackWalkMC::last_cycle [protected]

where the walk is in it its cycle, updated at the end of each call to updateOutputs()

Definition at line 265 of file CMPackWalkMC.h.

Referenced by updateOutputs().

vector3d CMPackWalkMC::last_target_vel_xya [protected]

the velocity that was last sent to motion

Definition at line 298 of file CMPackWalkMC.h.

Referenced by updateOutputs().

vector3d CMPackWalkMC::legpos[NumLegs] [protected]

current position of each leg

Definition at line 254 of file CMPackWalkMC.h.

Referenced by getLegPosition(), resetLegPos(), and updateOutputs().

LegWalkState CMPackWalkMC::legw[NumLegs] [protected]

current state of each leg

Definition at line 253 of file CMPackWalkMC.h.

Referenced by init(), and updateOutputs().

vector3d CMPackWalkMC::liftPos[NumLegs] [protected]

position each of the feet was last lifted

Definition at line 257 of file CMPackWalkMC.h.

Referenced by updateOutputs().

const vector3d CMPackWalkMC::max_accel_xya [static]

maximum acceleration of x, y, and a velocity

Definition at line 236 of file CMPackWalkMC.h.

Referenced by updateOutputs().

const float CMPackWalkMC::MAX_DA = 1.8f [static]

maximum angular velocity, for setTargetDisplacement

Definition at line 227 of file CMPackWalkMC.h.

Referenced by CMPackWalkMC::CalibrationParam::CalibrationParam(), getMaxAVel(), and updateOutputs().

const float CMPackWalkMC::MAX_DX = 180 [static]

maximum forward velocity, for setTargetDisplacement

Definition at line 225 of file CMPackWalkMC.h.

Referenced by CMPackWalkMC::CalibrationParam::CalibrationParam(), getMaxXVel(), and updateOutputs().

const float CMPackWalkMC::MAX_DY = 140 [static]

maximum sideways velocity, for setTargetDisplacement

Definition at line 226 of file CMPackWalkMC.h.

Referenced by CMPackWalkMC::CalibrationParam::CalibrationParam(), getMaxYVel(), and updateOutputs().

bool CMPackWalkMC::NewCycleOffset [protected]

Every time we stop, we know we'll have a new CycleOffset, and we'll need to compute a new TimeOffset. This boolean says as much.

Definition at line 292 of file CMPackWalkMC.h.

Referenced by updateOutputs().

vector3d CMPackWalkMC::pos_delta [protected]

how much we've moved

Definition at line 267 of file CMPackWalkMC.h.

Referenced by updateOutputs().

scales time values to make the walk move in slow motion for analysis (or fast forward)

Definition at line 273 of file CMPackWalkMC.h.

Referenced by getSlowMo(), setSlowMo(), and updateOutputs().

int CMPackWalkMC::step_count [protected]

number of steps to take before stopping; if negative, walk forever.

Definition at line 262 of file CMPackWalkMC.h.

Referenced by getRemainingSteps(), isAlive(), isDirty(), setTargetDisplacement(), setTargetVelocity(), and updateOutputs().

point in a leg's cycle where the step counter should be decremented; 0 - leg lift, .25 - mid-air, .5 - leg down, .75 - mid-ground

Definition at line 263 of file CMPackWalkMC.h.

Referenced by getStepThreshold(), setStepThreshold(), and updateOutputs().

vector3d CMPackWalkMC::target_disp_xya [protected]

requested displacement

Definition at line 295 of file CMPackWalkMC.h.

Referenced by setTargetDisplacement(), setTargetVelocity(), and updateOutputs().

vector3d CMPackWalkMC::target_vel_xya [protected]

the velocity that was requested

Definition at line 297 of file CMPackWalkMC.h.

Referenced by getTargetVelocity(), isDirty(), setTargetVelocity(), start(), and updateOutputs().

int CMPackWalkMC::time [protected]

time of last call to updateOutputs() (scaled by slowmo)

Definition at line 271 of file CMPackWalkMC.h.

Referenced by updateOutputs().

int CMPackWalkMC::TimeOffset [protected]

Each CycleOffset corresponds to a different TimeOffset once the robot starts walking again. Consider this example: the robot stops 2/3 of the way through the cycle, then starts again 1/3 of the way through the cycle on the absolute clock. The time offset to advance the clock to the right part of the cycle is 1/3 of a cycle, so we set TimeOffset to 1/3 cycle and add that to every clock value used in the walk code.

Definition at line 289 of file CMPackWalkMC.h.

Referenced by updateOutputs().

int CMPackWalkMC::TimeStep [protected]

time to pretend passes between each call to updateOutputs() - usually RobotInfo::FrameTime

Definition at line 272 of file CMPackWalkMC.h.

Referenced by updateOutputs().

unsigned int CMPackWalkMC::travelTime [protected]

the time of the last call to setTargetVelocity - handy to check the time we've been traveling current vector

Definition at line 270 of file CMPackWalkMC.h.

Referenced by getStartTravelTime(), start(), updateOutputs(), and zeroVelocities().

vector3d CMPackWalkMC::vel_xya [protected]

the current velocity we're moving

Definition at line 296 of file CMPackWalkMC.h.

Referenced by getCurVelocity(), isDirty(), and updateOutputs().

current walking parameters (note that it's not static - different CMPackWalkMC's can have different setting, handy...

Definition at line 251 of file CMPackWalkMC.h.

Referenced by getAngle(), getBinSize(), getHeight(), getHop(), getPeriod(), getSway(), getWP(), init(), loadBuffer(), resetLegPos(), saveBuffer(), setAngle(), setHeight(), setHop(), setPeriod(), setSway(), setTargetVelocity(), and updateOutputs().


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

Tekkotsu v5.1CVS
Generated Tue Jan 31 04:32:16 2012 by Doxygen 1.6.3