Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
jafar::rednav::SensorModel Class Reference

Probabilistic sensor description. More...


Detailed Description

Probabilistic sensor description.

Joint probabilistic matrix. Bayesian filter.

Definition at line 27 of file sensorModel.hpp.

#include <sensorModel.hpp>

List of all members.

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.

Member Function Documentation

double jafar::rednav::SensorModel::chanfreinDistance ( int  ao,
int  bo,
int  a,
int  b 
)

Compute the chanfrein distance.

Parameters:
aoOrigin abscissa
boOrigin ordinate
aA point abscissa
bA point ordinate

Check if attributes and sensormat are compatible.

Parameters:
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.

Parameters:
oxx-axis center of perception
oyy-axis center of perception
iwatched point x-axis
jwatched point y-axis

Returns the current visibility minimum radius.

See also:
visibilityMinRadius
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.

Parameters:
geoWorldreal world geodata representation
x1coordfirst position X coordinate
y1coordfirst position Y coordinate
x2coordsecond position X coordinate
y2coordsecond 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.

Parameters:
geoWorldreal world geodata representation
x1coordfirst position X coordinate
y1coordfirst position Y coordinate
x2coordsecond position X coordinate
y2coordsecond position Y coordinate
See also:
isIntervisible()

Set a new visibility minimum radius.

Parameters:
vmr_New value for visibilityMinRadius
See also:
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.


Member Data Documentation

Factor preventing from zero perception at sensor range.

Definition at line 74 of file sensorModel.hpp.

Model to use to damp quality over distance.

See also:
getDistanceFactor

Definition at line 71 of file sensorModel.hpp.

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.

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.

Max perception range in meter.

User setting

Definition at line 59 of file sensorModel.hpp.

Position within this radius are all visible.

See also:
isIntervisible()

Definition at line 79 of file sensorModel.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:44 for Jafar by doxygen 1.7.6.1
LAAS-CNRS