#include <ArActionIRs.h>
Inheritance diagram for ArActionIRs:
Public Member Functions | |
ArActionIRs (const char *name="IRs", double backOffSpeed=100, int backOffTime=5000, int turnTime=3000, bool setMaximums=false) | |
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 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 |
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.
Definition at line 39 of file ArActionIRs.cpp. References ArAction::setNextArgument(). |
|
Fires the action, returning what the action wants to do.
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(). |