Aria
2.8.0
|
A class for keeping track of laser reflectors that we see right now. More...
#include <ArLaserReflectorDevice.h>
Inherits ArRangeDevice.
Public Member Functions | |
void | addToConfig (ArConfig *config, const char *section) |
Adds a reflector threshold to the task. | |
ArLaserReflectorDevice (ArRangeDevice *laser, ArRobot *robot, const char *name="reflector") | |
Constructor. | |
void | processReadings (void) |
Grabs the new readings from the robot and adds them to the buffers. | |
virtual void | setRobot (ArRobot *robot) |
Specifically does nothing since it was done in the constructor. | |
virtual | ~ArLaserReflectorDevice () |
Destructor. | |
Public Member Functions inherited from ArRangeDevice | |
virtual void | addReading (double x, double y, bool *wasAdded=NULL) |
Adds a reading to the buffer. | |
virtual void | applyTransform (ArTransform trans, bool doCumulative=true) |
Applies a transform to the buffers. More... | |
ArRangeDevice (size_t currentBufferSize, size_t cumulativeBufferSize, const char *name, unsigned int maxRange, int maxSecondsToKeepCurrent=0, int maxSecondsToKeepCumulative=0, double maxDistToKeepCumulative=0, bool locationDependent=false) | |
Constructor. More... | |
virtual void | clearCumulativeOlderThan (int milliSeconds) |
Clears all the cumulative readings older than this number of milliseconds. | |
virtual void | clearCumulativeOlderThanSeconds (int seconds) |
Clears all the cumulative readings older than this number of seconds. | |
virtual void | clearCumulativeReadings (void) |
Clears all the cumulative readings. | |
virtual void | clearCurrentReadings (void) |
Clears all the current readings. | |
virtual double | cumulativeReadingBox (double x1, double y1, double x2, double y2, ArPose *readingPos=NULL) const |
Gets the closest current reading from the given box region. More... | |
virtual double | cumulativeReadingPolar (double startAngle, double endAngle, double *angle=NULL) const |
Gets the closest cumulative reading in the given polar region. More... | |
virtual double | currentReadingBox (double x1, double y1, double x2, double y2, ArPose *readingPos=NULL) const |
Gets the closest current reading from the given box region. More... | |
virtual double | currentReadingPolar (double startAngle, double endAngle, double *angle=NULL) const |
Gets the closest current reading in the given polar region. More... | |
void | filterCallback (void) |
Internal function to filter the readings based on age and distance. | |
virtual const std::list< ArSensorReading * > * | getAdjustedRawReadings (void) const |
Gets the raw unfiltered readings from the device (but pose takens are corrected) More... | |
virtual std::vector< ArSensorReading > * | getAdjustedRawReadingsAsVector (void) |
Gets the raw adjusted readings from the device into a vector. More... | |
virtual const std::list< ArPoseWithTime * > * | getCumulativeBuffer (void) const |
Gets the current buffer of readings. More... | |
virtual std::list< ArPoseWithTime * > * | getCumulativeBuffer (void) |
Gets the current buffer of readings. | |
virtual std::vector< ArPoseWithTime > * | getCumulativeBufferAsVector (void) |
Gets the cumulative buffer of readings as a vector. More... | |
virtual size_t | getCumulativeBufferSize (void) const |
Sets the maximum size of the buffer for cumulative readings. | |
virtual ArDrawingData * | getCumulativeDrawingData (void) |
Gets data used for visualizing the cumulative buffer (see ArNetworking) | |
virtual const ArRangeBuffer * | getCumulativeRangeBuffer (void) const |
Gets the cumulative range buffer. More... | |
virtual ArRangeBuffer * | getCumulativeRangeBuffer (void) |
Gets the cumulative range buffer. | |
virtual const std::list< ArPoseWithTime * > * | getCurrentBuffer (void) const |
Gets the current buffer of readings. More... | |
virtual std::list< ArPoseWithTime * > * | getCurrentBuffer (void) |
Gets the current buffer of readings. | |
virtual std::vector< ArPoseWithTime > * | getCurrentBufferAsVector (void) |
Gets the current buffer of readings as a vector. More... | |
virtual size_t | getCurrentBufferSize (void) const |
Gets the maximum size of the buffer for current readings. | |
virtual ArDrawingData * | getCurrentDrawingData (void) |
Gets data used for visualizing the current buffer (see ArNetworking) | |
virtual const ArRangeBuffer * | getCurrentRangeBuffer (void) const |
Gets the current range buffer. More... | |
virtual ArRangeBuffer * | getCurrentRangeBuffer (void) |
Gets the current range buffer. | |
double | getMaxDistToKeepCumulative (void) |
sets the maximum distance cumulative readings can be from current pose More... | |
double | getMaxInsertDistCumulative (void) |
Gets the maximum distance a cumulative reading can be from the robot and still be inserted. More... | |
virtual unsigned int | getMaxRange (void) const |
Gets the maximum range for this device. | |
int | getMaxSecondsToKeepCumulative (void) |
gets the maximum seconds to keep current readings around More... | |
int | getMaxSecondsToKeepCurrent (void) |
gets the maximum seconds to keep current readings around More... | |
double | getMinDistBetweenCumulative (void) |
Gets the minimum distance between cumulative readings. More... | |
double | getMinDistBetweenCurrent (void) |
Gets the minimum distance between current readings. More... | |
virtual const char * | getName (void) const |
Gets the name of the device. | |
virtual const std::list< ArSensorReading * > * | getRawReadings (void) const |
Gets the raw unfiltered readings from the device. More... | |
virtual std::vector< ArSensorReading > * | getRawReadingsAsVector (void) |
Gets the raw unfiltered readings from the device into a vector. More... | |
virtual ArRobot * | getRobot (void) |
Gets the robot this device is attached to. | |
bool | isLocationDependent (void) |
Gets if this device is location dependent or not. | |
virtual int | lockDevice () |
Lock this device. | |
virtual void | setCumulativeBufferSize (size_t size) |
Sets the maximum size of the buffer for cumulative readings. More... | |
virtual void | setCumulativeDrawingData (ArDrawingData *data, bool takeOwnershipOfData) |
Sets data for visualizing the cumulative buffer (and if we own it) | |
virtual void | setCurrentBufferSize (size_t size) |
Sets the maximum size of the buffer for current readings. More... | |
virtual void | setCurrentDrawingData (ArDrawingData *data, bool takeOwnershipOfData) |
Sets data for visualizing the current buffer (and if we own it) | |
void | setMaxDistToKeepCumulative (double maxDistToKeepCumulative) |
sets the maximum distance cumulative readings can be from current pose More... | |
void | setMaxInsertDistCumulative (double maxInsertDistCumulative) |
Sets the maximum distance a cumulative reading can be from the robot and still be inserted. More... | |
virtual void | setMaxRange (unsigned int maxRange) |
Sets the maximum range for this device. | |
void | setMaxSecondsToKeepCumulative (int maxSecondsToKeepCumulative) |
gets the maximum seconds to keep cumulative readings around More... | |
void | setMaxSecondsToKeepCurrent (int maxSecondsToKeepCurrent) |
Sets the maximum seconds to keep current readings around. More... | |
void | setMinDistBetweenCumulative (double minDistBetweenCumulative) |
Sets the minimum distance between cumulative readings. More... | |
void | setMinDistBetweenCurrent (double minDistBetweenCurrent) |
Sets the minimum distance between current readings. More... | |
virtual int | tryLockDevice () |
Try to lock this device. | |
virtual int | unlockDevice () |
Unlock this device. | |
virtual | ~ArRangeDevice () |
Destructor. | |
Protected Attributes | |
ArRangeDevice * | myLaser |
ArFunctorC< ArLaserReflectorDevice > | myProcessCB |
int | myReflectanceThreshold |
Protected Attributes inherited from ArRangeDevice | |
std::list< ArSensorReading * > * | myAdjustedRawReadings |
std::vector< ArSensorReading > | myAdjustedRawReadingsVector |
ArRangeBuffer | myCumulativeBuffer |
ArDrawingData * | myCumulativeDrawingData |
ArRangeBuffer | myCurrentBuffer |
ArDrawingData * | myCurrentDrawingData |
ArMutex | myDeviceMutex |
ArFunctorC< ArRangeDevice > | myFilterCB |
bool | myIsLocationDependent |
double | myMaxDistToKeepCumulative |
double | myMaxDistToKeepCumulativeSquared |
double | myMaxInsertDistCumulative |
ArPose | myMaxInsertDistCumulativePose |
double | myMaxInsertDistCumulativeSquared |
unsigned int | myMaxRange |
int | myMaxSecondsToKeepCumulative |
int | myMaxSecondsToKeepCurrent |
double | myMinDistBetweenCumulative |
double | myMinDistBetweenCumulativeSquared |
double | myMinDistBetweenCurrent |
double | myMinDistBetweenCurrentSquared |
std::string | myName |
bool | myOwnCumulativeDrawingData |
bool | myOwnCurrentDrawingData |
std::list< ArSensorReading * > * | myRawReadings |
std::vector< ArSensorReading > | myRawReadingsVector |
ArRobot * | myRobot |
Additional Inherited Members | |
Protected Member Functions inherited from ArRangeDevice | |
void | adjustRawReadings (bool interlaced) |
This call should be called by the range device every robot cycle before the range device makes new readings (and even if it isn't adding any that cycle)... More... | |
A class for keeping track of laser reflectors that we see right now.
This class is for showing the laser reflectors in MobileEyes. This requires that the range device you pass in uses the 'extraInt' in the rawReadings ArSensorReading to note reflector value and that anything greater than 0 is a reflector.