Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

ArActionStallRecover Class Reference

Action to recover from a stall. More...

#include <ArActionStallRecover.h>

Inheritance diagram for ArActionStallRecover:

ArAction List of all members.

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 ArActionDesiredfire (ArActionDesired currentDesired)
 Fires the action, returning what the action wants to do.
virtual ArActionDesiredgetDesired (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
ArResolvermyResolver
std::map< int, int > mySequence
int mySequenceNum
int mySequencePos
int mySideStalled
double mySpeed
int myState

Detailed Description

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.

Definition at line 40 of file ArActionStallRecover.h.


Constructor & Destructor Documentation

AREXPORT ArActionStallRecover::ArActionStallRecover const char *  name = "stall recover",
double  obstacleDistance = 225,
int  cyclesToMove = 50,
double  speed = 150,
double  degreesToTurn = 45
 

Constructor.

Parameters:
name name of the action
obstacleDistance distance at which not to move because of obstacle. (mm)
cyclesToMove number of cycles to move (# of cycles)
speed speed at which to back up or go forward (mm/sec)
degreesToTurn number of degrees to turn (deg)

Definition at line 43 of file ArActionStallRecover.cpp.

References ArAction::setNextArgument().


Member Function Documentation

AREXPORT ArActionDesired * ArActionStallRecover::fire ArActionDesired  currentDesired  )  [virtual]
 

Fires the action, returning what the action wants to do.

Parameters:
currentDesired this is what the current resolver has for its desired, this is SOLELY for the purpose of giving information to the action
Returns:
pointer to what this action wants to do, NULL if it wants to do nothing

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().


The documentation for this class was generated from the following files:
Generated on Wed Oct 19 12:56:42 2005 for Aria by  doxygen 1.4.0