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

Public Member Functions

void clearPoly ()
 clear detections More...
 
void createGlobalVariables (UVarPool *vp)
 create global variables More...
 
int doDetect (ULaserData *data, int polySys, UMatrix4 *mRS, UMatrix4 *mSR, UMatrix4 *mRG)
 
void setBox (const char *boxname, int idx, double x1, double y1, double x2, double y2, UMatrix4 *mRO)
 
void setCornersAsPolygon (UMatrix4 *mRG)
 
 UNamedBox ()
 

Public Attributes

double area
 area of box - if 0, then box is invalid More...
 
UPolygon cornerPolygon
 corner polygon More...
 
UPosRotlaserPose
 laser scanner pose More...
 
UVarPoolparentStruct
 parent structure for global variables More...
 
UPolygon poly
 polygon with detections More...
 
UVariablevarBoxLimits
 box definition in laser scanner coordinates More...
 
UVariablevarCooSys
 selected coordinate system More...
 
UVariablevarDetections
 detections More...
 
UVariablevarDetectMinMaxCoo
 detection limits in selected coordinate system coordinates More...
 
UVariablevarDetectMinMaxRob
 detection limits in robot coordinates More...
 
UVariablevarName
 name of structure More...
 

Detailed Description

Class with one detect box

Constructor & Destructor Documentation

UNamedBox::UNamedBox ( )
inline

References UPolygon::setSize().

Member Function Documentation

void UNamedBox::clearPoly ( )
inline

clear detections

References UPolygon::clear().

Referenced by UNamedBoxes::doDetect().

void UNamedBox::createGlobalVariables ( UVarPool vp)
inline

create global variables

References UVarPool::addVar(), and UVarPool::addVarA().

Referenced by UNamedBoxes::addBox().

int UNamedBox::doDetect ( ULaserData data,
int  polySys,
UMatrix4 mRS,
UMatrix4 mSR,
UMatrix4 mRG 
)
inline

test if there are detections within boxex for this scan.

Parameters
datais pointer to laser scan detections.
noPolyif true, then no displayable polygon is generated.
mRSis conversion matrix from Robot to Sensor coordinates.
mSRis conversion matrix from Sensor to Robot coordinates.
mRGis conversion matrix from Robot to selected (global) coordinate system.
Returns
number of detections inside the defined box.

References UPolygon::add(), UPolygon::clear(), UPosition::clear(), UPolygon::copyPointsTo(), UPolygon::extractConvexTo(), ULaserData::get2d(), UVariable::getDouble(), UPolygon::getLimits(), UPolygon::getPoints(), UPolygon::getPointsCnt(), ULaserData::getRangeCnt(), U2Dpos::length(), UPolygon::setAsPolygon(), setCornersAsPolygon(), UVariable::setDouble(), UVariable::setInt(), U2Dpos::x, UPosition::x, U2Dpos::y, and UPosition::y.

Referenced by UNamedBoxes::doDetect().

void UNamedBox::setBox ( const char *  boxname,
int  idx,
double  x1,
double  y1,
double  x2,
double  y2,
UMatrix4 mRO 
)
inline

set box

Parameters
boxnamename of box - used as polygon name
idxis the index or box number
x1,y1,x2,y2is the corner coordinates in robot coordinates.
mROcoordinate conversion matrix to odometry coordinates

References UPolygon::color, setCornersAsPolygon(), UVariable::setValued(), UVariable::setValues(), UPosition::x, and UPosition::y.

Referenced by UNamedBoxes::addBox().

void UNamedBox::setCornersAsPolygon ( UMatrix4 mRG)
inline

get box corners as polygon

Parameters
boxpolyis the destination polygon.
mCCis the converion matrix to convert the coordinates (no conversion if NULL)

References UPolygon::add(), UPolygon::clear(), UPolygon::color, UVariable::getDouble(), UPolygon::getPoints(), UPolygon::getPointsCnt(), UPolygon::setAsPolygon(), UPosition::x, and UPosition::y.

Referenced by doDetect(), and setBox().

Member Data Documentation

double UNamedBox::area

area of box - if 0, then box is invalid

Referenced by UNamedBoxes::addBox().

UPolygon UNamedBox::cornerPolygon

corner polygon

Referenced by UFuncLaserBox::handleCommand().

UPosRot* UNamedBox::laserPose

laser scanner pose

UVarPool* UNamedBox::parentStruct

parent structure for global variables

Referenced by UNamedBoxes::doDetect().

UPolygon UNamedBox::poly

polygon with detections

Referenced by UFuncLaserBox::handleCommand().

UVariable* UNamedBox::varBoxLimits

box definition in laser scanner coordinates

UVariable* UNamedBox::varCooSys

selected coordinate system

Referenced by UNamedBoxes::doDetect().

UVariable* UNamedBox::varDetections

detections

Referenced by UFuncLaserBox::handleCommand().

UVariable* UNamedBox::varDetectMinMaxCoo

detection limits in selected coordinate system coordinates

UVariable* UNamedBox::varDetectMinMaxRob

detection limits in robot coordinates

UVariable* UNamedBox::varName

name of structure

Referenced by UNamedBoxes::findNamedBox(), and UFuncLaserBox::handleCommand().


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