Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

UPennWalkMC Class Reference

Uses the UPennalizers' 2004 RoboCup code to compute walking gaits. More...

#include <UPennWalkMC.h>

Inheritance diagram for UPennWalkMC:

Detailed Description

Uses the UPennalizers' 2004 RoboCup code to compute walking gaits.

This class is ported from University of Pennsylvania's 2004 Robosoccer entry, and falls under their license: ========================================================================= 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. =========================================================================

Definition at line 20 of file UPennWalkMC.h.

List of all members.

Public Member Functions

 UPennWalkMC ()
 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 setTargetVelocity (float x, float y, float a)

Protected Member Functions

void SetLegJoints (double *x)
void SetStanceParameters (double bodyTilt, double shoulderHeight, double foreX0, double foreY0, double hindX0, double hindY0)
void SetWalkSpeeds (int quarterPeriod, double maxDistance, double foreLiftInitial, double foreLiftFinal, double hindLiftInitial, double hindLiftFinal)
void SetWalkWorkspace (double foreXMin, double foreXMax, double foreYMin, double foreYMax, double hindXMin, double hindXMax, double hindYMin, double hindYMax)
void LegPositionsToAngles (double *a)
 Calculate 12 leg joint angles from leg positions.
void StandLegs (double x=0, double y=0, double z=0)
int GetWalkPhase ()
void SetWalkPhase (int phase)
void WalkLegs (double xWalk=0.0, double yWalk=0.0, double aWalk=0.0)

Static Protected Member Functions

static double clip (double x, double min=-1.0, double max=1.0)

Protected Attributes

float xVel
float yVel
float aVel
double body_tilt
double shoulder_height
double fore_x0
double fore_y0
double hind_x0
double hind_y0
int walk_phase
int walk_phase_direction
int walk_quarter_period
double walk_max_distance
double walk_fore_lift_initial
double walk_fore_lift_final
double walk_hind_lift_initial
double walk_hind_lift_final
double walk_current_x [NumLegs]
double walk_current_y [NumLegs]
double walk_fore_xmin
double walk_fore_xmax
double walk_fore_ymin
double walk_fore_ymax
double walk_hind_xmin
double walk_hind_xmax
double walk_hind_ymin
double walk_hind_ymax

Constructor & Destructor Documentation

UPennWalkMC::UPennWalkMC (  ) 

constructor

Definition at line 138 of file UPennWalkMC.cc.


Member Function Documentation

static double UPennWalkMC::clip ( double  x,
double  min = -1.0,
double  max = 1.0 
) [static, protected]

Definition at line 41 of file UPennWalkMC.h.

Referenced by LegPositionsToAngles(), and WalkLegs().

int UPennWalkMC::GetWalkPhase (  )  [protected]

Definition at line 378 of file UPennWalkMC.cc.

virtual int UPennWalkMC::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 34 of file UPennWalkMC.h.

virtual int UPennWalkMC::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 33 of file UPennWalkMC.h.

void UPennWalkMC::LegPositionsToAngles ( double *  a  )  [protected]

Calculate 12 leg joint angles from leg positions.

Note positions are relative to stance parameters so all zero inputs -> stance angles

Definition at line 225 of file UPennWalkMC.cc.

Referenced by StandLegs(), and WalkLegs().

void UPennWalkMC::SetLegJoints ( double *  x  )  [protected]

Definition at line 161 of file UPennWalkMC.cc.

Referenced by StandLegs(), and WalkLegs().

void UPennWalkMC::SetStanceParameters ( double  bodyTilt,
double  shoulderHeight,
double  foreX0,
double  foreY0,
double  hindX0,
double  hindY0 
) [protected]

Definition at line 182 of file UPennWalkMC.cc.

void UPennWalkMC::setTargetVelocity ( float  x,
float  y,
float  a 
)

Definition at line 36 of file UPennWalkMC.h.

void UPennWalkMC::SetWalkPhase ( int  phase  )  [protected]

Definition at line 383 of file UPennWalkMC.cc.

void UPennWalkMC::SetWalkSpeeds ( int  quarterPeriod,
double  maxDistance,
double  foreLiftInitial,
double  foreLiftFinal,
double  hindLiftInitial,
double  hindLiftFinal 
) [protected]

Definition at line 194 of file UPennWalkMC.cc.

void UPennWalkMC::SetWalkWorkspace ( double  foreXMin,
double  foreXMax,
double  foreYMin,
double  foreYMax,
double  hindXMin,
double  hindXMax,
double  hindYMin,
double  hindYMax 
) [protected]

Definition at line 206 of file UPennWalkMC.cc.

void UPennWalkMC::StandLegs ( double  x = 0,
double  y = 0,
double  z = 0 
) [protected]

Definition at line 333 of file UPennWalkMC.cc.

virtual int UPennWalkMC::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 25 of file UPennWalkMC.h.

void UPennWalkMC::WalkLegs ( double  xWalk = 0.0,
double  yWalk = 0.0,
double  aWalk = 0.0 
) [protected]

Definition at line 389 of file UPennWalkMC.cc.

Referenced by updateOutputs().


Member Data Documentation

float UPennWalkMC::aVel [protected]

Definition at line 76 of file UPennWalkMC.h.

Referenced by setTargetVelocity(), and updateOutputs().

double UPennWalkMC::body_tilt [protected]

Definition at line 78 of file UPennWalkMC.h.

Referenced by LegPositionsToAngles(), SetStanceParameters(), and WalkLegs().

double UPennWalkMC::fore_x0 [protected]

Definition at line 79 of file UPennWalkMC.h.

Referenced by LegPositionsToAngles(), SetStanceParameters(), StandLegs(), and WalkLegs().

double UPennWalkMC::fore_y0 [protected]

Definition at line 79 of file UPennWalkMC.h.

Referenced by LegPositionsToAngles(), SetStanceParameters(), StandLegs(), and WalkLegs().

double UPennWalkMC::hind_x0 [protected]

Definition at line 80 of file UPennWalkMC.h.

Referenced by LegPositionsToAngles(), SetStanceParameters(), StandLegs(), and WalkLegs().

double UPennWalkMC::hind_y0 [protected]

Definition at line 80 of file UPennWalkMC.h.

Referenced by LegPositionsToAngles(), SetStanceParameters(), StandLegs(), and WalkLegs().

double UPennWalkMC::shoulder_height [protected]

Definition at line 78 of file UPennWalkMC.h.

Referenced by LegPositionsToAngles(), and SetStanceParameters().

double UPennWalkMC::walk_current_x[NumLegs] [protected]

Definition at line 86 of file UPennWalkMC.h.

Referenced by StandLegs(), UPennWalkMC(), and WalkLegs().

double UPennWalkMC::walk_current_y[NumLegs] [protected]

Definition at line 86 of file UPennWalkMC.h.

Referenced by StandLegs(), UPennWalkMC(), and WalkLegs().

Definition at line 84 of file UPennWalkMC.h.

Referenced by SetWalkSpeeds(), and WalkLegs().

Definition at line 84 of file UPennWalkMC.h.

Referenced by SetWalkSpeeds(), and WalkLegs().

double UPennWalkMC::walk_fore_xmax [protected]

Definition at line 87 of file UPennWalkMC.h.

Referenced by SetWalkWorkspace(), and WalkLegs().

double UPennWalkMC::walk_fore_xmin [protected]

Definition at line 87 of file UPennWalkMC.h.

Referenced by SetWalkWorkspace(), and WalkLegs().

double UPennWalkMC::walk_fore_ymax [protected]

Definition at line 87 of file UPennWalkMC.h.

Referenced by SetWalkWorkspace(), and WalkLegs().

double UPennWalkMC::walk_fore_ymin [protected]

Definition at line 87 of file UPennWalkMC.h.

Referenced by SetWalkWorkspace(), and WalkLegs().

Definition at line 85 of file UPennWalkMC.h.

Referenced by SetWalkSpeeds(), and WalkLegs().

Definition at line 85 of file UPennWalkMC.h.

Referenced by SetWalkSpeeds(), and WalkLegs().

double UPennWalkMC::walk_hind_xmax [protected]

Definition at line 88 of file UPennWalkMC.h.

Referenced by SetWalkWorkspace(), and WalkLegs().

double UPennWalkMC::walk_hind_xmin [protected]

Definition at line 88 of file UPennWalkMC.h.

Referenced by SetWalkWorkspace(), and WalkLegs().

double UPennWalkMC::walk_hind_ymax [protected]

Definition at line 88 of file UPennWalkMC.h.

Referenced by SetWalkWorkspace(), and WalkLegs().

double UPennWalkMC::walk_hind_ymin [protected]

Definition at line 88 of file UPennWalkMC.h.

Referenced by SetWalkWorkspace(), and WalkLegs().

double UPennWalkMC::walk_max_distance [protected]

Definition at line 83 of file UPennWalkMC.h.

Referenced by SetWalkSpeeds(), and WalkLegs().

int UPennWalkMC::walk_phase [protected]

Definition at line 82 of file UPennWalkMC.h.

Referenced by GetWalkPhase(), SetWalkPhase(), and WalkLegs().

Definition at line 82 of file UPennWalkMC.h.

Referenced by WalkLegs().

Definition at line 82 of file UPennWalkMC.h.

Referenced by SetWalkSpeeds(), and WalkLegs().

float UPennWalkMC::xVel [protected]

Definition at line 74 of file UPennWalkMC.h.

Referenced by setTargetVelocity(), and updateOutputs().

float UPennWalkMC::yVel [protected]

Definition at line 75 of file UPennWalkMC.h.

Referenced by setTargetVelocity(), and updateOutputs().


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

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