| 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 | |
| VelocityWalkMode | |
| x, y, a will be interpreted as mm/s | |
| DistanceWalkMode | |
| x, y, a will be interpreted as millimeters | |
| 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 |
| 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.
|
Tekkotsu v3.0 |
Generated Fri May 11 20:08:58 2007 by Doxygen 1.4.7 |