AURobotServers  4
Public Member Functions | Public Attributes | Protected Attributes | Static Protected Attributes | List of all members
UAvoidPathPool Class Reference

#include <ureactivepath.h>

Inheritance diagram for UAvoidPathPool:
Inheritance graph

Public Member Functions

UReactivePathfindPathToHere (UPoseV exitPose, UReacObstGrps *obsts, UReacRoadLines *roads, bool ignoreObstacles, bool directTestOnly, bool driveon, double turnRad)
 
UAvoidPath2findPathToHere2 (UPoseV exitPose, UReacObstGrps *obsts, UReacRoadLines *roads, bool ignoreObstacles, bool debugDump)
 
UAvoidPath2getAvoidPath (int index)
 
int getAvoidPathsCnt ()
 
bool getCrashTest ()
 
double getMaxAcc ()
 
int getMaxAvoidLoops ()
 
int getMaxNestedLevels ()
 
int getMaxSpawnCnt ()
 
double getMaxTurnAcc ()
 
double getMinTurnRad ()
 
UAvoidPath2getNewAvoidPath ()
 
UReactivePathgetNewPath ()
 
double getObstMinDist ()
 
double getObstMinMinDist ()
 
UAvoidParamsgetParamStruct ()
 
UReactivePathgetPath (int index)
 
int getPathsCnt ()
 
UPose getStartPose ()
 
UPoseV getStartPoseVel ()
 
int getValidAvoidPathsCnt ()
 
int getValidPathsCnt ()
 
void setAvoidSerial (int serial)
 
void setDistanceLimits (double minDist, double minMinDist)
 
void setFrontLeft (UPosition value)
 
void setFrontRight (UPosition value)
 
void setStartPose (UPose pose, double velocity)
 
 UAvoidPathPool ()
 
 ~UAvoidPathPool ()
 
- Public Member Functions inherited from ULock
bool lock ()
 
void lockInit ()
 
void post ()
 
bool tryLock ()
 
bool tryWait ()
 
 ULock ()
 
void unlock ()
 
bool wait ()
 
 ~ULock ()
 

Public Attributes

UAvoidParams par
 

Protected Attributes

UAvoidPath2 avoidPaths [MAX_PATHS_IN_POOL]
 
int avoidPathsCnt
 
int pathBest
 
UReactivePath paths [MAX_PATHS_IN_POOL]
 
int pathsCnt
 

Static Protected Attributes

static const int MAX_PATHS_IN_POOL = 20
 

Detailed Description

UAvoidPathPool holds an array of path alternatives and the functionality to select one of these as the best choice.

Constructor & Destructor Documentation

UAvoidPathPool::UAvoidPathPool ( )

Constructor

UAvoidPathPool::~UAvoidPathPool ( )

Destructor

Member Function Documentation

UReactivePath * UAvoidPathPool::findPathToHere ( UPoseV  exitPose,
UReacObstGrps obsts,
UReacRoadLines roads,
bool  ignoreObstacles,
bool  directTestOnly,
bool  driveon,
double  turnRad 
)

Find path to this destination, avoiding obstacles and road edges

Parameters
directTestOnlytest only
driveonwhen true, replaces the pose destination with a line destination - as the drive and driveon commands.
turnRadis the drive-on turn radius
Returns
pointer to OK path or NULL if none

References UReactivePath::clear(), UReactivePath::findObstAvoidRoute(), UReactivePath::getManSeq(), UReactivePath::getManTime(), UReactivePath::isACrash(), UReactivePath::isValid(), ULock::lock(), UReactivePath::setExitPose(), and UReactivePath::setPathUsed().

Referenced by UResAvoid::findPathToHere().

UAvoidPath2 * UAvoidPathPool::findPathToHere2 ( UPoseV  exitPose,
UReacObstGrps obsts,
UReacRoadLines roads,
bool  ignoreObstacles,
bool  debugDump 
)

Find path to this destination, avoiding obstacles (and road edges) using a new method more directly based on visibility graph (simplified)

Parameters
debugDumpis a flag, that will generate some data-dump to logfile (if open).

References UAvoidPath2::clear(), UAvoidPath2::findObstAvoidRoute(), UReacObstGrps::getGroup(), UReacObstGrps::getGroupsCnt(), UAvoidPath2::getManSeq(), UAvoidPath2::isACrash(), UAvoidPath2::isValid(), ULock::lock(), UAvoidPath2::setPar(), UAvoidPath2::setPathUsed(), and UAvoidPath2::setValid().

Referenced by UResAvoid::findPathToHere().

UAvoidPath2* UAvoidPathPool::getAvoidPath ( int  index)
inline

Get specific (rev2) path. (NB! no range check)

Referenced by UFunctionAvoid::sendCurrentAvoidPath().

int UAvoidPathPool::getAvoidPathsCnt ( )
inline

Get number of calculated (rev2) paths

Referenced by UFunctionAvoid::sendCurrentAvoidPath().

bool UAvoidPathPool::getCrashTest ( )
inline

Is crashed paths to survive for analysis

Referenced by UReactivePath::avoidObst(), and UReactivePath::findObstAvoidRoute().

double UAvoidPathPool::getMaxAcc ( )
inline

Set other limiting parameters for the path evaluation. Units are in SI units (meter and sec) Get max lateral acceleration

Referenced by UReactivePath::findObstAvoidRoute().

int UAvoidPathPool::getMaxAvoidLoops ( )
inline

Get max obstacle avoidance loops when finding new mid-poses

Referenced by UReactivePath::avoidObst().

int UAvoidPathPool::getMaxNestedLevels ( )
inline

Get max nested levels when searching a path left and right around obstacles

Referenced by UReactivePath::avoidObst().

int UAvoidPathPool::getMaxSpawnCnt ( )
inline

Get max spawnned paths when searching for an obstacle avoidance path

Referenced by UReactivePath::avoidObst().

double UAvoidPathPool::getMaxTurnAcc ( )
inline

Get max turn acceleration

Referenced by UReactivePath::findObstAvoidRoute().

double UAvoidPathPool::getMinTurnRad ( )
inline

Get minimum turn radius - fail manoeuvre if less is needed

Referenced by UReactivePath::findObstAvoidRoute().

UAvoidPath2 * UAvoidPathPool::getNewAvoidPath ( )

Get pointer to new unused UAvoidPathPool entry. A path may be used by e.g. implementation process. This function will then try the next available unlocked path entry. The path will be unlocked once implemented or discarded for other reasons.

Returns
an unlocked path - if anymore is available, else NULL.

References UAvoidPath2::getManSeq(), UAvoidPath2::isValid(), UAvoidPath2::setPathUsed(), UAvoidPath2::setValid(), ULock::tryLock(), and ULock::unlock().

UReactivePath * UAvoidPathPool::getNewPath ( )
double UAvoidPathPool::getObstMinDist ( )
inline

Get minimum distance to obstacle

Referenced by UReactivePath::avoidObst().

double UAvoidPathPool::getObstMinMinDist ( )
inline

Get minimum distance to obstacle

Referenced by UReactivePath::avoidObst().

UAvoidParams* UAvoidPathPool::getParamStruct ( )
inline

Get pointer to obstacle avoidance parameters - to assign new values

Referenced by UResAvoid::findPathToHere().

UReactivePath* UAvoidPathPool::getPath ( int  index)
inline

Get specific path. (NB! no range check)

Referenced by UFunctionAvoid::sendCurrentPath().

int UAvoidPathPool::getPathsCnt ( )
inline

Get number of calculated paths

Referenced by UFunctionAvoid::sendCurrentPath().

UPose UAvoidPathPool::getStartPose ( )
inline

Get the start pose for all paths

UPoseV UAvoidPathPool::getStartPoseVel ( )

Get start pose and velocity

References UPoseV::set().

Referenced by UReactivePath::findObstAvoidRoute().

int UAvoidPathPool::getValidAvoidPathsCnt ( )

Get number valid paths of type UAvoidPath (rev2 path). Invalid paths do not count.

References UAvoidPath2::isValid().

Referenced by UResAvoid::findPathToHere(), and UFunctionAvoid::sendCurrentAvoidPath().

int UAvoidPathPool::getValidPathsCnt ( )

Get number valid paths. Invalid paths do not count.

References UReactivePath::isValid().

Referenced by UResAvoid::findPathToHere(), and UFunctionAvoid::sendCurrentPath().

void UAvoidPathPool::setAvoidSerial ( int  serial)
inline

Set the start pose for all paths

void UAvoidPathPool::setDistanceLimits ( double  minDist,
double  minMinDist 
)
inline

Set safety distance limits

void UAvoidPathPool::setFrontLeft ( UPosition  value)
inline

Set most limiting front-left position

void UAvoidPathPool::setFrontRight ( UPosition  value)
inline

Set most limiting front-right position

void UAvoidPathPool::setStartPose ( UPose  pose,
double  velocity 
)
inline

Set the start pose for all paths

Member Data Documentation

UAvoidPath2 UAvoidPathPool::avoidPaths[MAX_PATHS_IN_POOL]
protected

New avoid path method

int UAvoidPathPool::avoidPathsCnt
protected

Number of used paths

const int UAvoidPathPool::MAX_PATHS_IN_POOL = 20
staticprotected

Number of alternative paths in path pool

UAvoidParams UAvoidPathPool::par
int UAvoidPathPool::pathBest
protected

Best path

UReactivePath UAvoidPathPool::paths[MAX_PATHS_IN_POOL]
protected

Pool of alternative paths

int UAvoidPathPool::pathsCnt
protected

Number of used paths


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