#include <ArSensorReading.h>
This class holds sensor data and a sensor reading... it can happen that it contains the data for a sonar, but not the reading, in which case the range (from getRange) will be -1, and the counter it was taken (from getCounterTaken) will be 0, also it will never be new (from isNew). If ignoreThisReading returns true then ignore this reading (its still here since this is used for raw data).
Definition at line 42 of file ArSensorReading.h.
Public Member Functions | |
void | applyEncoderTransform (ArTransform trans) |
Applies a transform to the encoder pose taken. | |
void | applyTransform (ArTransform trans) |
Applies a transform to the reading position, and where it was taken. | |
ArSensorReading (const ArSensorReading &reading) | |
Copy constructor. | |
ArSensorReading (double xPos=0.0, double yPos=0.0, double thPos=0.0) | |
Constructor, the three args are the physical location of the sensor. | |
bool | getAdjusted (void) |
Applies a transform to the reading position, and where it was taken. | |
unsigned int | getCounterTaken (void) const |
Gets the counter from when the reading arrived. | |
ArPose | getEncoderPoseTaken (void) const |
Gets the robot's encoder pose the reading was taken at. | |
int | getExtraInt (void) const |
Gets the extra int with this reading. | |
bool | getIgnoreThisReading (void) const |
ArPose | getLocalPose (void) const |
double | getLocalX (void) const |
Gets the X location of the sensor reading in local coords. | |
double | getLocalY (void) const |
Gets the Y location of the sensor reading. | |
ArPose | getPose (void) const |
ArPose | getPoseTaken (void) const |
Gets the pose of the robot at which the reading was taken. | |
int | getRange (void) const |
Gets the range of the reading. | |
double | getSensorDX (void) const |
Gets the cosine component of the heading of the sensor reading. | |
double | getSensorDY (void) const |
Gets the sine component of the heading of the sensor reading. | |
ArPose | getSensorPosition (void) const |
Gets the sensor's position on the robot. | |
double | getSensorTh (void) const |
Gets the heading of the sensor on the robot. | |
double | getSensorX (void) const |
Gets the X location of the sonar on the robot. | |
double | getSensorY (void) const |
Gets the Y location of the sensor on the robot. | |
double | getThTaken (void) const |
Gets the th (heading) of the robot when the reading was received. | |
ArTime | getTimeTaken (void) const |
double | getX (void) const |
Gets the X location of the sensor reading. | |
double | getXTaken (void) const |
Gets the X locaiton of the robot when the reading was received. | |
double | getY (void) const |
Gets the Y location of the sensor reading. | |
double | getYTaken (void) const |
Gets the Y location of the robot when the reading was received. | |
bool | isNew (unsigned int counter) const |
Given the counter from the robot, it returns whether the reading is new. | |
void | newData (int sx, int sy, ArPose robotPose, ArPose encoderPose, ArTransform trans, unsigned int counter, ArTime timeTaken, bool ignoreThisReading=false, int extraInt=0) |
Takes the data and makes the reading reflect it. | |
void | newData (int range, ArPose robotPose, ArPose encoderPose, ArTransform trans, unsigned int counter, ArTime timeTaken, bool ignoreThisReading=false, int extraInt=0) |
Takes the data and makes the reading reflect it. | |
ArSensorReading & | operator= (const ArSensorReading &reading) |
Assignment operator. | |
void | resetSensorPosition (double xPos, double yPos, double thPos, bool forceComputation=false) |
Resets the sensors idea of its physical location on the robot. | |
void | setAdjusted (bool adjusted) |
Applies a transform to the reading position, and where it was taken. | |
void | setExtraInt (int extraInt) |
Sets the extra int. | |
void | setIgnoreThisReading (bool ignoreThisReading) |
Sets that we should ignore this reading. | |
virtual | ~ArSensorReading () |
Destructor. | |
Protected Attributes | |
bool | myAdjusted |
double | myAngleToCenter |
unsigned int | myCounterTaken |
double | myDistToCenter |
ArPose | myEncoderPoseTaken |
int | myExtraInt |
bool | myIgnoreThisReading |
ArPose | myLocalReading |
int | myRange |
ArPose | myReading |
ArPose | myReadingTaken |
double | mySensorCos |
ArPose | mySensorPos |
double | mySensorSin |
ArTime | myTimeTaken |
|
Constructor, the three args are the physical location of the sensor.
Definition at line 36 of file ArSensorReading.cpp. |
|
Applies a transform to the encoder pose taken.
Definition at line 195 of file ArSensorReading.cpp. |
|
Applies a transform to the reading position, and where it was taken.
Definition at line 186 of file ArSensorReading.cpp. |
|
Gets the counter from when the reading arrived.
Definition at line 137 of file ArSensorReading.h. |
|
Gets the extra int with this reading. Some range devices provide extra device-dependent information with each reading. What that means depends on the range device, if a range device doesn't give the meaning in its constructor description then it has no meaning at all. Note that for all laser like devices this should be a value between 0 - 255 which is the measure of reflectance. It should be 0 if that device doesn't measure reflectance (the default). Definition at line 111 of file ArSensorReading.h. |
|
Gets whether this reading should be ignore or not. e.g. the sensor encountered an error or did not actually detect anything. Definition at line 98 of file ArSensorReading.h. |
|
Gets the position of the reading
Definition at line 81 of file ArSensorReading.h. |
|
Gets the position of the reading
Definition at line 73 of file ArSensorReading.h. |
|
Gets the range of the reading.
Definition at line 58 of file ArSensorReading.h. |
|
Gets the sensor's position on the robot.
Definition at line 118 of file ArSensorReading.h. |
|
Given the counter from the robot, it returns whether the reading is new.
Definition at line 66 of file ArSensorReading.h. |
|
Takes the data and makes the reading reflect it.
Definition at line 138 of file ArSensorReading.cpp. |
|
Takes the data and makes the reading reflect it.
Definition at line 106 of file ArSensorReading.cpp. |
|
Resets the sensors idea of its physical location on the robot.
Definition at line 165 of file ArSensorReading.cpp. |