ArBumpers Class Reference
#include <ArBumpers.h>
Inheritance diagram for ArBumpers:
List of all members.
Detailed Description
A class that treats the robot's bumpers as a range device.
The class treats bumpers like a range device. When a bumper is bumped, it reports the approximate position of the bump in a buffer. The positions are kept current for a specified length of time.
Definition at line 40 of file ArBumpers.h.
|
Public Member Functions |
void | addBumpToBuffer (int bumpValue, int whichBumper) |
| ArBumpers (size_t currentBufferSize=30, size_t cumulativeBufferSize=30, const char *name="bumpers", int maxSecondsToKeepCurrent=15, double angleRange=135) |
void | processReadings (void) |
virtual void | setRobot (ArRobot *robot) |
Protected Attributes |
double | myAngleRange |
int | myBumpMask |
ArFunctorC< ArBumpers > | myProcessCB |
ArRobot * | myRobot |
Constructor & Destructor Documentation
ArBumpers::ArBumpers |
( |
size_t |
currentBufferSize = 30 , |
|
|
size_t |
cumulativeBufferSize = 30 , |
|
|
const char * |
name = "bumpers" , |
|
|
int |
maxSecondsToKeepCurrent = 15 , |
|
|
double |
angleRange = 135 |
|
) |
|
|
|
- Parameters:
-
| currentBufferSize | The number of readings to store in the current Buffer |
| cumulativeBufferSize | The number of readings in the cumulative buffer (This currently is not being used) |
| name | The name of this range device |
| maxSecondsToKeepCurrent | How long to keep readings in the current buffer |
| angleRange | the range in front and behind the robot which is divided by the number of bumpers and used to detrmine where the sensor readings will be placed. |
Definition at line 39 of file ArBumpers.cpp. |
Member Function Documentation
void ArBumpers::addBumpToBuffer |
( |
int |
bumpValue, |
|
|
int |
whichBumper |
|
) |
|
|
|
- Parameters:
-
| bumpValue | This is the value that tells which individual bumper has been triggered |
| whichBumper | This value tells if the front or rear has been triggered |
Definition at line 112 of file ArBumpers.cpp. |
void ArBumpers::processReadings |
( |
void |
|
) |
|
|
|
This function is called every 100 milliseconds.
Definition at line 75 of file ArBumpers.cpp. |
The documentation for this class was generated from the following files:
Generated on Tue Feb 20 10:51:43 2007 for Aria by
1.4.0