AURobotServers  4
Public Member Functions | Public Attributes | List of all members
UAvoidParams Class Reference

#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
 
ULogFilelogAvoid
 
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
 
UReacObstGrpsobsts
 
UReacRoadLinesroads
 
int scanSerial
 
UPoseV startPose
 
bool useAnyResult
 
bool useDriveon
 

Detailed Description

Class with parameters to be used during the path generation, and is linked to all path candidates.

Constructor & Destructor Documentation

UAvoidParams::UAvoidParams ( )

Constructor


Copyright (C) 2010 by DTU (Christian Andersen) jca@o.nosp@m.erst.nosp@m.ed.dt.nosp@m.u.dk

  • This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. *
  • This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. *
  • You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

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.

UAvoidParams::~UAvoidParams ( )
inline

Member Function Documentation

double UAvoidParams::getDiagonal ( bool  avoidLeft,
bool  tight,
double *  diagAngle 
)

get diagonal of vehicle, where the with is extended with the desired cleaence

Parameters
avoidLeftif true, then the front-left corner of vehicle is used. (else ther front right).
tightif true, then the minimum clearence is udes, else the desired clearence.
diagAngleis (if not NULL) the diagonal angle away from forward direction - always positive.
Returns
the diagonal to the desired corner.

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.

Parameters
leftget distance to the front-left corner - else the right corner (if not justMax)
justMaxreturn the bigger distance of either corner.
Returns
a positive distance - no clearence is added.

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.

Returns
the minimum opening width.

References frontLeft, frontRight, obstClearanceMinimum, and UPosition::y.

Referenced by UAvoidPath2::findObstAvoidRoute(), UAvoidPath2::toReplaceOldPoint(), and ~UAvoidParams().

double UAvoidParams::getMinTurnRad ( )
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.

Parameters
avoidLeftthat is we are turning right
inneris it the inner save distance (else outher). Outher includes allowance for turn at maximum turn radius (from avoid.minTurnRadius)
tightuse tight clearence, rather than the wider normal clearence
linearis 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).
Returns
the safe distance from path, where within no obstacles should be found.

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.

Parameters
avoidLeftif true then avoiding an obstacle to the left (i.e. turning right).
turnRadiusis the actual turnradius.
Returns
circle radius for wall to wall circle (no safety space)

References frontLeft, frontRight, UPosition::x, and UPosition::y.

Referenced by ~UAvoidParams().

bool UAvoidParams::withinRobotOutline ( UPose  robot,
UPosition  pos,
double  margin 
)

Is this position within robot envelope plus a margin.

Parameters
UPoserobot position.
posis position to test.
marginto add to envelope - positive makes area bigger.
Returns
true if within.

References frontLeft, frontRight, UPose::getMapToPose(), UPosition::x, and UPosition::y.

Referenced by UAvoidPath2::validNewClosePoint(), and ~UAvoidParams().

Member Data Documentation

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
bool UAvoidParams::doCrashTest

When true, then failed paths will survive marked as crashed

Referenced by UResAvoid::findPathToHere(), and UAvoidParams().

double UAvoidParams::driveonGA
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
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
UPosition UAvoidParams::frontRight
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
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
double UAvoidParams::obstClearanceMinimum
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
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().


The documentation for this class was generated from the following files: