#include <ArBumpers.h>
Inheritance diagram for ArBumpers:
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) |
Sets the robot this device is attached to. | |
Protected Attributes | |
double | myAngleRange |
int | myBumpMask |
ArFunctorC< ArBumpers > | myProcessCB |
ArRobot * | myRobot |
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 41 of file ArBumpers.h.
|
Definition at line 40 of file ArBumpers.cpp. References ArRangeDevice::setCurrentDrawingData(). |
|
Definition at line 113 of file ArBumpers.cpp. References ArRangeBuffer::addReading(), ArMath::cos(), ArTransform::doTransform(), ArRobot::getNumFrontBumpers(), ArRobot::getNumRearBumpers(), ArRobot::getRobotParams(), ArRobotParams::getRobotRadius(), ArRobot::getToGlobalTransform(), ArPose::getX(), ArPose::getY(), ArPose::setX(), ArPose::setY(), and ArMath::sin(). Referenced by processReadings(). |
|
This function is called every 100 milliseconds. Definition at line 76 of file ArBumpers.cpp. References addBumpToBuffer(), ArRobot::getStallValue(), ArRobot::hasFrontBumpers(), and ArRobot::hasRearBumpers(). |