Aria
2.8.0
|
Action to recover from a stall. More...
#include <ArActionStallRecover.h>
Inherits ArAction.
Public Member Functions | |
virtual void | activate (void) |
void | addToConfig (ArConfig *config, const char *sectionName, ArPriority::Priority priority=ArPriority::NORMAL) |
ArActionStallRecover (const char *name="stall recover", double obstacleDistance=225, int cyclesToMove=50, double speed=150, double degreesToTurn=45, bool enabled=true) | |
Constructor. More... | |
virtual ArActionDesired * | fire (ArActionDesired currentDesired) |
virtual ArActionDesired * | getDesired (void) |
virtual const ArActionDesired * | getDesired (void) const |
virtual | ~ArActionStallRecover () |
Destructor. | |
Public Member Functions inherited from ArAction | |
ArAction (const char *name, const char *description="") | |
Constructor. | |
virtual void | deactivate (void) |
Deactivate the action. | |
virtual const ArArg * | getArg (int number) const |
Gets the numbered argument. More... | |
virtual ArArg * | getArg (int number) |
Gets the numbered argument. | |
virtual const char * | getDescription (void) const |
Gets the long description of the action. | |
virtual const char * | getName (void) const |
Gets the name of the action. | |
virtual int | getNumArgs (void) const |
Find the number of arguments this action takes. | |
ArRobot * | getRobot () const |
Get the robot we are controlling, which was set by setRobot() | |
virtual bool | isActive (void) const |
Returns whether the action is active or not. | |
virtual void | log (bool verbose=true) const |
Log information about this action using ArLog. | |
virtual void | setRobot (ArRobot *robot) |
Sets the robot this action is driving. More... | |
virtual | ~ArAction () |
Desructor. | |
Protected Member Functions | |
void | addSequence (int sequence) |
void | doit (void) |
Protected Member Functions inherited from ArAction | |
void | setNextArgument (ArArg const &arg) |
Sets the argument type for the next argument (must only be used in a constructor!) | |
Protected Attributes | |
ArActionDesired | myActionDesired |
int | myCount |
int | myCyclesToMove |
int | myCyclesToTurn |
double | myDegreesToTurn |
double | myDesiredHeading |
int | myDoing |
bool | myEnabled |
time_t | myLastFired |
double | myObstacleDistance |
ArResolver * | myResolver |
std::map< int, int > | mySequence |
int | mySequenceNum |
int | mySequencePos |
int | mySideStalled |
double | mySpeed |
int | myState |
Protected Attributes inherited from ArAction | |
std::map< int, ArArg > | myArgumentMap |
std::string | myDescription |
bool | myIsActive |
std::string | myName |
int | myNumArgs |
ArRobot * | myRobot |
The robot we are controlling, set by the action resolver using setRobot() | |
Additional Inherited Members | |
Static Public Member Functions inherited from ArAction | |
static bool | getDefaultActivationState (void) |
Gets the default activation state for all ArActions. | |
static void | setDefaultActivationState (bool defaultActivationState) |
Sets the default activation state for all ArActions. | |
Static Protected Attributes inherited from ArAction | |
static bool | ourDefaultActivationState = true |
Action to recover from a stall.
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.
ArActionStallRecover::ArActionStallRecover | ( | const char * | name = "stall recover" , |
double | obstacleDistance = 225 , |
||
int | cyclesToMove = 50 , |
||
double | speed = 150 , |
||
double | degreesToTurn = 45 , |
||
bool | enabled = true |
||
) |
Constructor.
name | name of the action |
obstacleDistance | distance at which not to move because of obstacle. (mm) |
cyclesToMove | default number of cycles to move (# of cycles) (may be changed via ArConfig) |
speed | default speed at which to back up or go forward (mm/sec) (may be changed via ArConfig) |
degreesToTurn | default number of degrees to turn (deg) (may be changed vi ArConfig) |
enabled | default value of "enabled" state configuration parameter (may be changed via ArConfig) |