Jafar
|
Probabilistic sensor description. More...
Probabilistic sensor description.
Joint probabilistic matrix. Bayesian filter.
Definition at line 27 of file sensorModel.hpp.
#include <sensorModel.hpp>
Public Member Functions | |
~SensorModel () | |
Default Destructor. | |
SensorModel () | |
Default Constructor. | |
SensorModel (int n) | |
Constructor preparing a model with n*n elements. | |
bool | watchCell (int i, int j, jafar::lgl::GeoData *gdin, jafar::lgl::GeoData *gdout) |
Exerce perception on gdin and write it in gdout. | |
bool | watchAttributes (const jafar::lgl::Attributes &attin, jafar::lgl::Attributes &attout) |
Exerce perception on an attribute vector. | |
bool | calculateInformationGain (int i, int j, jafar::lgl::GeoData *gdin, double &result) |
Information Gain calculation from an apriori map using the current model sensor. | |
bool | simulateCellVision (int i, int j, jafar::lgl::GeoData *gdin, jafar::lgl::GeoData *gdout) |
Simulate vision with center point (i,j) | |
bool | simulateAttributes (const jafar::lgl::Attributes &attreal, jafar::lgl::Attributes &attout, double dist) |
Perception simulation. | |
bool | checkModelAppliance (const jafar::lgl::Attributes &attin) |
Check if attributes and sensormat are compatible. | |
double | chanfreinDistance (int ao, int bo, int a, int b) |
Compute the chanfrein distance. | |
bool | isIntervisible (jafar::lgl::GeoData *geoWorld, int x1coord, int y1coord, int x2coord, int y2coord) |
Returns true when points (x1coord, y1coord) and (x2coord, y2coord) are intervisible. | |
bool | isLandDrivable (jafar::lgl::GeoData *geoWorld, int x1coord, int y1coord, int x2coord, int y2coord) |
Check if land in the geodata is really drivable. | |
double | getDistanceFactor (int ox, int oy, int i, int j, jafar::lgl::GeoData *geoW=NULL) |
Returns the distance factor used for perception quality damping. | |
double | getVisibilityMinRadius () |
Returns the current visibility minimum radius. | |
bool | setSensorMatrix (int i, int j, double val) |
Sets the sensor matrix element ij. | |
void | setSensorRange (double ssr) |
Set the sensor range in meters. | |
void | setDistanceDampingModel (int mod_) |
Set the distance damping model. | |
void | setVisibilityMinRadius (double vmr_) |
Set a new visibility minimum radius. | |
Private Attributes | |
double * | sensormat |
Probabilistic description matrix. | |
int | sensormatSize |
The square root size of the sensormat matrix. | |
int | randomModel |
double | sensorRange |
Max perception range in meter. | |
double | maxChanfreinDist |
Max perception range in term of chanfrein distance. | |
double | shortRangeChanfreinDist |
Range under which perception is "perfect". | |
int | distanceDampingModel |
Model to use to damp quality over distance. | |
double | distanceDampingFactor |
Factor preventing from zero perception at sensor range. | |
double | visibilityMinRadius |
Position within this radius are all visible. |
double jafar::rednav::SensorModel::chanfreinDistance | ( | int | ao, |
int | bo, | ||
int | a, | ||
int | b | ||
) |
Compute the chanfrein distance.
ao | Origin abscissa |
bo | Origin ordinate |
a | A point abscissa |
b | A point ordinate |
bool jafar::rednav::SensorModel::checkModelAppliance | ( | const jafar::lgl::Attributes & | attin | ) |
Check if attributes and sensormat are compatible.
attin |
double jafar::rednav::SensorModel::getDistanceFactor | ( | int | ox, |
int | oy, | ||
int | i, | ||
int | j, | ||
jafar::lgl::GeoData * | geoW = NULL |
||
) |
Returns the distance factor used for perception quality damping.
Different damping profiles can be used according to how distanceDampingModel is set.
ox | x-axis center of perception |
oy | y-axis center of perception |
i | watched point x-axis |
j | watched point y-axis |
Returns the current visibility minimum radius.
bool jafar::rednav::SensorModel::isIntervisible | ( | jafar::lgl::GeoData * | geoWorld, |
int | x1coord, | ||
int | y1coord, | ||
int | x2coord, | ||
int | y2coord | ||
) |
Returns true when points (x1coord, y1coord) and (x2coord, y2coord) are intervisible.
geoWorld | real world geodata representation |
x1coord | first position X coordinate |
y1coord | first position Y coordinate |
x2coord | second position X coordinate |
y2coord | second position Y coordinate |
bool jafar::rednav::SensorModel::isLandDrivable | ( | jafar::lgl::GeoData * | geoWorld, |
int | x1coord, | ||
int | y1coord, | ||
int | x2coord, | ||
int | y2coord | ||
) |
Check if land in the geodata is really drivable.
Usuallly used with a geodata that represents land reality this function permets to check piece of paths drivability. This functions is an overlay of isIntervisible() with a special context setting meant to force very short paths to be checked with any other possibility.
geoWorld | real world geodata representation |
x1coord | first position X coordinate |
y1coord | first position Y coordinate |
x2coord | second position X coordinate |
y2coord | second position Y coordinate |
void jafar::rednav::SensorModel::setVisibilityMinRadius | ( | double | vmr_ | ) |
Set a new visibility minimum radius.
vmr_ | New value for visibilityMinRadius |
bool jafar::rednav::SensorModel::simulateAttributes | ( | const jafar::lgl::Attributes & | attreal, |
jafar::lgl::Attributes & | attout, | ||
double | dist | ||
) |
Perception simulation.
Reality attributes have one class with proba equals to 1.0 Applies the perception matrix model to attreal to get attout.
double jafar::rednav::SensorModel::distanceDampingFactor [private] |
Factor preventing from zero perception at sensor range.
Definition at line 74 of file sensorModel.hpp.
int jafar::rednav::SensorModel::distanceDampingModel [private] |
Model to use to damp quality over distance.
Definition at line 71 of file sensorModel.hpp.
double* jafar::rednav::SensorModel::sensormat [private] |
Probabilistic description matrix.
This matrix represents joint probabilities between all terrain classes
Terrain classes Error type
a11 .... an1 Knowing . . Terrain . . classes . a1n .... ann
Diagonal parameters aii are describing the rate of perfection aii = 1.0 - sum(all errors) aii = 1.0 - sum(aji)
Definition at line 47 of file sensorModel.hpp.
int jafar::rednav::SensorModel::sensormatSize [private] |
The square root size of the sensormat matrix.
It is also the number of terrain classes. So sensormat matrix contains sensormatSize*sensormatSize elements
Definition at line 54 of file sensorModel.hpp.
double jafar::rednav::SensorModel::sensorRange [private] |
double jafar::rednav::SensorModel::visibilityMinRadius [private] |
Position within this radius are all visible.
Definition at line 79 of file sensorModel.hpp.
Generated on Wed Oct 15 2014 00:37:44 for Jafar by doxygen 1.7.6.1 |