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

Detailed Description

Definition at line 36 of file pathTool.hpp.

List of all members.

Public Member Functions

 PathTool ()
 Default constructor to use tools separatly.
 PathTool (jafar::lgl::NavPath &, PATH_TRANSFORMATION, jafar::lgl::NavGraph *ng_=NULL)
 One Shot constructor to apply a path transformation on a given path.
 ~PathTool ()
 Destructor.
bool applyTool (const jafar::lgl::NavPath &src, jafar::lgl::NavPath &out, PATH_TRANSFORMATION patid)
 Generic Tool to make easy generic calls.
bool twoPoints (const jafar::lgl::NavPath &src, jafar::lgl::NavPath &out)
 Two points transformation.
bool subSample (const jafar::lgl::NavPath &src, jafar::lgl::NavPath &out, double subsamp)
 Path subsampling.
bool cropPath (double vent, double vproba, jafar::lgl::NavPath &navpath)
 Crop a path using multiple parameters.
bool cropPath (const jafar::lgl::NavPath &srcPath, jafar::lgl::NavPath &outPath)
 Crop a path using internal parameters and working on a path copy.
bool twoPointsFromCurve (const jafar::lgl::NavPath &src, jafar::lgl::NavPath &out)
 Two points transformation The two points are chosen by comparing the distance between the straight track from the goal and the real track distance for each way point in the path.
bool cropDistance (const jafar::lgl::NavPath &src, jafar::lgl::NavPath &out, double cropDistance)
 Two points transformation.
bool pathInterpolation (const jafar::lgl::NavPath &src, jafar::lgl::NavPath &out, double smallestInterval, int masterP1, int masterP2)
 Path interpolation.
bool pathSafeSampling (const jafar::lgl::NavPath &src, jafar::lgl::NavPath &out)
 Get only important points for trajectory.
bool pathSmartSampling (const jafar::lgl::NavPath &src, jafar::lgl::NavPath &out)
 Get important and mandatory points for trajectory.
double navLocToMeters (int a)
 Transformation integer location to double map coordinates.
double navLocDistance (const jafar::lgl::NavLocation &A, const jafar::lgl::NavLocation &B)
 Returns the meter distance between two navigation positions (in meters)
double shortestAxisDistance (const jafar::lgl::NavLocation &A, const jafar::lgl::NavLocation &B)
 Returns the shortest distance to respective axis between two navigation positions (in meters)
double getOrthogonalHeight (const jafar::lgl::NavLocation &A, const jafar::lgl::NavLocation &B, const jafar::lgl::NavLocation &C)
 Return the othogonal distance of C to segment AB.
bool surroundingsDanger (const jafar::lgl::NavLocation &A, float &fodist)
 Return true if obstacles are close.
void setMaxWayPts (int n)
 Set the max number of way points.
void setPathMaxEntropy (double pme)
 Set the maximum binary (free-obst) entropy allowed for a path.
void setPathMaxProba (double pmp)
 Set the maximum obstacle probability allowed for a path.
void setScale (double cellres)
 Set the cell resolution.
void setGeoXRoot (double gxroot)
 Set the map geo-X coordinate origin.
void setGeoYRoot (double gyroot)
 Set the map geo-Y coordinate origin.
void setSubSampler (double setsb)
 Changes the subsampling factor.
void setPathMaxDistance (double pmd)
 Set the path maximum distance.
void setPathMaxStepDistance (double pmd)
 Set the path step maximum distance.
void setPathMaxDevDistance (double pmd)
 Set the path maximum deviation distance.
void setSensorRadius (double ssd)
 set the sensor radius parameter
void setInterpolationStartPointIdx (int)
 Set the first point index for interpolation.
void setInterpolationStopPointIdx (int)
 Set the last point index for interpolation.
void setInterpolationDistance (double)
 Set the interpolation distance.
void setNavGraph (jafar::lgl::NavGraph *ng)
 Tell which navigation graph to use.
double getPathMaxEntropy ()
 Return the pathMaxEntropy.
double getPathMaxProba ()
 Return the pathMaxProba.
double getSubSampler ()
 Return the subsampler.
double getPathMaxDistance ()
 Get the path maximum distance in meter.
double getPathMaxStepDistance ()
 Get the path maximum distance in meter.
double getPathMaxDevDistance ()
 Get the path maximum deviation distance in meter.
double getSensorRadius ()
 Get the sensor radius parameter.
double getScale ()
 Returns cell scale.
double getGeoXRoot ()
 Return the geoX coordinate.
double getGeoYRoot ()
 Return the geoY coordinate.
int getInterpolationStartPointIdx ()
 Get the last point index for interpolation.
int getInterpolationStopPointIdx ()
 Get the last point index for interpolation.

Private Attributes

double subsampler
 Subsampling parameter in meters.
int maxwaypts
 Indicate how many way points the output path can contain.
double pathMaxEntropy
 Limit on binary entropy (free-obstacle knowledge)
double pathMaxProba
 Limit on obstacle probability - path safety.
double cellScale
 For calculation in meter we need this resolution factor.
double geoXRoot
 For location map-registration we need the zero-ref X coordinate.
double geoYRoot
 For location map-registration we need the zero-ref Y coordinate.
double pathMaxDistance
 Maximum distance (m) used for PATH_DISTANCE_LIMIT filter.
double pathMaxStepDistance
 Maximum distance (m) between allowed between waypoints.
double pathMaxDevDistance
 Maximum deviation distance (m) allowed on a portion of a path.
double sensorRadius
 Sensor radius we are working with.
int interpolationStartPointIdx
 First master point index where to start path interpolation.
int interpolationStopPointIdx
 Second master point index where to stop path interpolation.
double interpolationDistance
 Interpolation distance.
jafar::lgl::NavGraphnavgraph
 NavGraph used to make some topological calculations.

Member Function Documentation

bool jafar::rednav::PathTool::applyTool ( const jafar::lgl::NavPath src,
jafar::lgl::NavPath out,
PATH_TRANSFORMATION  patid 
)

Generic Tool to make easy generic calls.

If you use this function, the filters will be called with the default values held by the intern parameters. Nevertheless they can be changed thanks to their respective setters.

Parameters:
srcOriginal path
outResulting path
patidPath transformation identification
bool jafar::rednav::PathTool::cropPath ( double  vent,
double  vproba,
jafar::lgl::NavPath navpath 
)

Crop a path using multiple parameters.

Parameters:
ventMaximum admissible entropy value for YES-NO traversability
vprobaMaximum admissible obstacle probability
Returns:
true if a crop was done else false.

Return the othogonal distance of C to segment AB.

Get the path maximum deviation distance in meter.

See also:
pathMaxDevDistance

Get the path maximum distance in meter.

See also:
pathMaxDistance

Get the path maximum distance in meter.

See also:
pathMaxDistance

Get the sensor radius parameter.

See also:
sensorRadius

Transformation integer location to double map coordinates.

Here we do not register the coordinates. So they can only be used for relative calculations like distances.

bool jafar::rednav::PathTool::pathInterpolation ( const jafar::lgl::NavPath src,
jafar::lgl::NavPath out,
double  smallestInterval,
int  masterP1,
int  masterP2 
)

Path interpolation.

Parameters:
srcoriginal path
outoutput path
smallestIntervalwished interval between each interpolation (default interpolationDistance)
masterP1first index of the path from where interpolation is applied (default interpolationStartPointIdx)
masterP2second index of the path at where interpolation is stopped (default interpolationStopPointIdx)

Get only important points for trajectory.

Important points are defined as points were the trajectory has a great change in heading.

Get important and mandatory points for trajectory.

It does as in pathSafeSampling and more by keeping points that are surounded by obstacles

Set the interpolation distance.

See also:
interpolationDistance

Set the first point index for interpolation.

See also:
interpolationStartPointIdx

Set the last point index for interpolation.

See also:
interpolationStopPointIdx

Set the path maximum deviation distance.

Parameters:
pmdNew distance in meter
See also:
pathMaxDevDistance

Set the path maximum distance.

Parameters:
pmdNew distance in meters
See also:
pathMaxDistance

Set the maximum binary (free-obst) entropy allowed for a path.

See also:
pathMaxEntropy

Set the maximum obstacle probability allowed for a path.

See also:
pathMaxProba

Set the path step maximum distance.

Parameters:
pmdNew distance in meter
See also:
pathMaxStepDistance
void jafar::rednav::PathTool::setScale ( double  cellres)

Set the cell resolution.

Parameters:
cellresnew cell resolution to set

set the sensor radius parameter

See also:
sensorRadius
bool jafar::rednav::PathTool::surroundingsDanger ( const jafar::lgl::NavLocation A,
float &  fodist 
)

Return true if obstacles are close.

close means less than 3.0*pathMaxDevDistance

Parameters:
FirstObstacle Distance

Two points transformation The two points are chosen by comparing the distance between the straight track from the goal and the real track distance for each way point in the path.

When at a certain waypoint the difference between these distances is superior to the sensor radius we choose this waypoint as the second point in the two points path.


Member Data Documentation

First master point index where to start path interpolation.

See also:
pathInterpolation()

Definition at line 86 of file pathTool.hpp.

Second master point index where to stop path interpolation.

See also:
pathInterpolation()

Definition at line 91 of file pathTool.hpp.

Indicate how many way points the output path can contain.

Only positive values. Zero means no filter on points number. 1 means only the first point after the start point so two real points.

Definition at line 54 of file pathTool.hpp.

Subsampling parameter in meters.

Only positive values. Zero means no subsampling. While using the subsampling filter paths are subsampled with regards to the distance 'subsampler' between points.

Definition at line 45 of file pathTool.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