AURobotServers
4
|
#include <uroadline.h>
Public Member Functions | |
void | clear (int edge) |
double | getDistanceSD (UPosition *pos) |
double | getEstSD () |
double | getEstVar () |
ULineSegment * | getLine () |
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 |
Holds information on one road line
@author Christian <chrand@mail.dk>
URoadLine::URoadLine | ( | ) |
Constructor
References clear().
URoadLine::~URoadLine | ( | ) |
Destructor
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().
|
inline |
|
inline |
|
inline |
Get estimated road line as sine segment
References line.
Referenced by UResRoadLine::findCurrentRoad(), UResRoadLine::findCurrentRoad2(), UFunctionPassable::sendRoadLines(), URoad::setRoadQ(), UResRoadLine::update(), and UResRoadLine::updateRoadVariables().
|
inline |
Get scan serial number
References lineSerial, scan, setNew(), and update().
Referenced by UFunctionPassable::sendRoadLines().
|
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().
|
inline |
Get number of updates for line
Referenced by URoad::setRoadQ().
|
inline |
Get pose at last update
References odoPose, and postUpdate().
|
inline |
Get line quality (1 is pefect)
References mini(), pL, and updateCnt.
Referenced by UResRoadLine::findCurrentRoad(), UFunctionPassable::sendRoadLines(), URoad::setRoadQ(), and UResRoadLine::updateRoadVariables().
|
inline |
Get scan serial number
References scanSerial.
Referenced by UFunctionPassable::sendRoadLines(), UResRoadLine::update(), and UResRoadLine::updateRoadVariables().
|
inline |
Get number of updates for line
References updateCnt.
Referenced by UResRoadLine::findCurrentRoad(), UResRoadLine::findCurrentRoad2(), UFunctionPassable::sendRoadLines(), UResRoadLine::update(), and UResRoadLine::updateRoadVariables().
|
inline |
Is line a left, centre or right line
References edge.
Referenced by UResRoadLine::findCurrentRoad2(), and UResRoadLine::update().
|
inline |
Is line valie
References valid.
Referenced by UResRoadLine::findCurrentRoad(), UResRoadLine::postUpdate(), UFunctionPassable::sendRoadLines(), and UResRoadLine::update().
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 | ||
) |
Update the line estimate with this position
References UPose::getDistance(), ULine::getPositionOnLine(), ULineSegment::length, line, odoPose, pisIdx, pL, ULine::pos, pR, scan, scanSerial, ULineSegment::setFromPoints(), sqr(), updateCnt, UPosition::x, xR, and UPosition::y.
Referenced by getLineSerial(), and UResRoadLine::update().
|
protected |
Edge 0=left 1=center 2=right
Referenced by clear(), getLineType(), and isA().
|
protected |
Estimated road line
Referenced by getDistanceSD(), getLine(), setNew(), and update().
|
protected |
Unique serial number for road - for correlation at client end
Referenced by clear(), getLineSerial(), and setNew().
|
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().
|
protected |
Estimate cvariance of line segment
Referenced by clear(), getEstSD(), getQual(), postUpdate(), setNew(), and update().
|
protected |
index of this line Updated by scan number
Referenced by clear(), getScanSerial(), postUpdate(), setNew(), and update().
|
protected |
Number of updates to this line
Referenced by clear(), getQual(), getUpdateCnt(), postUpdate(), setNew(), and update().
|
protected |
Is line valie
Referenced by clear(), isValid(), postUpdate(), and setNew().
|
protected |
Estimated variance
Referenced by clear(), getDistanceSD(), getEstVar(), postUpdate(), setNew(), and update().