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

ArActionLimiterForwards Class Reference

Action to limit the forwards motion of the robot based on range sensor readings. More...

#include <ArActionLimiterForwards.h>

Inheritance diagram for ArActionLimiterForwards:

ArAction List of all members.

Public Member Functions

 ArActionLimiterForwards (const char *name="speed limiter", double stopDistance=250, double slowDistance=1000, double slowSpeed=200, double widthRatio=1)
 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).
void setParameters (double stopDistance=250, double slowDistance=1000, double slowSpeed=200, double widthRatio=1)
virtual ~ArActionLimiterForwards ()
 Destructor.

Protected Attributes

ArActionDesired myDesired
bool myLastStopped
double mySlowDist
double mySlowSpeed
double myStopDist
double myWidthRatio

Detailed Description

Action to limit the forwards motion of the robot based on range sensor readings.

This action uses the sensors to find a maximum forwared speed to travel at; when the range sensor (e.g. sonar or laser) detects obstacles closer than the given parameters, this action requests that the robot decelerate or stop.

Definition at line 39 of file ArActionLimiterForwards.h.


Constructor & Destructor Documentation

ArActionLimiterForwards::ArActionLimiterForwards const char *  name = "speed limiter",
double  stopDistance = 250,
double  slowDistance = 1000,
double  slowSpeed = 200,
double  widthRatio = 1
 

Constructor.

Parameters:
name name of the action
stopDistance distance at which to stop (mm)
slowDistance distance at which to slow down (mm)
slowSpeed speed allowed at slowDistance, scales to 0 at slow distance (mm/sec)
widthRatio Ratio of the width of the box to look at to the robot radius (multiplier)

Definition at line 40 of file ArActionLimiterForwards.cpp.

References ArAction::setNextArgument().


Member Function Documentation

ArActionDesired * ArActionLimiterForwards::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 90 of file ArActionLimiterForwards.cpp.

References ArRobot::checkRangeDevicesCurrentBox(), ArRobot::getRobotLength(), ArRobot::getRobotWidth(), ArActionDesired::reset(), and ArActionDesired::setMaxVel().

void ArActionLimiterForwards::setParameters double  stopDistance = 250,
double  slowDistance = 1000,
double  slowSpeed = 200,
double  widthRatio = 1
 

Parameters:
stopDistance distance at which to stop (mm)
slowDistance distance at which to slow down (mm)
slowSpeed speed allowed at slowDistance, scales to 0 at slow distance (mm/sec)
widthRatio Ratio of the width of the box to look at to the robot radius (multiplier)

Definition at line 78 of file ArActionLimiterForwards.cpp.


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