WalkPrimitive Class Reference
#include <walkprimitive.h>
List of all members.
Constructor & Destructor Documentation
A Class that encapsulates a walk TYPE.
The central member of this class is Steps. He is an array of several/many primitive_t structures. Each primitive_t contains all of the Steps for a single TYPE + VALUE (ie start, follow, normal, fstop and nstop steps) Each Step contains the frames (both position and hardness) for that Step.
We access Steps using [0] for WalkForward and WalkBackward, because there is only a single primitive_t [0] or [1] for WalkSideward where '0' will be Left and '1' will be right [(int) StepLeftDirectionToIndex * direction + StepsLeftDirectionToIndexOffset] for WalkArc and WalkTurn
- Parameters:
-
| steptype,the | type of primitive (eg. TYPE_FORWARD, TYPE_TURN etc) |
WalkPrimitive::~WalkPrimitive |
( |
|
) |
|
Member Function Documentation
Step * WalkPrimitive::getForwardStep |
( |
Step * |
previousstep, |
|
|
float |
direction, |
|
|
WalkPrimitive * |
forwardprimitives | |
|
) |
| | |
Returns a pointer to the forward step that should follow the previous step
- Parameters:
-
| previousstep,a | pointer to the step that has just completed |
| direction,for | WalkArc steps this is the desired arc radius in cm, for WalkForward steps this is ignored |
| forwardprimitives,a | pointer to the WalkPrimitive containing the WalkForward primitive_t |
void WalkPrimitive::getInitialPose |
( |
float ** |
positions, |
|
|
float ** |
hardnesses | |
|
) |
| | |
Updates positions and hardnesses to point to their 'default' values
Step * WalkPrimitive::getSideStep |
( |
Step * |
previousstep, |
|
|
float |
direction | |
|
) |
| | |
Step * WalkPrimitive::getStartGStep |
( |
float |
direction |
) |
|
Returns a pointer to the start gstep of THIS primitive
- Parameters:
-
| direction,a | positive value will produce g in the left direction and a negative value will produce g in the right direction |
Important: It is assumed that special gSteps are placed at the end of the Steps array. The second last one is left directed and the last one is right directed.
Step * WalkPrimitive::getStartStep |
( |
float |
direction |
) |
|
Returns a pointer to the start step in the specified direction
- Parameters:
-
| direction,the | direction to take the start step. |
For forwards and backwards the direction is ignored, because it has no meaning. For sideward steps only the sign of the direction is used. For a turn the direction is the desired turn angle in radians For an arc the direction is the desired arc radius in cm
Step * WalkPrimitive::getTurnStep |
( |
Step * |
previousstep, |
|
|
float |
direction | |
|
) |
| | |
Returns a pointer to the turn step that should follow the previous step
- Parameters:
-
| previousstep,a | pointer to the step that has just completed |
| direction,the | desired turn angle in radians |
Member Data Documentation
The documentation for this class was generated from the following files: