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

#include <uroadline.h>

Public Member Functions

void clear (int edge)
 
double getDistanceSD (UPosition *pos)
 
double getEstSD ()
 
double getEstVar ()
 
ULineSegmentgetLine ()
 
unsigned long getLineSerial ()
 
int getLineType ()
 
int getPisIdx ()
 
UPoseTime getPose ()
 
double getQual ()
 
unsigned long getScanSerial ()
 
int getUpdateCnt ()
 
bool isA (int lineType)
 
bool isValid ()
 
void postUpdate (unsigned int scan, UPoseTime *pose, bool moving)
 
void setNew (UPosition pos, UPoseTime pose, unsigned long scan, int piIdx, unsigned long roadSerial)
 
void update (UPosition pos, UPoseTime pose, unsigned long scan, bool moving, int piIdx)
 
 URoadLine ()
 
 ~URoadLine ()
 

Public Attributes

int pisIdx
 

Protected Attributes

int edge
 
ULineSegment line
 
unsigned long lineSerial
 
UPoseTime odoPose
 
double pL
 
double pR
 
unsigned long scanSerial
 
int updateCnt
 
bool valid
 
double xR
 

Detailed Description

Holds information on one road line

    @author Christian <chrand@mail.dk>

Constructor & Destructor Documentation

URoadLine::URoadLine ( )

Constructor

References clear().

URoadLine::~URoadLine ( )

Destructor

Member Function Documentation

void URoadLine::clear ( int  edge)

Reset line filter

References edge, lineSerial, pL, pR, scanSerial, sqr(), updateCnt, valid, and xR.

Referenced by UResRoadLine::update(), and URoadLine().

double URoadLine::getDistanceSD ( UPosition pos)

Get distance to this position in number of SDs

References ULine::getDistanceSq(), line, and xR.

Referenced by getLineType().

double URoadLine::getEstSD ( )
inline

Get line quality (1 is pefect)

References pL.

Referenced by UResRoadLine::updateRoadVariables().

double URoadLine::getEstVar ( )
inline

Get estimated line SD

References xR.

Referenced by UResRoadLine::update().

ULineSegment* URoadLine::getLine ( )
inline
unsigned long URoadLine::getLineSerial ( )
inline

Get scan serial number

References lineSerial, scan, setNew(), and update().

Referenced by UFunctionPassable::sendRoadLines().

int URoadLine::getLineType ( )
inline

Is line a left (0), centre (1) or right line (2)

References edge, and getDistanceSD().

Referenced by UResRoadLine::findCurrentRoad(), UFunctionPassable::sendRoadLines(), and UResRoadLine::update().

int URoadLine::getPisIdx ( )
inline

Get number of updates for line

Referenced by URoad::setRoadQ().

UPoseTime URoadLine::getPose ( )
inline

Get pose at last update

References odoPose, and postUpdate().

double URoadLine::getQual ( )
inline
unsigned long URoadLine::getScanSerial ( )
inline
int URoadLine::getUpdateCnt ( )
inline
bool URoadLine::isA ( int  lineType)
inline

Is line a left, centre or right line

References edge.

Referenced by UResRoadLine::findCurrentRoad2(), and UResRoadLine::update().

bool URoadLine::isValid ( )
inline
void URoadLine::postUpdate ( unsigned int  scan,
UPoseTime pose,
bool  moving 
)

Line maintenance, i.e. drop invalid lines

References absi(), mini(), odoPose, pL, scanSerial, sqr(), UPoseTime::t, updateCnt, valid, and xR.

Referenced by getPose(), and UResRoadLine::postUpdate().

void URoadLine::setNew ( UPosition  pos,
UPoseTime  pose,
unsigned long  scan,
int  piIdx,
unsigned long  roadSerial 
)

Create new line with this new edge estimate

References UPose::h, ULineSegment::length, line, lineSerial, odoPose, pisIdx, pL, pR, scan, scanSerial, ULine::set2D(), sqr(), updateCnt, valid, UPosition::x, xR, and UPosition::y.

Referenced by getLineSerial(), and UResRoadLine::update().

void URoadLine::update ( UPosition  pos,
UPoseTime  pose,
unsigned long  scan,
bool  moving,
int  piIdx 
)

Member Data Documentation

int URoadLine::edge
protected

Edge 0=left 1=center 2=right

Referenced by clear(), getLineType(), and isA().

ULineSegment URoadLine::line
protected

Estimated road line

Referenced by getDistanceSD(), getLine(), setNew(), and update().

unsigned long URoadLine::lineSerial
protected

Unique serial number for road - for correlation at client end

Referenced by clear(), getLineSerial(), and setNew().

UPoseTime URoadLine::odoPose
protected

Updated from this robot pose (and time)

Referenced by getPose(), postUpdate(), setNew(), and update().

int URoadLine::pisIdx

index pf last apassable interval updating this line

Referenced by UFunctionPassable::sendRoadLines(), setNew(), and update().

double URoadLine::pL
protected

Estimate cvariance of line segment

Referenced by clear(), getEstSD(), getQual(), postUpdate(), setNew(), and update().

double URoadLine::pR
protected

Referenced by clear(), setNew(), and update().

unsigned long URoadLine::scanSerial
protected

index of this line Updated by scan number

Referenced by clear(), getScanSerial(), postUpdate(), setNew(), and update().

int URoadLine::updateCnt
protected

Number of updates to this line

Referenced by clear(), getQual(), getUpdateCnt(), postUpdate(), setNew(), and update().

bool URoadLine::valid
protected

Is line valie

Referenced by clear(), isValid(), postUpdate(), and setNew().

double URoadLine::xR
protected

Estimated variance

Referenced by clear(), getDistanceSD(), getEstVar(), postUpdate(), setNew(), and update().


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