AURobotServers
4
|
#include <uavoidparams.h>
Public Member Functions | |
double | getDiagonal (bool avoidLeft, bool tight, double *diagAngle) |
double | getDistToCorner (bool left, bool justMax) |
double | getMinOpening () |
double | getMinTurnRad () |
double | getSafeDistance (bool avoidLeft, bool inner, bool tight, bool linear) |
double | getWallWallRadius (bool avoidLeft, double turnRadius) |
UAvoidParams () | |
bool | withinRobotOutline (UPose robot, UPosition pos, double margin) |
~UAvoidParams () | |
Public Attributes | |
int | acceptAfterSolution |
int | avoidSerial |
bool | cellRev2 |
bool | doCrashTest |
double | driveonGA |
double | driveonGD |
UPoseV | exitPose |
bool | followLineLastPose |
double | forwardOnly |
UPosition | frontLeft |
UPosition | frontRight |
int | ignoreCloseObstAfter |
ULogFile * | logAvoid |
int | makeCellPolygon |
double | makeCellPolygonMaxY |
bool | makeFootprintPolygon |
double | maxAcceleration |
int | maxAvoidLoops |
int | maxNestedLevels |
int | maxSpawnCnt |
int | maxTangentDepth |
int | maxTangentToMan |
double | maxTurnAcceleration |
double | minTurnRadius |
double | obstClearanceDesired |
double | obstClearanceMinimum |
double | obstMinDist |
double | obstMinMinDist |
UReacObstGrps * | obsts |
UReacRoadLines * | roads |
int | scanSerial |
UPoseV | startPose |
bool | useAnyResult |
bool | useDriveon |
Class with parameters to be used during the path generation, and is linked to all path candidates.
UAvoidParams::UAvoidParams | ( | ) |
Constructor
Copyright (C) 2010 by DTU (Christian Andersen) jca@o erst ed.dt u.dk
References avoidSerial, cellRev2, UPose::clear(), doCrashTest, driveonGA, driveonGD, exitPose, followLineLastPose, frontLeft, frontRight, logAvoid, maxAcceleration, maxAvoidLoops, maxNestedLevels, maxSpawnCnt, maxTangentDepth, maxTurnAcceleration, minTurnRadius, obstClearanceDesired, obstClearanceMinimum, obstMinDist, obstMinMinDist, obsts, roads, UPosition::set(), startPose, and useDriveon.
|
inline |
Destructor
References getDiagonal(), getDistToCorner(), getMinOpening(), getMinTurnRad(), getSafeDistance(), getWallWallRadius(), logAvoid, and withinRobotOutline().
double UAvoidParams::getDiagonal | ( | bool | avoidLeft, |
bool | tight, | ||
double * | diagAngle | ||
) |
get diagonal of vehicle, where the with is extended with the desired cleaence
avoidLeft | if true, then the front-left corner of vehicle is used. (else ther front right). |
tight | if true, then the minimum clearence is udes, else the desired clearence. |
diagAngle | is (if not NULL) the diagonal angle away from forward direction - always positive. |
References frontLeft, frontRight, obstClearanceDesired, obstClearanceMinimum, UPosition::x, and UPosition::y.
Referenced by UAvoidPath2::getClosestObst2(), UAvoidPath2::isAfterDestination(), and ~UAvoidParams().
double UAvoidParams::getDistToCorner | ( | bool | left, |
bool | justMax | ||
) |
Get distance from robot centre (0,0) to one of the front corners.
left | get distance to the front-left corner - else the right corner (if not justMax) |
justMax | return the bigger distance of either corner. |
References frontLeft, frontRight, UPosition::x, and UPosition::y.
Referenced by ~UAvoidParams().
double UAvoidParams::getMinOpening | ( | ) |
Get the minimum opening, where this robot cam pass - inclusive of minimum clearence.
References frontLeft, frontRight, obstClearanceMinimum, and UPosition::y.
Referenced by UAvoidPath2::findObstAvoidRoute(), UAvoidPath2::toReplaceOldPoint(), and ~UAvoidParams().
double UAvoidParams::getMinTurnRad | ( | ) |
Get minimum turn radius
References driveonGA, driveonGD, minTurnRadius, and useDriveon.
Referenced by UAvoidPath2::addLnksToOpenSet(), UAvoidPath2::convertToManSeq(), UAvoidPath2::createMidPathPoints(), UAvoidPath2::extendManoeuvre(), UResAvoid::findPathToHere(), UAvoidPath2::findRoutesA(), UAvoidPath2::getClosestObst2(), getSafeDistance(), UAvoidPath2::insertNewPointAfter(), UAvoidPath2::setPreStopPoint(), UAvoidPath2::toReplaceOldPoint(), and ~UAvoidParams().
double UAvoidParams::getSafeDistance | ( | bool | avoidLeft, |
bool | inner, | ||
bool | tight, | ||
bool | linear | ||
) |
Get safe distance from an obstacle point to other obstacles. The calculation uses robot width, minimum turn radius, position of front-left and front right extreeme.
avoidLeft | that is we are turning right |
inner | is it the inner save distance (else outher). Outher includes allowance for turn at maximum turn radius (from avoid.minTurnRadius) |
tight | use tight clearence, rather than the wider normal clearence |
linear | is the pathe linear (as opposed to an arc) If 'tight' is true, the absolute minimum obst clearence distance is used. if 'linear' is true, then turn radius is assumed to be 10 times robot width (almost infinity). |
References frontLeft, frontRight, getMinTurnRad(), obstClearanceDesired, obstClearanceMinimum, UPosition::x, and UPosition::y.
Referenced by UAvoidPath2::avoidToTheLeft(), UAvoidPath2::convertToManSeq(), UAvoidPath2::createAvoidPoinsPath(), UAvoidPath2::createCellBasedPointList(), UAvoidPath2::createMidPathPoints(), UAvoidPath2::getClosestObst2(), UAvoidPath2::insertNewPointAfter(), UAvoidPath2::setPreStopPoint(), UAvoidPath2::setTurnCentre(), UAvoidPath2::validNewClosePoint(), and ~UAvoidParams().
double UAvoidParams::getWallWallRadius | ( | bool | avoidLeft, |
double | turnRadius | ||
) |
Get radius of smallest wall to wall turn circle.
avoidLeft | if true then avoiding an obstacle to the left (i.e. turning right). |
turnRadius | is the actual turnradius. |
References frontLeft, frontRight, UPosition::x, and UPosition::y.
Referenced by ~UAvoidParams().
Is this position within robot envelope plus a margin.
UPose | robot position. |
pos | is position to test. |
margin | to add to envelope - positive makes area bigger. |
References frontLeft, frontRight, UPose::getMapToPose(), UPosition::x, and UPosition::y.
Referenced by UAvoidPath2::validNewClosePoint(), and ~UAvoidParams().
int UAvoidParams::acceptAfterSolution |
Stop calculation after this solution number (debug value), default = 999
Referenced by UAvoidPath2::convertToManSeq(), UAvoidPath2::createMidPathPoints(), and UResAvoid::findPathToHere().
int UAvoidParams::avoidSerial |
Serial number for this obstacle avoidance route
Referenced by UAvoidPath2::findObstAvoidRoute(), UResAvoid::findPathToHere(), and UAvoidParams().
bool UAvoidParams::cellRev2 |
Use new cell-decomposition method
Referenced by UAvoidPath2::findObstAvoidRoute(), UResAvoid::findPathToHere(), UAvoidPath2::groupObstacles(), and UAvoidParams().
bool UAvoidParams::doCrashTest |
When true, then failed paths will survive marked as crashed
Referenced by UResAvoid::findPathToHere(), and UAvoidParams().
double UAvoidParams::driveonGA |
driveon gain for angle
Referenced by UAvoidPath2::findObstAvoidRoute(), UResAvoid::findPathToHere(), getMinTurnRad(), and UAvoidParams().
double UAvoidParams::driveonGD |
driveon gain for distance from line (max equal angle value for 90 deg). The approximated turn angle is (pi/2 * GA / GD)
Referenced by UAvoidPath2::findObstAvoidRoute(), UResAvoid::findPathToHere(), getMinTurnRad(), and UAvoidParams().
UPoseV UAvoidParams::exitPose |
Desired exit pose and speed
Referenced by UAvoidPath2::addLnksToOpenSet(), UAvoidPath2::addStartAndExit(), UAvoidPath2::addToLnkSeqs(), UAvoidPath2::createCellBasedPointList(), UAvoidPath2::createPointList(), UAvoidPath2::extendManoeuvre(), UAvoidCellGraph::findBestCellPath(), UAvoidPath2::findObstAvoidRoute(), UAvoidPath2::findRoutesA(), UAvoidPath2::invalidateObstaclesAtStartAndExit(), UAvoidPath2::setMidPoint(), and UAvoidParams().
bool UAvoidParams::followLineLastPose |
Try to follow line on last pose - usable in row following
Referenced by UAvoidPath2::convertToManSeq(), UAvoidPath2::createPointList(), UResAvoid::findPathToHere(), and UAvoidParams().
double UAvoidParams::forwardOnly |
Allow obstacle avoidance routes that starting within this angle relative to current heading
Referenced by UResAvoid::findPathToHere(), UAvoidPath2::findRoutes(), and UAvoidPath2::findRoutesA().
UPosition UAvoidParams::frontLeft |
Most limiting front left position (x is forwared y is left)
Referenced by UAvoidPath2::convertToManSeq(), UAvoidPath2::createMidPathPoints(), UResAvoid::findPathToHere(), UAvoidPath2::getClosestObst2(), getDiagonal(), getDistToCorner(), getMinOpening(), getSafeDistance(), getWallWallRadius(), UAvoidPath2::setClosestPoint(), UAvoidPath2::setPreStopPoint(), UAvoidParams(), and withinRobotOutline().
UPosition UAvoidParams::frontRight |
Most limiting front right position (x is forwared y is left)
Referenced by UAvoidPath2::convertToManSeq(), UAvoidPath2::createMidPathPoints(), UResAvoid::findPathToHere(), UAvoidPath2::getClosestObst2(), getDiagonal(), getDistToCorner(), getMinOpening(), getSafeDistance(), getWallWallRadius(), UAvoidPath2::setClosestPoint(), UAvoidPath2::setPreStopPoint(), UAvoidParams(), and withinRobotOutline().
int UAvoidParams::ignoreCloseObstAfter |
Debug parameter to ignore close obstacles after this number of avoided obstacles - apart from those in the visibility graph.
Referenced by UAvoidPath2::convertToManSeq(), and UResAvoid::findPathToHere().
ULogFile* UAvoidParams::logAvoid |
Logfile for obstacle avoidance
Referenced by UResAvoid::closeLogAvoid(), UResAvoid::findPathToHere(), UResAvoid::isLogAvoidOpen(), UResAvoid::methodCall(), UResAvoid::methodCallV(), UResAvoid::openLogAvoid(), UAvoidParams(), UResAvoid::UResAvoidInit(), and ~UAvoidParams().
int UAvoidParams::makeCellPolygon |
(debug flag) Make cell polygons 0=not, 1=all, 2=used only
Referenced by UResAvoid::findPathToHere().
double UAvoidParams::makeCellPolygonMaxY |
(debug flag) limit for polygon size for display
Referenced by UResAvoid::findPathToHere().
bool UAvoidParams::makeFootprintPolygon |
(debug flag) Make manoeuvre footprint polygons
Referenced by UResAvoid::findPathToHere().
double UAvoidParams::maxAcceleration |
Maximum lateral acceleration allowed
Referenced by UAvoidPath2::extendManoeuvre(), UResAvoid::findPathToHere(), and UAvoidParams().
int UAvoidParams::maxAvoidLoops |
Maximum number of loops testing for potential mid-poses
Referenced by UResAvoid::findPathToHere(), and UAvoidParams().
int UAvoidParams::maxNestedLevels |
Maximum number of nested levels, that is may a spawned path spawn further
Referenced by UResAvoid::findPathToHere(), and UAvoidParams().
int UAvoidParams::maxSpawnCnt |
Maximum number of spawned paths - in total
Referenced by UResAvoid::findPathToHere(), and UAvoidParams().
int UAvoidParams::maxTangentDepth |
Max number of tangent depth in path search, i.e. how many obstacles could be touched in the visibility graph (to limit search time)
Referenced by UResAvoid::findPathToHere(), UAvoidPath2::findRouteToDest(), UAvoidPath2::logPathSequences(), and UAvoidParams().
int UAvoidParams::maxTangentToMan |
Maximum number of tangent sequences that are tested if no valid manoeuvre can be found for the first tangent sequence
Referenced by UAvoidPath2::findObstAvoidRoute(), and UResAvoid::findPathToHere().
double UAvoidParams::maxTurnAcceleration |
Maximum turn (centrifugal) acceleration allowed
Referenced by UAvoidPath2::extendManoeuvre(), UResAvoid::findPathToHere(), and UAvoidParams().
double UAvoidParams::minTurnRadius |
Minimum turn radius. This is assumed to be a hard limit.
Referenced by UAvoidPath2::expandVisLinesToManSeq(), UAvoidPath2::findObstAvoidRoute(), UResAvoid::findPathToHere(), getMinTurnRad(), and UAvoidParams().
double UAvoidParams::obstClearanceDesired |
Desired minimum obstacle clearence distance
Referenced by UAvoidPath2::convertToManSeq(), UResAvoid::findPathToHere(), UAvoidPath2::getClosestObst2(), getDiagonal(), getSafeDistance(), UAvoidPath2::setPreStopPoint(), and UAvoidParams().
double UAvoidParams::obstClearanceMinimum |
Absolute minimum obstacle clearence distance
Referenced by UAvoidPath2::convertToManSeq(), UAvoidPath2::createMidPathPoints(), UResAvoid::findPathToHere(), UAvoidPath2::getClosestObst2(), getDiagonal(), getMinOpening(), getSafeDistance(), UAvoidPath2::setClosestPoint(), UAvoidParams(), and UAvoidPath2::validNewClosePoint().
double UAvoidParams::obstMinDist |
Minimum distance to obstacles (old method)
Referenced by UResAvoid::findPathToHere(), and UAvoidParams().
double UAvoidParams::obstMinMinDist |
Absolute minimum distance to obstacles (old method)
Referenced by UResAvoid::findPathToHere(), and UAvoidParams().
UReacObstGrps* UAvoidParams::obsts |
Pointer to obstacles that potentially can obstruct the path
Referenced by UAvoidPath2::groupObstacles(), and UAvoidParams().
UReacRoadLines* UAvoidParams::roads |
Potentially available roadlines that should be respected
Referenced by UAvoidParams().
int UAvoidParams::scanSerial |
scannumber of last processed laserscan (for obstacle detection) - debug info
Referenced by UResAvoid::findPathToHere(), and UAvoidCellGraph::makeCellDecomposition().
UPoseV UAvoidParams::startPose |
Start pose for the planning process
Referenced by UAvoidPath2::addStartAndExit(), UAvoidPath2::addToLnkSeqs(), UAvoidPath2::createCellBasedPointList(), UAvoidPath2::createMidPathPoints(), UAvoidCellGraph::findBestCellPath(), UAvoidPath2::findObstAvoidRoute(), UResAvoid::findPathToHere(), UAvoidPath2::findRoutes(), UAvoidPath2::findRoutesA(), UAvoidPath2::invalidateObstaclesAtStartAndExit(), UAvoidPath2::setClosestPoint(), UAvoidParams(), and UAvoidPath2::validNewClosePoint().
bool UAvoidParams::useAnyResult |
Use any result - OK or not (debug flag)
Referenced by UAvoidPath2::findObstAvoidRoute(), and UResAvoid::findPathToHere().
bool UAvoidParams::useDriveon |
use driveon manoeuver estimation, rather the trying to go exactly to the the end pose.
Referenced by UAvoidPath2::extendManoeuvre(), UAvoidPath2::findObstAvoidRoute(), UResAvoid::findPathToHere(), getMinTurnRad(), and UAvoidParams().