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

ArActionIRs Class Reference

Action to deal with if the IRs trigger. More...

#include <ArActionIRs.h>

Inheritance diagram for ArActionIRs:

ArAction List of all members.

Public Member Functions

 ArActionIRs (const char *name="IRs", double backOffSpeed=100, int backOffTime=5000, int turnTime=3000, bool setMaximums=false)
 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 void setRobot (ArRobot *robot)
 Sets the robot this action is driving.
virtual ~ArActionIRs ()
 Destructor.

Protected Attributes

std::vector< int > cycleCounters
double myBackOffSpeed
int myBackOffTime
ArActionDesired myDesired
bool myFiring
double myHeading
ArRobotParams myParams
bool mySetMaximums
double mySpeed
ArTime myStartBack
int myStopTime
int myTurnTime
ArTime stoppedSince

Detailed Description

Action to deal with if the IRs trigger.

This class basically responds to the IRs that the robot has (if it has IRs at all). It assumes that the IRs will only be triggered if the robot is going forwards.

Definition at line 40 of file ArActionIRs.h.


Constructor & Destructor Documentation

ArActionIRs::ArActionIRs const char *  name = "IRs",
double  backOffSpeed = 100,
int  backOffTime = 5000,
int  turnTime = 3000,
bool  setMaximums = false
 

Constructor.

Parameters:
name name of the action
backOffSpeed speed at which to back away (mm/sec)
backOffTime number of msec to back up for (msec)
turnTime number of msec to alow for turn (msec)

Definition at line 39 of file ArActionIRs.cpp.

References ArAction::setNextArgument().


Member Function Documentation

ArActionDesired * ArActionIRs::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 84 of file ArActionIRs.cpp.

References ArMath::addAngle(), ArRobot::comInt(), ArMath::fabs(), ArPose::findAngleTo(), ArRobot::getDigIn(), ArRobot::getIODigIn(), ArRobot::getIODigInSize(), ArRobotParams::getIRCycles(), ArRobotParams::getIRType(), ArRobotParams::getIRX(), ArRobotParams::getIRY(), ArRobotParams::getNumIR(), ArRobot::getTh(), ArRobot::getVel(), ArPose::getX(), ArRobotParams::haveNewTableSensingIR(), ArRobotParams::haveTableSensingIR(), ArTime::mSecSince(), ArActionDesired::reset(), ArActionDesired::setDeltaHeading(), ArActionDesired::setHeading(), ArTime::setToNow(), ArActionDesired::setVel(), ArPose::setX(), and ArPose::setY().


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