WalkNode Class Reference
A StateNode for walking using WalkMC.
More...
#include <WalkNode.h>
Detailed Description
A StateNode for walking using WalkMC.
The WalkNode can handle either velocities or displacements.
To specify a velocity with no end, use the 3-tuple constructor:
To specify a velocity for a specific amount of time, which will then trigger a completion event:
(You could also use the "endless" velocity constructor with a TimeOutTrans)
To have WalkNode interpret the (x,y,a) as a distance to travel instead of velocity, pass false at the end instead:
The time will be subject to speed limits of the underlying WalkMC, so it may take more time to complete. In particular, this means you can simply pass time=0 for a displacement and this will be extended to the maximum speed:
Definition at line 89 of file WalkNode.h.
List of all members.
Public Types |
enum | Mode_t { DISP = 0,
VEL = 1
} |
Public Member Functions |
| WalkNode () |
| constructor
|
| WalkNode (const std::string &name, const std::string filename="") |
| constructor
|
| WalkNode (float xvel, float yvel, float avel, const std::string filename="") |
| constructor: velocities in mm/sec and radians/sec
|
| WalkNode (const std::string &name, float xvel, float yvel, float avel, const std::string filename="") |
| constructor: velocities in mm/sec and radians/sec
|
| WalkNode (float x, float y, float a, float time, Mode_t velocityMode, const std::string filename="") |
| constructor: displacements in mm and radians, time parameter in seconds but will be extended to fit within max speed
|
| WalkNode (const std::string &name, float x, float y, float a, float time, Mode_t velocityMode, const std::string filename="") |
| constructor: pass displacement as velocity or distance and time, isVelocity controls interpretation of x, y, and a
|
void | setDisplacement (float xdist, float ydist, float adist, float time=0) |
| sets the velocity of the walk
|
void | setVelocity (float xvel, float yvel, float avel) |
| sets the velocity of the walk
|
void | setVelocity (float xvel, float yvel, float avel, float time) |
| sets the velocity of the walk
|
virtual void | stop () |
| Removes the motion command from the motion manager if it was our own creation.
|
Protected Member Functions |
virtual void | preStart () |
| Adds the motion command to the motion manager, but stops it from running until the user has a chance to program it.
|
virtual void | postStart () |
| Adds a listener and then starts the motion command.
|
Protected Attributes |
WalkRequest | req |
| stores settings from constructor or a signal transition
|
Member Enumeration Documentation
- Enumerator:
DISP |
use with constructors to indicate displacement mode
|
VEL |
use with constructors to indicate velocity mode
|
Definition at line 91 of file WalkNode.h.
Constructor & Destructor Documentation
WalkNode::WalkNode |
( |
const std::string & |
name, |
|
|
const std::string |
filename = "" | |
|
) |
| | |
WalkNode::WalkNode |
( |
float |
xvel, |
|
|
float |
yvel, |
|
|
float |
avel, |
|
|
const std::string |
filename = "" | |
|
) |
| | |
constructor: velocities in mm/sec and radians/sec
Definition at line 104 of file WalkNode.h.
WalkNode::WalkNode |
( |
const std::string & |
name, |
|
|
float |
xvel, |
|
|
float |
yvel, |
|
|
float |
avel, |
|
|
const std::string |
filename = "" | |
|
) |
| | |
constructor: velocities in mm/sec and radians/sec
Definition at line 108 of file WalkNode.h.
constructor: displacements in mm and radians, time parameter in seconds but will be extended to fit within max speed
- Parameters:
-
| x | if velocityMode is VEL, the speed (mm/s) to move forward, else the distance (mm) |
| y | if velocityMode is VEL, the speed (mm/s) to move to the left, else the distance (mm) |
| a | if velocityMode is VEL, the speed (radians/s) to rotate to the left, else the distance (radians) |
| time | the duration of the walk (seconds), if isVelocity is false the velocity will still be subject to the walk's calculated limits, so just pass 0 for max speed |
| velocityMode | controls interpretation of x, y, and a |
| filename | loads a parameter file to control walk gait |
Definition at line 118 of file WalkNode.h.
WalkNode::WalkNode |
( |
const std::string & |
name, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float |
a, |
|
|
float |
time, |
|
|
Mode_t |
velocityMode, |
|
|
const std::string |
filename = "" | |
|
) |
| | |
constructor: pass displacement as velocity or distance and time, isVelocity controls interpretation of x, y, and a
- Parameters:
-
| name | an instance name for the node (mostly useful for debugging) |
| x | if velocityMode is VEL, the speed (mm/s) to move forward, else the distance (mm) |
| y | if velocityMode is VEL, the speed (mm/s) to move to the left, else the distance (mm) |
| a | if velocityMode is VEL, the speed (radians/s) to rotate to the left, else the distance (radians) |
| time | the duration of the walk (seconds), if velocityMode is DISP the velocity will still be subject to the walk's calculated limits, so just pass 0 for max speed |
| velocityMode | controls interpretation of x, y, and a |
| filename | loads a parameter file to control walk gait |
Definition at line 129 of file WalkNode.h.
Member Function Documentation
virtual void WalkNode::postStart |
( |
|
) |
[protected, virtual] |
virtual void WalkNode::preStart |
( |
|
) |
[protected, virtual] |
sets the velocity of the walk
- Parameters:
-
| xdist | x displacement (mm, positive is forward) |
| ydist | y displacement (mm, positive is left) |
| adist | angular displacement (rad, positive is counter-clockwise) |
| time | how many seconds to take to achieve displacement (limited to walk's max speed, so time=0 implies max speed) |
sets the velocity of the walk
- Parameters:
-
| 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) |
| time | is seconds until stopping and posting completion |
sets the velocity of the walk
- Parameters:
-
| 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) |
virtual void WalkNode::stop |
( |
|
) |
[virtual] |
Removes the motion command from the motion manager if it was our own creation.
Reimplemented from MCNodeBase.
Member Data Documentation
The documentation for this class was generated from the following file:
|