JWalk Class Reference
#include <jwalk.h>
List of all members.
Public Member Functions |
| JWalk (AL::ALPtr< AL::ALBroker > pBroker, const string &pName) |
virtual | ~JWalk () |
void | initWalk () |
bool | canUseHead () |
bool | usingDCM () |
bool | modeUsesDCM (JWalkModeEnum mode) |
int | setHeadYaw (float angle, int time) |
int | setHeadPitch (float angle, int time) |
void | setHeadStiffness (float values[]) |
bool | walkIsActive () |
void | waitUntilFinished () |
void | stop () |
void | emergencyStop () |
void | braceForImpact () |
void | getUp () |
int | doScript (script scripttorun, bool scripturgent) |
void | enableFallingControl () |
void | disableFallingControl () |
void | checkAndRepair () |
int | checkHealth () |
void | nuWalkOnBearing (float bearing, unsigned char speed, bool dodge=false) |
void | nuWalkToPoint (float distance, float bearing, bool dodge=false) |
void | nuWalkToPointWithOrientation (float distance, float bearing, float finalorientation, bool dodge=false) |
void | nuWalkToPointWithMaintainOrientation (float distance, float bearing, float desiredorientation, bool dodge=false) |
bool | nuWalkIsActive () |
void | nuWalkStop () |
void | gForward () |
void | gBackward () |
void | gArc (float direction) |
void | gLeft () |
void | gRight () |
void | gTurnLeft () |
void | gTurnRight () |
bool | gIsActive () |
void | gStop () |
void | alWalkStraight (float distance) |
void | alWalkArc (float angle, float radius) |
void | alWalkSideways (float distance) |
void | alWalkTurn (float angle) |
bool | alWalkIsActive () |
void | alWalkWaitUntilFinished () |
void | alWalkStop () |
int | getInCommonPose () |
bool | inCommonPose () |
bool | inBackwardBracePose () |
void | doPreviousWalkCall () |
string | version () |
bool | innerTest () |
Public Attributes |
Sensors *volatile | JWalkSensors |
Actuators *volatile | JWalkActuators |
NUWalk *volatile | nuWalk |
ALWalk *volatile | alWalk |
JWalkModeEnum | JWalkPreviousMode |
JWalkModeEnum | JWalkMode |
JWalkModeEnum | JWalkNextMode |
bool | JWalkWaitingForFinish |
JWalkFunctionIDEnum | JWalkFunctionID |
float | JWalkParam1 |
float | JWalkParam2 |
float | JWalkParam3 |
float * | JWalkCommonPositions |
float * | JWalkCommonHardnesses |
Constructor & Destructor Documentation
JWalk::JWalk |
( |
AL::ALPtr< AL::ALBroker > |
pBroker, |
|
|
const string & |
pName | |
|
) |
| | |
JWalk::~JWalk |
( |
|
) |
[virtual] |
Member Function Documentation
void JWalk::alWalkArc |
( |
float |
angle, |
|
|
float |
radius | |
|
) |
| | |
Walk along a arc of radius (cm) for an angle (radians)
- Parameters:
-
| angle | the angle of the arc (radians) |
| radius | the radius of the circle the arc is on (cm) |
Note. Nothing happens if the robot is already walking
bool JWalk::alWalkIsActive |
( |
|
) |
|
Returns true if there is an active alWalk task. Returns false otherwise
Note. false does not mean the robot is stationary; it may be jwalking And there is a delay between the issuing of a walk task, and 'walk being active'
void JWalk::alWalkSideways |
( |
float |
distance |
) |
|
Walk sideways 'distance' in centimetres
- Parameters:
-
| distance | the distance to walk in cm (left is positive) |
Note. Nothing happens if the robot is already walking
void JWalk::alWalkStop |
( |
|
) |
|
Safely stops the current walk as soon as possible (it will finish its current step, and then take a stopping step to bring the robot to rest)
This is not a blocking function, ie. when it returns the robot will still be walking
void JWalk::alWalkStraight |
( |
float |
distance |
) |
|
Walk straight (forwards or backwards) a distance in cm
- Parameters:
-
| distance | the distance to walk in cm (forwards is positive) |
Note. Nothing happens if the robot is already walking
void JWalk::alWalkTurn |
( |
float |
angle |
) |
|
Turn 'angle' radians on the spot
- Parameters:
-
| angle | the angle to turn in radians (left/anticlockwise is postive) |
Note. Nothing happens if the robot is already walking
void JWalk::alWalkWaitUntilFinished |
( |
|
) |
|
Blocks until along of the pending walk tasks have been completed. This could take some time if there are many steps in the queue
The implementation of this function isn't pretty; it will poll walkIsActive 20 times a second until it is false :(
void JWalk::braceForImpact |
( |
|
) |
|
bool JWalk::canUseHead |
( |
|
) |
|
Returns true if you are allowed to move the head, bad things happen if you move the head when this function returns false!
void JWalk::checkAndRepair |
( |
|
) |
|
int JWalk::checkHealth |
( |
|
) |
|
void JWalk::disableFallingControl |
( |
|
) |
|
void JWalk::doPreviousWalkCall |
( |
|
) |
|
int JWalk::doScript |
( |
script |
scripttorun, |
|
|
bool |
scripturgent | |
|
) |
| | |
void JWalk::emergencyStop |
( |
|
) |
|
void JWalk::enableFallingControl |
( |
|
) |
|
void JWalk::gArc |
( |
float |
direction |
) |
|
Walk along an arc in the specified direction until the another direction is called, or the walk is stopped (whether explicitly or implicitly)
void JWalk::gBackward |
( |
|
) |
|
Walk backward until another direction is called, or the walk is stopped (whether explicitly or implicitly)
int JWalk::getInCommonPose |
( |
|
) |
|
Walk forward until another direction is called, or the walk is stopped (whether explicitly or implicitly)
bool JWalk::gIsActive |
( |
|
) |
|
Returns true if there is an active gWalk task. Returns false otherwise
Walk left (sideways) until the another direction is called, or the walk is stopped (whether explicitly or implicitly)
Walk right (sideways) until the another direction is called, or the walk is stopped (whether explicitly or implicitly)
void JWalk::gTurnLeft |
( |
|
) |
|
Turn left (rotate anticlockwise) on the spot until another direction is called, or the walk is stopped (whether explicitly or implicitly)
This turn is significantly slower (ie the turn velocity is smaller ;)) than other turns.
void JWalk::gTurnRight |
( |
|
) |
|
Turn right (rotate clockwise) on the spot until another direction is called, or the walk is stopped (whether explicitly or implicitly)
This turn is significantly slower (ie the turn velocity is smaller ;)) than other turns.
bool JWalk::inBackwardBracePose |
( |
|
) |
|
bool JWalk::inCommonPose |
( |
|
) |
|
bool JWalk::innerTest |
( |
|
) |
|
Returns the true if the test succeeds, false if it fails This method is inherited from ALModule, and must be implemented
Returns true if the JWalkMode will use the DCM, returns false if is will use alMotion
bool JWalk::nuWalkIsActive |
( |
|
) |
|
void JWalk::nuWalkOnBearing |
( |
float |
bearing, |
|
|
unsigned char |
speed, |
|
|
bool |
dodge = false | |
|
) |
| | |
void JWalk::nuWalkStop |
( |
|
) |
|
void JWalk::nuWalkToPoint |
( |
float |
distance, |
|
|
float |
bearing, |
|
|
bool |
dodge = false | |
|
) |
| | |
void JWalk::nuWalkToPointWithMaintainOrientation |
( |
float |
distance, |
|
|
float |
bearing, |
|
|
float |
desiredorientation, |
|
|
bool |
dodge = false | |
|
) |
| | |
void JWalk::nuWalkToPointWithOrientation |
( |
float |
distance, |
|
|
float |
bearing, |
|
|
float |
finalorientation, |
|
|
bool |
dodge = false | |
|
) |
| | |
int JWalk::setHeadPitch |
( |
float |
angle, |
|
|
int |
time | |
|
) |
| | |
void JWalk::setHeadStiffness |
( |
float |
values[] |
) |
|
int JWalk::setHeadYaw |
( |
float |
angle, |
|
|
int |
time | |
|
) |
| | |
Brings the robot to rest as quickly as possible (regardless of which 'mode' of walk is active)
It's a non-blocking function so you will need to keep track (using walkIsActive()) of when the robot is actually stopped
Returns true if jwalk is using the alDCM, returns false if jwalk is using alMotion
string JWalk::version |
( |
|
) |
|
Returns the module's version This method is inherited from ALModule, and must be implemented
void JWalk::waitUntilFinished |
( |
|
) |
|
Blocks until the robot has stopped walking
The implementation of this function IS pretty; its event based so it won't use any CPU while waiting :). However, it will effectively put your thread to sleep for a some time
bool JWalk::walkIsActive |
( |
|
) |
|
Returns true if the robot is walking. Returns false otherwise.
Member Data Documentation
The documentation for this class was generated from the following files:
- /Users/jason/Code/naowalkoptimiser/src/Locomotion/Walk/jwalk.h
- /Users/jason/Code/naowalkoptimiser/src/Locomotion/Walk/jwalk.cpp