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

#include <urespassable.h>

Inheritance diagram for UResPassable:
Inheritance graph

Public Member Functions

bool addPassableInterval (const int right, const int left, double varMin, double varMin2)
 
void addPassableIntervalParameters ()
 
bool combineNearIntervals (double obstSize, double lowVarLimit)
 
bool doFullAnalysis (ULaserData *laserData, UPose pose, UPosRot laserPose, UObstaclePool *obsts, bool outdoorContext, double obstSearchExt, UResRoadLine *roads)
 
bool doObstAnalysis (ULaserData *laserData, UPose pose, UPosRot laserPose, UObstaclePool *obsts, bool outdoorContext)
 
ULaserPifindPi (int withThisIdx)
 
bool findTopOfRoad (ULaserPi *pp)
 
ULaserPigetPi (int idx)
 
int getPisCnt ()
 
ULaserScangetScan ()
 
void getSettingsFromVarPool ()
 
int makePassableIntervals2 (const int leftLim, const int rightLim)
 
int makePassableIntervalsFit (double *maxPassLeft, double *maxPassRight, FILE *logo, FILE *fdI1, FILE *fdI2)
 
virtual const char * print (const char *preString, char *buff, int buffCnt)
 
bool setScan (ULaserData *source, UPose odoPose, UPosRot *laserPose)
 
 UResPassable ()
 
void UResPassableInit ()
 
virtual ~UResPassable ()
 
- Public Member Functions inherited from UResVarPool
int addMethod (const char *formalName, const char *paramTypes, const char *comment)
 
int addMethodV (const char *formalName, const char *paramTypes, const char *comment)
 
UVarPooladdStruct (const char *name, const char *comment, bool copy=false)
 
UVariableaddVar (const char *name, const double initialValue, const char *type, const char *comment)
 
UVariableaddVar (const char *name, const char *initialValue, const char *type, const char *comment)
 
UVariableaddVarA (const char *name, const char *initialValue, const char *type, const char *comment)
 
bool callGlobal (const char *name, const char *paramOrder, char **strings, const double *doubles, double *value, UDataBase **returnStruct, int *returnStructCnt)
 
bool callGlobalV (const char *name, const char *paramOrder, UVariable **params, UDataBase **returnStruct, int *returnStructCnt)
 Call a method from the root var pool scope It may be in the structure direct (no '.') or in any sub-structure that the 'name.subname' indicate. More...
 
bool callLocal (const char *name, const char *paramOrder, char **strings, const double *doubles, double *value, UDataBase **returnStruct, int *returnStructCnt)
 
bool callVS (const char *function, const char *stringParam)
 
int callVSCD (const char *function, const char *strPar, UDataBase *data, int cooSys)
 
void createBaseVar ()
 
virtual bool createVarSpace (const int varCnt, const int structCnt, const int methCnt, const char *note, bool copy=false)
 
bool getGlobalString (const char *name, const char **value)
 
bool getGlobalValue (const char *name, double *value)
 
bool getGlobalValue (const char *name, const char **value)
 
bool getGlobalValue (const char *name, bool *value)
 
bool getGlobalValue (const char *name, UTime *value)
 
bool getLocalValue (const char *name, double *value)
 get a value in this variable tree More...
 
bool getLocalValue (const char *name, bool *value)
 
bool getLocalValue (const char *name, UTime *value)
 
double getLocalValue (int idx)
 
UPosition getLocalValue3D (int idx)
 
UPosRot getLocalValue6D (int idx)
 
bool getLocalValueBool (int idx)
 
int getLocalValueInt (int idx)
 
UTime getLocalValueTime (int idx)
 
const char * getLogFileName ()
 
const char * getVarDescription (int idx)
 
UVarCalcgetVarPool ()
 
virtual bool gotAllResources (char *missingThese, int missingTheseCnt)
 
bool isLogFileOpen ()
 
bool isLogFileOpen (const char *structName)
 
bool isVarPoolUpdated (int lastCnt, int *newCnt)
 
void logFileClose ()
 
bool logFileOpen ()
 
void logFileStart (const char *structName, bool open)
 
virtual bool methodCall (const char *name, const char *paramOrder, char **strings, const double *doubles, double *value, UDataBase **returnStruct=NULL, int *returnStructCnt=NULL)
 
bool setGlobalVar (const char *name, const double value, bool mayAdd)
 Assigns a value to a variable. The variable may be a part of a structure. More...
 
bool setLocalVar (int idx, double value, const int element)
 
bool setLocalVar (const char *name, const double value, bool mayAdd)
 Assigns a value to a variable. The variable may be a part of a structure. More...
 
bool setLocalVar3D (int idx, UPosition *value)
 
bool setLocalVar6D (int idx, UPosRot *value)
 
bool setLocalVarAdd (int idx, double value, const int element)
 
bool setLocalVarPose (int idx, UPose *value)
 
virtual bool setResource (UResBase *resource, bool remove)
 
void setVarPool (UVarCalc *sharedVarPool)
 
int updateQTvars (int structIdx)
 
 UResVarPool ()
 
virtual ~UResVarPool ()
 
- Public Member Functions inherited from UResBase
void createReplayVar (UVarPool *pool)
 
virtual void createResources ()
 
UCmdExegetCorePointer ()
 
char * getLogFileName (char *fn, const int fnCnt)
 
int getResFuncIdx ()
 
const char * getResID ()
 
int getResVersion ()
 
bool isA (const char *idStr)
 
bool isAlsoA (const char *id)
 
virtual void print (const char *preString)
 
virtual void saveSettings ()
 
void setCorePointer (UCmdExe *serverCore)
 
void setResFuncIdx (int idx)
 
virtual void setResID (const char *id, const int version)
 
virtual void stop (bool)
 
virtual void updateReplayStatus ()
 
 UResBase ()
 
virtual ~UResBase ()
 
- Public Member Functions inherited from UReplay
void addChild (UReplay *child)
 
virtual bool decodeReplayLine (char *)
 
char * getLogFileName (char *fn, const int fnCnt)
 
char * getReplayFileName (char *fn, const int fnCnt)
 
int getReplayLogLine ()
 
bool isReplay ()
 
bool isReplayFileOpen ()
 
void removeChild (UReplay *child)
 
virtual void replayAdvanceTime (UTime untilTime)
 
void replaySetBaseFileName (const char *name, const char *preName="")
 
void replaySetFileName (const char *name)
 
virtual bool replayStep ()
 
int replayStep (int steps)
 
virtual bool replayToTime (UTime untilTime)
 
void setParent (UReplay *parent)
 
bool setReplay (bool value)
 
 UReplay ()
 
virtual ~UReplay ()
 
- Public Member Functions inherited from ULock
bool lock ()
 
void lockInit ()
 
void post ()
 
bool tryLock ()
 
bool tryWait ()
 
 ULock ()
 
void unlock ()
 
bool wait ()
 
 ~ULock ()
 
- Public Member Functions inherited from UVarMethodImplement
virtual bool methodCallV (const char *name, const char *paramOrder, UVariable *params[], UDataBase **returnStruct, int *returnStructCnt)
 
virtual ~UVarMethodImplement ()
 

Static Public Member Functions

static const char * getResClassID ()
 
- Static Public Member Functions inherited from UResVarPool
static const char * getResClassID ()
 

Protected Attributes

int iEndDist
 
int iHeight
 
int iInside
 
int iMaxVar
 
int iMeasureDist
 
double lineFitConvexFac
 
double lineFitConvexOffset
 
double lineFitEndpointDev
 
int lineFitMinCnt
 
double lineFitVarLimit
 
double lineFitWidth
 
double lineFitXTiltLimit
 
double lineFitZTiltLimit
 
bool lineSmoothSettings
 
bool lineUseCombine
 
double minCombinedSegmentWidth
 
ULaserPi pis [MAX_PASSABLE_INTERVALS_PR_SCAN]
 
int pisCnt
 
ULaserScanscan
 
UPosRotsensorPose
 
UVariablevarConvexFac
 
UVariablevarConvexOffset
 
UVariablevarFitEndDev
 
UVariablevarFitXTiltLimit
 
UVariablevarFitZTiltLimit
 
UVariablevarIgnoreIfFixed
 
UVariablevarMinCombinedWidth
 
UVariablevarMinObstDist
 
UVariablevarRoughMinCnt
 
UVariablevarRoughSDLimit
 
UVariablevarRoughWidth
 
UVariablevarUseIntervalCombiner
 
UVariablevarUseSmoothSettings
 
- Protected Attributes inherited from UResBase
int resFuncIdx
 
char resID [MAX_RESOURCE_ID_LENGTH]
 
char resIsAlso [MAX_RESOURCE_ISALSO_LENGTH]
 
int resVersion
 
- Protected Attributes inherited from UReplay
bool replay
 
FILE * replayFile
 
char replayFileName [REPLAY_FILE_NAME_LENGTH]
 replay filename More...
 
char replayLine [MAX_LOG_LINE_LENGTH]
 
int replayLogLine
 
UReplayreplayParent
 
UTime replayTimeNext
 

Additional Inherited Members

- Public Attributes inherited from UReplay
bool replayTimeAdvancePending
 
UTime replayTimeNow
 
- Protected Member Functions inherited from UResVarPool
void setDescription (const char *note, bool copy=false)
 
- Protected Member Functions inherited from UResBase
UResBasegetStaticResource (const char *resName, bool mayCreate, bool staticOnly=true)
 get a pointer to a static resource. More...
 
- Static Protected Attributes inherited from UReplay
static const int MAX_LOG_LINE_LENGTH = 10000
 
static const int REPLAY_FILE_NAME_LENGTH = 264
 max length of replay filename More...
 

Detailed Description

This is the shared resource class. It must enherit from the resource base class (or one of its decendent) as shown.

Author
Christian Andersen

Constructor & Destructor Documentation

UResPassable::UResPassable ( )
inline
UResPassable::~UResPassable ( )
virtual

Destructor

References sensorPose.

Referenced by UResPassable().

Member Function Documentation

bool UResPassable::addPassableInterval ( const int  right,
const int  left,
double  varMin,
double  varMin2 
)

Add a new passable interval to scan. The position left and right are both included in the interval. 'varMin' is the minimum half-robot-width variance for the interval.

Todo:
ULaserScan::addPassableInterval overwriting last interval if list is full; should be better than that?

References MAX_PASSABLE_INTERVALS_PR_SCAN, pis, pisCnt, PQ_ROUGH, scan, ULaserPi::setInterval(), and ULaserScan::setQ().

Referenced by getPi(), and makePassableIntervals2().

void UResPassable::addPassableIntervalParameters ( )
bool UResPassable::combineNearIntervals ( double  obstSize,
double  lowVarLimit 
)

Combine near intervals if they are close, and the split is not blocked by a major obstacle. 'obstSize is in meter hight ABOVE passable areas. 'lowVarLimit' is lower limit of variance, when compareing two intervals (if actual variance limit is lower than this, then this variance is used.)

max difference in variance for two intervals

References ULaserPi::getLeft(), ULineSegment::getOtherEnd(), ULaserScan::getPos(), ULaserPi::getRight(), ULaserPi::getSegment(), ULaserPi::getVarMin(), ULaserPi::getVarMin2(), UPosRot::getZ(), limitToPi(), MIN_MEASUREMENTS_PER_PI, mind(), pis, pisCnt, scan, sensorPose, ULaserPi::setInterval(), sortPis(), ULine::vec, UPosition::x, and UPosition::y.

Referenced by getPi(), and makePassableIntervalsFit().

bool UResPassable::doFullAnalysis ( ULaserData laserData,
UPose  pose,
UPosRot  laserPose,
UObstaclePool obsts,
bool  outdoorContext,
double  obstSearchExt,
UResRoadLine roads 
)

Set parameters used for calculationg variance and detection of passable intervals Analyze scandata and make passable intervals and obstacles. Obstacles are searched up to 'obstSearchExt' further away than most distant passable interval.

References ULaserScan::findNearObstacles(), UVariable::getBool(), ULaserData::getMaxValidRange(), ULaserData::getScanTime(), ULaserData::getSerial(), getSettingsFromVarPool(), UVariable::getValued(), lineFitMinCnt, lineFitWidth, makePassableIntervalsFit(), pis, pisCnt, scan, UPoseTime::setPt(), setScan(), ULaserScan::setVariance(), UResRoadLine::update(), varIgnoreIfFixed, and varMinObstDist.

Referenced by getPi(), and UFunctionPassable::handlePass().

bool UResPassable::doObstAnalysis ( ULaserData laserData,
UPose  pose,
UPosRot  laserPose,
UObstaclePool obsts,
bool  outdoorContext 
)

analize for obstacles only, assuming the laserscanner is horisintal alligned

Parameters
laserDatalaserscan to be analized
poserobot pose at scantime
laserPosethe position and orientation (6D) of laser scanner
obstsis the obstacle pool, where the obstacles are to be delivered.
outdoorContextif true obstacles are combined on distance (~0.6 m), else much tighter correlation (0.2m), to avoid to combine wincave walls.
Returns
true

References ULaserScan::findNearObstacles(), UVariable::getBool(), ULaserData::getMaxValidRange(), UResPoseHist::getNewest(), UResPoseHist::getOdoPoseOrigin(), ULaserData::getScanTime(), getSettingsFromVarPool(), UResBase::getStaticResource(), UVariable::getValued(), scan, UVariable::setPose(), UPoseTime::setPt(), setScan(), varIgnoreIfFixed, and varMinObstDist.

Referenced by getPi(), and UFunctionPassable::handlePass().

ULaserPi * UResPassable::findPi ( int  withThisIdx)

Get the passable interval (if any), that includes this measurement index point

References ULaserPi::getLeft(), ULaserPi::getRight(), pis, and pisCnt.

Referenced by ULaserPi::findEdgeObstacles(), and getPi().

bool UResPassable::findTopOfRoad ( ULaserPi pp)
ULaserPi* UResPassable::getPi ( int  idx)
inline
int UResPassable::getPisCnt ( )
inline

Get number of passable intervals

References pisCnt.

Referenced by UFunctionPassable::handlePass().

static const char* UResPassable::getResClassID ( )
inlinestatic

Fixed name of this resource type

References addPassableIntervalParameters(), getSettingsFromVarPool(), print(), and setScan().

Referenced by UResPassable().

ULaserScan* UResPassable::getScan ( )
inline

Get new data into ULaserScan.

References scan.

Referenced by UFunctionPassable::handlePass().

void UResPassable::getSettingsFromVarPool ( )
int UResPassable::makePassableIntervals2 ( const int  leftLim,
const int  rightLim 
)
int UResPassable::makePassableIntervalsFit ( double *  maxPassLeft,
double *  maxPassRight,
FILE *  logo,
FILE *  fdI1,
FILE *  fdI2 
)
const char * UResPassable::print ( const char *  preString,
char *  buff,
int  buffCnt 
)
virtual

print status to a string buffer

Reimplemented from UResVarPool.

References pis, pisCnt, and ULaserPi::print().

Referenced by getResClassID().

bool UResPassable::setScan ( ULaserData source,
UPose  odoPose,
UPosRot laserPose 
)
void UResPassable::UResPassableInit ( )

Member Data Documentation

int UResPassable::iEndDist
protected
int UResPassable::iHeight
protected

Is context indoor or outdoor Statistics

Referenced by makePassableIntervals2(), and UResPassableInit().

int UResPassable::iInside
protected
int UResPassable::iMaxVar
protected
int UResPassable::iMeasureDist
protected
double UResPassable::lineFitConvexFac
protected

Factor used when combining variance and line curvature, in order to favor convex road shapes.

Referenced by getSettingsFromVarPool().

double UResPassable::lineFitConvexOffset
protected

Favor convex shaped roads, by adding this value to the signed distance from one of the end-points to the fittet line

Referenced by getSettingsFromVarPool(), and makePassableIntervals2().

double UResPassable::lineFitEndpointDev
protected

Maximum deviation of endpoints of a passable interval relative to the minimum line-fit variance in the passable interval

Referenced by getSettingsFromVarPool(), and makePassableIntervals2().

int UResPassable::lineFitMinCnt
protected

Minimum number of measurements in a segment for roughness calculation

Referenced by doFullAnalysis(), and getSettingsFromVarPool().

double UResPassable::lineFitVarLimit
protected

Parameter for detection of passable interval If line fit variance is above this limit a passable interval can not be found here

Referenced by getSettingsFromVarPool(), and makePassableIntervals2().

double UResPassable::lineFitWidth
protected

width of line segment used for calculation of roughness

Referenced by doFullAnalysis(), and getSettingsFromVarPool().

double UResPassable::lineFitXTiltLimit
protected

Tilt limit for final passable intervals using y-x coordinate reference

Referenced by getSettingsFromVarPool(), and makePassableIntervals2().

double UResPassable::lineFitZTiltLimit
protected

Tilt limit for final passable intervals when using y-z coordinate reference (value <= laser tilt)

Referenced by findTopOfRoad(), getSettingsFromVarPool(), and makePassableIntervalsFit().

bool UResPassable::lineSmoothSettings
protected

Use tresholds that favor flat smooth surfaces

  • i.e. more sensitive to faults.

Referenced by getSettingsFromVarPool(), makePassableIntervals2(), and makePassableIntervalsFit().

bool UResPassable::lineUseCombine
protected

Debug flag to possibly disable combiner

Referenced by getSettingsFromVarPool(), and makePassableIntervalsFit().

double UResPassable::minCombinedSegmentWidth
protected

Minimum combined segment width

Referenced by getSettingsFromVarPool(), and makePassableIntervalsFit().

ULaserPi UResPassable::pis[MAX_PASSABLE_INTERVALS_PR_SCAN]
protected
int UResPassable::pisCnt
protected
ULaserScan* UResPassable::scan
protected
UPosRot* UResPassable::sensorPose
protected

Sensor data for robot

Referenced by combineNearIntervals(), setScan(), UResPassableInit(), and ~UResPassable().

UVariable* UResPassable::varConvexFac
protected
UVariable* UResPassable::varConvexOffset
protected
UVariable* UResPassable::varFitEndDev
protected
UVariable* UResPassable::varFitXTiltLimit
protected
UVariable* UResPassable::varFitZTiltLimit
protected
UVariable* UResPassable::varIgnoreIfFixed
protected
UVariable* UResPassable::varMinCombinedWidth
protected
UVariable* UResPassable::varMinObstDist
protected

Group of fixed obstacles from a-priori map (mapbase) parameter for obstacle detection

Referenced by addPassableIntervalParameters(), doFullAnalysis(), and doObstAnalysis().

UVariable* UResPassable::varRoughMinCnt
protected
UVariable* UResPassable::varRoughSDLimit
protected
UVariable* UResPassable::varRoughWidth
protected
UVariable* UResPassable::varUseIntervalCombiner
protected
UVariable* UResPassable::varUseSmoothSettings
protected

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