#include <ArActionStallRecover.h>
Inheritance diagram for ArActionStallRecover:

Public Member Functions | |
| void | addToConfig (ArConfig *config, const char *sectionName, int priority=ArPriority::NORMAL) |
| ArActionStallRecover (const char *name="stall recover", double obstacleDistance=225, int cyclesToMove=50, double speed=150, double degreesToTurn=45) | |
| Constructor. | |
| virtual ArActionDesired * | fire (ArActionDesired currentDesired) |
| Fires the action, returning what the action wants to do. | |
| virtual ArActionDesired * | getDesired (void) |
| Gets what this action wants to do (for display purposes). | |
| virtual | ~ArActionStallRecover () |
| Destructor. | |
Protected Types | |
| enum | State { STATE_NOTHING = 0, STATE_GOING } |
| enum | What { BACK = 0x1, FORWARD = 0x2, TURN = 0x4, TURN_LEFT = 0x8, TURN_RIGHT = 0x10, MOVEMASK = BACK | FORWARD, TURNMASK = TURN | TURN_LEFT | TURN_RIGHT } |
Protected Member Functions | |
| void | addSequence (int sequence) |
| void | doit (void) |
Protected Attributes | |
| ArActionDesired | myActionDesired |
| int | myCount |
| int | myCyclesToMove |
| int | myCyclesToTurn |
| double | myDegreesToTurn |
| double | myDesiredHeading |
| int | myDoing |
| time_t | myLastFired |
| double | myObstacleDistance |
| ArResolver * | myResolver |
| std::map< int, int > | mySequence |
| int | mySequenceNum |
| int | mySequencePos |
| int | mySideStalled |
| double | mySpeed |
| int | myState |
This action tries to recover if one of the wheels has stalled, it has a series of actions it tries in order to get out of the stall.
Definition at line 40 of file ArActionStallRecover.h.
|
||||||||||||||||||||||||
|
Constructor.
Definition at line 43 of file ArActionStallRecover.cpp. References ArAction::setNextArgument(). |
|
|
Fires the action, returning what the action wants to do.
Implements ArAction. Definition at line 94 of file ArActionStallRecover.cpp. References ArActionDesired::getDeltaHeadingStrength(), ArActionDesired::getVelStrength(), ArRobot::isLeftMotorStalled(), ArRobot::isRightMotorStalled(), ArActionDesired::reset(), ArActionDesired::setDeltaHeading(), and ArActionDesired::setVel(). |
1.4.0