#include <ArActionLimiterBackwards.h>
Inheritance diagram for ArActionLimiterBackwards:
Public Member Functions | |
ArActionLimiterBackwards (const char *name="speed limiter", double stopDistance=-250, double slowDistance=-600, double maxBackwardsSpeed=-250, double widthRatio=1.5) | |
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 | ~ArActionLimiterBackwards () |
Destructor. | |
Protected Attributes | |
ArActionDesired | myDesired |
double | myMaxBackwardsSpeed |
double | mySlowDist |
double | myStopDist |
double | myWidthRatio |
This class limits the backwards motion of the robot according to range sensor readings (e.g. sonar, laser), and the parameters given. When the range sensor (e.g. sonar or laser) detects rearward obstacles closer than the given parameters, this action requests that the robot decelerate or stop any current backwards movement.
Definition at line 40 of file ArActionLimiterBackwards.h.
|
Constructor.
Definition at line 39 of file ArActionLimiterBackwards.cpp. References ArAction::setNextArgument(). |
|
Fires the action, returning what the action wants to do.
Implements ArAction. Definition at line 69 of file ArActionLimiterBackwards.cpp. References ArRobot::checkRangeDevicesCurrentBox(), ArMath::fabs(), ArRobot::getRobotLength(), ArRobot::getRobotRadius(), ArRobot::getRobotWidth(), ArActionDesired::reset(), and ArActionDesired::setMaxNegVel(). |