Jafar
|
Definition at line 36 of file pathTool.hpp.
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::NavGraph * | navgraph |
NavGraph used to make some topological calculations. |
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.
src | Original path |
out | Resulting path |
patid | Path transformation identification |
bool jafar::rednav::PathTool::cropPath | ( | double | vent, |
double | vproba, | ||
jafar::lgl::NavPath & | navpath | ||
) |
Crop a path using multiple parameters.
vent | Maximum admissible entropy value for YES-NO traversability |
vproba | Maximum admissible obstacle probability |
double jafar::rednav::PathTool::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.
Get the path maximum deviation distance in meter.
double jafar::rednav::PathTool::getPathMaxDistance | ( | ) |
Get the path maximum distance in meter.
Get the path maximum distance in meter.
double jafar::rednav::PathTool::getSensorRadius | ( | ) |
Get the sensor radius parameter.
double jafar::rednav::PathTool::navLocToMeters | ( | int | a | ) |
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.
src | original path |
out | output path |
smallestInterval | wished interval between each interpolation (default interpolationDistance) |
masterP1 | first index of the path from where interpolation is applied (default interpolationStartPointIdx) |
masterP2 | second index of the path at where interpolation is stopped (default interpolationStopPointIdx) |
bool jafar::rednav::PathTool::pathSafeSampling | ( | const jafar::lgl::NavPath & | src, |
jafar::lgl::NavPath & | out | ||
) |
Get only important points for trajectory.
Important points are defined as points were the trajectory has a great change in heading.
bool jafar::rednav::PathTool::pathSmartSampling | ( | const jafar::lgl::NavPath & | src, |
jafar::lgl::NavPath & | out | ||
) |
Get important and mandatory points for trajectory.
It does as in pathSafeSampling and more by keeping points that are surounded by obstacles
void jafar::rednav::PathTool::setInterpolationDistance | ( | double | ) |
Set the interpolation distance.
Set the first point index for interpolation.
Set the last point index for interpolation.
void jafar::rednav::PathTool::setPathMaxDevDistance | ( | double | pmd | ) |
Set the path maximum deviation distance.
pmd | New distance in meter |
void jafar::rednav::PathTool::setPathMaxDistance | ( | double | pmd | ) |
void jafar::rednav::PathTool::setPathMaxEntropy | ( | double | pme | ) |
Set the maximum binary (free-obst) entropy allowed for a path.
void jafar::rednav::PathTool::setPathMaxProba | ( | double | pmp | ) |
Set the maximum obstacle probability allowed for a path.
void jafar::rednav::PathTool::setPathMaxStepDistance | ( | double | pmd | ) |
Set the path step maximum distance.
pmd | New distance in meter |
void jafar::rednav::PathTool::setScale | ( | double | cellres | ) |
Set the cell resolution.
cellres | new cell resolution to set |
void jafar::rednav::PathTool::setSensorRadius | ( | double | ssd | ) |
set the sensor radius parameter
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
First | Obstacle Distance |
bool jafar::rednav::PathTool::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.
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.
int jafar::rednav::PathTool::interpolationStartPointIdx [private] |
First master point index where to start path interpolation.
Definition at line 86 of file pathTool.hpp.
int jafar::rednav::PathTool::interpolationStopPointIdx [private] |
Second master point index where to stop path interpolation.
Definition at line 91 of file pathTool.hpp.
int jafar::rednav::PathTool::maxwaypts [private] |
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.
double jafar::rednav::PathTool::subsampler [private] |
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.
Generated on Wed Oct 15 2014 00:37:44 for Jafar by doxygen 1.7.6.1 |