Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
WalkEngineNode< W, mcName, mcDesc > Class Template Reference#include <WalkNode.h>
Inheritance diagram for WalkEngineNode< W, mcName, mcDesc >:
![]() Detailed Descriptiontemplate<typename W, const char * mcName = defWalkNodeName, const char * mcDesc = defWalkNodeDesc>
A StateNode for walking in a direction, use the template parameter to specify a custom walk MC, or use the WalkNode typedef to accept the "default" walk.
|
Public Types | |
enum | WalkMode_t { VelocityWalkMode, DistanceWalkMode } |
lets us interpret values as either distances or velocities More... | |
Public Member Functions | |
WalkEngineNode () | |
constructor | |
WalkEngineNode (float xvel, float yvel, float avel) | |
constructor, positive yvel is counter-clockwise from above (to match coordinate system), assumes velocity | |
WalkEngineNode (float xdist, float ydist, float adist, int steps) | |
constructor, positive yvel is counter-clockwise from above (to match coordinate system), assumes distance | |
WalkEngineNode (const std::string &name, float xvel, float yvel, float avel) | |
constructor, positive yvel is counter-clockwise from above (to match coordinate system), assumes velocity | |
WalkEngineNode (const std::string &name, float xdist, float ydist, float adist, int steps) | |
constructor, positive yvel is counter-clockwise from above (to match coordinate system), assumes distance | |
~WalkEngineNode () | |
destructor | |
void | setDisplacement (float xdist, float ydist, float adist, int steps=-1) |
sets the velocity of the walk | |
void | setVelocity (float xvel, float yvel, float avel, int np=-1) |
sets the velocity of the walk | |
void | setXVelocity (float xvel) |
sets the velocity in x direction (positive is forward) | |
float | getX () |
returns the velocity in x direction (positive is forward) | |
void | setYVelocity (float yvel) |
sets the velocity in y direction (positive is left) | |
float | getY () |
returns the velocity in y direction (positive is left) | |
void | setAVelocity (float avel) |
sets the velocity of the turn, positive is counter-clockwise from above (to match coordinate system) | |
float | getA () |
returns the velocity of the turn (positive is counter-clockwise from above (to match coordinate system)) | |
int | getSteps () |
returns the number of steps being taken (not necessarily the number *remaining*) | |
virtual void | DoStart () |
Adds the motion command to the motion manager, add a listener for the motion's completion event. | |
Protected Member Functions | |
WalkEngineNode (const std::string &className, const std::string &instanceName, float xvel, float yvel, float avel) | |
constructor, positive yvel is counter-clockwise from above (to match coordinate system), assumes velocity | |
WalkEngineNode (const std::string &className, const std::string &instanceName, float xdist, float ydist, float adist, int steps) | |
constructor, positive yvel is counter-clockwise from above (to match coordinate system), assumes distance | |
void | storeValues (float xp, float yp, float ap, int np, WalkMode_t wmode) |
stores the values and if active, calls updateWMC() | |
void | updateWMC () |
makes the appropriate calls on the WalkMC | |
Protected Attributes | |
float | x |
velocity in x direction (positive is forward), or distance if walkMode is DistanceWalkMode | |
float | y |
velocity in y direction (positive is dog's left), or distance if walkMode is DistanceWalkMode | |
float | a |
velocity of the turn, positive is counter-clockwise from above (to match coordinate system), or distance if walkMode is DistanceWalkMode | |
int | n |
number of steps (-1 means walk forever) | |
WalkMode_t | walkMode |
the current interpretation of x, y, and a |
enum WalkEngineNode::WalkMode_t |
WalkEngineNode< W, mcName, mcDesc >::WalkEngineNode | ( | ) | [inline] |
WalkEngineNode< W, mcName, mcDesc >::WalkEngineNode | ( | float | xvel, | |
float | yvel, | |||
float | avel | |||
) | [inline] |
constructor, positive yvel is counter-clockwise from above (to match coordinate system), assumes velocity
Definition at line 36 of file WalkNode.h.
WalkEngineNode< W, mcName, mcDesc >::WalkEngineNode | ( | float | xdist, | |
float | ydist, | |||
float | adist, | |||
int | steps | |||
) | [inline] |
constructor, positive yvel is counter-clockwise from above (to match coordinate system), assumes distance
Definition at line 41 of file WalkNode.h.
WalkEngineNode< W, mcName, mcDesc >::WalkEngineNode | ( | const std::string & | name, | |
float | xvel, | |||
float | yvel, | |||
float | avel | |||
) | [inline] |
constructor, positive yvel is counter-clockwise from above (to match coordinate system), assumes velocity
Definition at line 46 of file WalkNode.h.
WalkEngineNode< W, mcName, mcDesc >::WalkEngineNode | ( | const std::string & | name, | |
float | xdist, | |||
float | ydist, | |||
float | adist, | |||
int | steps | |||
) | [inline] |
constructor, positive yvel is counter-clockwise from above (to match coordinate system), assumes distance
Definition at line 51 of file WalkNode.h.
WalkEngineNode< W, mcName, mcDesc >::~WalkEngineNode | ( | ) | [inline] |
WalkEngineNode< W, mcName, mcDesc >::WalkEngineNode | ( | const std::string & | className, | |
const std::string & | instanceName, | |||
float | xvel, | |||
float | yvel, | |||
float | avel | |||
) | [inline, protected] |
constructor, positive yvel is counter-clockwise from above (to match coordinate system), assumes velocity
Definition at line 104 of file WalkNode.h.
WalkEngineNode< W, mcName, mcDesc >::WalkEngineNode | ( | const std::string & | className, | |
const std::string & | instanceName, | |||
float | xdist, | |||
float | ydist, | |||
float | adist, | |||
int | steps | |||
) | [inline, protected] |
constructor, positive yvel is counter-clockwise from above (to match coordinate system), assumes distance
Definition at line 109 of file WalkNode.h.
void WalkEngineNode< W, mcName, mcDesc >::setDisplacement | ( | float | xdist, | |
float | ydist, | |||
float | adist, | |||
int | steps = -1 | |||
) | [inline] |
sets the velocity of the walk
xdist | x displacement (mm, positive is forward) | |
ydist | y displacement (mm, positive is left) | |
adist | angular displacement (rad, positive is counter-clockwise) | |
steps | how many steps to take to achieve displacement (velocity depends on walk's cycle time parameter) |
Definition at line 63 of file WalkNode.h.
void WalkEngineNode< W, mcName, mcDesc >::setVelocity | ( | float | xvel, | |
float | yvel, | |||
float | avel, | |||
int | np = -1 | |||
) | [inline] |
sets the velocity of the walk
xvel | x velocity (mm/s, positive is forward) | |
yvel | y velocity (mm/s, positive is left) | |
avel | angular velocity (rad/s, positive is counter-clockwise) | |
np | how many steps to take at specified velocity (resulting distance depends on walk's cycle time parameter) |
Definition at line 72 of file WalkNode.h.
void WalkEngineNode< W, mcName, mcDesc >::setXVelocity | ( | float | xvel | ) | [inline] |
float WalkEngineNode< W, mcName, mcDesc >::getX | ( | ) | [inline] |
void WalkEngineNode< W, mcName, mcDesc >::setYVelocity | ( | float | yvel | ) | [inline] |
float WalkEngineNode< W, mcName, mcDesc >::getY | ( | ) | [inline] |
void WalkEngineNode< W, mcName, mcDesc >::setAVelocity | ( | float | avel | ) | [inline] |
sets the velocity of the turn, positive is counter-clockwise from above (to match coordinate system)
Definition at line 89 of file WalkNode.h.
float WalkEngineNode< W, mcName, mcDesc >::getA | ( | ) | [inline] |
returns the velocity of the turn (positive is counter-clockwise from above (to match coordinate system))
Definition at line 92 of file WalkNode.h.
int WalkEngineNode< W, mcName, mcDesc >::getSteps | ( | ) | [inline] |
returns the number of steps being taken (not necessarily the number *remaining*)
Definition at line 95 of file WalkNode.h.
virtual void WalkEngineNode< W, mcName, mcDesc >::DoStart | ( | ) | [inline, virtual] |
Adds the motion command to the motion manager, add a listener for the motion's completion event.
Reimplemented from MCNodeBase.
Definition at line 97 of file WalkNode.h.
void WalkEngineNode< W, mcName, mcDesc >::storeValues | ( | float | xp, | |
float | yp, | |||
float | ap, | |||
int | np, | |||
WalkMode_t | wmode | |||
) | [inline, protected] |
stores the values and if active, calls updateWMC()
Definition at line 114 of file WalkNode.h.
Referenced by WalkEngineNode< W, mcName, mcDesc >::setAVelocity(), WalkEngineNode< W, mcName, mcDesc >::setDisplacement(), WalkEngineNode< W, mcName, mcDesc >::setVelocity(), WalkEngineNode< W, mcName, mcDesc >::setXVelocity(), and WalkEngineNode< W, mcName, mcDesc >::setYVelocity().
void WalkEngineNode< W, mcName, mcDesc >::updateWMC | ( | ) | [inline, protected] |
makes the appropriate calls on the WalkMC
Definition at line 126 of file WalkNode.h.
Referenced by WalkEngineNode< W, mcName, mcDesc >::DoStart(), and WalkEngineNode< W, mcName, mcDesc >::storeValues().
float WalkEngineNode< W, mcName, mcDesc >::x [protected] |
velocity in x direction (positive is forward), or distance if walkMode is DistanceWalkMode
Definition at line 141 of file WalkNode.h.
Referenced by WalkEngineNode< W, mcName, mcDesc >::getX(), WalkEngineNode< W, mcName, mcDesc >::setAVelocity(), WalkEngineNode< W, mcName, mcDesc >::setXVelocity(), WalkEngineNode< W, mcName, mcDesc >::setYVelocity(), WalkEngineNode< W, mcName, mcDesc >::storeValues(), and WalkEngineNode< W, mcName, mcDesc >::updateWMC().
float WalkEngineNode< W, mcName, mcDesc >::y [protected] |
velocity in y direction (positive is dog's left), or distance if walkMode is DistanceWalkMode
Definition at line 142 of file WalkNode.h.
Referenced by WalkEngineNode< W, mcName, mcDesc >::getY(), WalkEngineNode< W, mcName, mcDesc >::setAVelocity(), WalkEngineNode< W, mcName, mcDesc >::setXVelocity(), WalkEngineNode< W, mcName, mcDesc >::setYVelocity(), WalkEngineNode< W, mcName, mcDesc >::storeValues(), and WalkEngineNode< W, mcName, mcDesc >::updateWMC().
float WalkEngineNode< W, mcName, mcDesc >::a [protected] |
velocity of the turn, positive is counter-clockwise from above (to match coordinate system), or distance if walkMode is DistanceWalkMode
Definition at line 143 of file WalkNode.h.
Referenced by WalkEngineNode< W, mcName, mcDesc >::getA(), WalkEngineNode< W, mcName, mcDesc >::setAVelocity(), WalkEngineNode< W, mcName, mcDesc >::setXVelocity(), WalkEngineNode< W, mcName, mcDesc >::setYVelocity(), WalkEngineNode< W, mcName, mcDesc >::storeValues(), and WalkEngineNode< W, mcName, mcDesc >::updateWMC().
int WalkEngineNode< W, mcName, mcDesc >::n [protected] |
number of steps (-1 means walk forever)
Definition at line 144 of file WalkNode.h.
Referenced by WalkEngineNode< W, mcName, mcDesc >::getSteps(), WalkEngineNode< W, mcName, mcDesc >::setAVelocity(), WalkEngineNode< W, mcName, mcDesc >::setXVelocity(), WalkEngineNode< W, mcName, mcDesc >::setYVelocity(), WalkEngineNode< W, mcName, mcDesc >::storeValues(), and WalkEngineNode< W, mcName, mcDesc >::updateWMC().
WalkMode_t WalkEngineNode< W, mcName, mcDesc >::walkMode [protected] |
the current interpretation of x, y, and a
Definition at line 145 of file WalkNode.h.
Referenced by WalkEngineNode< W, mcName, mcDesc >::storeValues(), and WalkEngineNode< W, mcName, mcDesc >::updateWMC().
Tekkotsu v4.0 |
Generated Thu Nov 22 00:58:47 2007 by Doxygen 1.5.4 |