AURobotServers
4
|
#include <ulaserdataset.h>
Public Member Functions | |
void | clear () |
int | findEdgeObstacles (FILE *logo, UResPassable *resp) |
double | get2DDistToCross (U2Dline line, UPose fromPose, bool *behind) |
U2Dline | get2DLine () |
double | getCenter () |
virtual UPosition | getCenterPos () |
bool | getCenterValid () |
virtual UTime | getDetectTime () |
double | getFitVariance () |
int | getLeft () |
ULaserObst * | getLeftObst () |
UPosition | getLeftPos () |
UPosition | getLeftPos () |
UPosition | getLeftSide () |
int | getRight () |
ULaserObst * | getRightObst () |
UPosition | getRightPos () |
UPosition | getRightPos () |
UPosition | getRightSide () |
ULaserScan * | getScan () |
ULineSegment * | getSegment () |
double | getTilt () |
UPosition | getTop () |
double | getTopHeight (double laserTile) |
UPosition | getTopPos () |
virtual double | getVarMin () |
virtual double | getVarMin2 () |
double | getWidth () |
double | getYWidth () |
bool | isTopValid () |
ULineSegment * | makeBestFit () |
void | moveToMap (UPose *odoPose) |
void | print (const char *preString) |
void | print (const char *preString, char *buff, const int buffCnt) |
void | setCenter (double segmentCenter, bool valid) |
bool | setFromTag (USmlTag *tag) |
void | setInterval (int right, int left, ULaserScan *sourceScan, double varMin, double varMin2) |
ULaserPi () | |
ULaserPi () | |
virtual | ~ULaserPi () |
~ULaserPi () | |
Private Attributes | |
double | centerPosition |
bool | centerValid |
int | left |
double | leftAngle |
UPosition | leftPos |
UPosition | leftSide |
int | linksCnt |
ULaserObst | obstLeft |
ULaserObst | obstRight |
int | right |
double | rightAngle |
UPosition | rightPos |
UPosition | rightSide |
ULaserScan * | scan |
ULineSegment | segment |
double | tilt |
UPosition | topPos |
double | variance |
double | varianceMin |
double | varianceMin2 |
double | yw |
class to hold a passable interval position in a laserscan.
Specification of one passable interval in a series of laser scan values. Number of first and last point is stored only.
ULaserPi::ULaserPi | ( | ) |
Constructor
ULaserPi::~ULaserPi | ( | ) |
Destructor
ULaserPi::ULaserPi | ( | ) |
Constructor
|
virtual |
Destructor
void ULaserPi::clear | ( | void | ) |
Clear and set positions to 0.0
int ULaserPi::findEdgeObstacles | ( | FILE * | logo, |
UResPassable * | resp | ||
) |
Find edge obstacles (left and right) for this passable interval. Further needs acces to opther passable intervals. Returns number of obstacles found.
References ULaserObst::findEdgeObstacle(), UResPassable::findPi(), ULaserObst::getLeftIndex(), ULaserScan::getQ(), ULaserObst::getRightIndex(), left, obstLeft, obstRight, PQ_OBST, PQ_ROUGH, right, scan, and ULaserScan::setQ().
Referenced by getTilt().
Get the distance to the crossing (in 2D x,y only) between this passable interval and this 'line', as seen from the provided 'fromPose'. If the found crossing is behind the pose, then behind is true. If the lines are parallel 0.0 is returned and 'behind' is (brobably) false. Else the distance is returned. 'behind' may be NULL, if no need
References get2DLine(), U2Dline::getCrossing(), UPose::getMapToPose(), UPosition::set(), UPosition::x, and UPosition::y.
Referenced by getTilt().
U2Dline ULaserPi::get2DLine | ( | ) |
Get passable line as a 2D line
References ULine::pos, segment, U2Dline::setPV(), ULine::vec, UPosition::x, and UPosition::y.
Referenced by get2DDistToCross(), and getRightObst().
|
inline |
Get distance to centerPosition from segment origin
References centerPosition.
Referenced by UFunctionPassable::handlePass().
|
virtual |
Get center position of found road. Center position should be highest point. This is the measured position and not on the fitted line
References centerPosition, ULine::getPositionOnLine(), and segment.
Referenced by getTopHeight(), getVarMin2(), and UResRoadLine::update().
|
inline |
Get valid flag for center position, center position is not valid if the segment is too flat. In this case the center position is set to half line width.
References centerValid, and getTop().
Referenced by UFunctionPassable::handlePass().
|
virtual |
|
inline |
Get fit variance
References variance.
Referenced by UResPassable::findTopOfRoad(), and UFunctionPassable::handlePass().
|
inline |
Get left data index
References left.
Referenced by UResPassable::combineNearIntervals(), ULaserObst::findEdgeObstacle(), UResPassable::findPi(), UResPassable::findTopOfRoad(), UFunctionPassable::handlePass(), and UResPassable::makePassableIntervalsFit().
|
inline |
Get pointer to left obstacle structure
References obstLeft.
UPosition ULaserPi::getLeftPos | ( | ) |
Get left position - not smoothed to best fit line.
|
inline |
Get left position
Referenced by ULaserObst::findEdgeObstacle(), getVarMin2(), UClientFuncLaserGui::paintPis(), print(), setCenter(), and UResRoadLine::update().
|
inline |
Get left side of road (half robot distance from edge)
Referenced by UClientFuncLaserGui::paintPis().
|
inline |
Get left data index
References right.
Referenced by UResPassable::combineNearIntervals(), ULaserObst::findEdgeObstacle(), UResPassable::findPi(), UResPassable::findTopOfRoad(), UFunctionPassable::handlePass(), UResPassable::makePassableIntervalsFit(), and sortPis().
|
inline |
Get pointer to right obstacle structure
References get2DLine(), and obstRight.
UPosition ULaserPi::getRightPos | ( | ) |
Get right position - not smoothed to best fit line.
|
inline |
Get right position
Referenced by ULaserObst::findEdgeObstacle(), getVarMin2(), UClientFuncLaserGui::paintPis(), print(), setCenter(), and UResRoadLine::update().
|
inline |
Get right side of road (half robot distance from edge)
Referenced by UClientFuncLaserGui::paintPis().
|
inline |
Get scan (parent) of this passable interval
References getDetectTime(), and scan.
|
inline |
Get passable line segment
Referenced by UResPassable::combineNearIntervals(), UResPassable::findTopOfRoad(), UFunctionPassable::handlePass(), and UResPassable::makePassableIntervalsFit().
|
inline |
get road tilt - relative to robot
References findEdgeObstacles(), get2DDistToCross(), getTopHeight(), makeBestFit(), moveToMap(), print(), and tilt.
Referenced by UResPassable::findTopOfRoad(), and UResPassable::makePassableIntervalsFit().
UPosition ULaserPi::getTop | ( | ) |
Get position this distance from right edge
References centerPosition, ULine::getPositionOnLine(), and segment.
Referenced by getCenterValid(), and getTopHeight().
double ULaserPi::getTopHeight | ( | double | laserTile | ) |
Get height of top position relative to best-fit line. This is calculated from the distance to the robot and the tilt of the laser-plane.
References UPosition::dist(), getCenterPos(), and getTop().
Referenced by getTilt().
|
inline |
Get top position
Referenced by UClientFuncLaserGui::paintPis().
|
inlinevirtual |
Get minimum half-robot-width variance in interval with min limit
References varianceMin.
Referenced by UResPassable::combineNearIntervals().
|
inlinevirtual |
Get minimum half-robot-width variance in interval, no min limit
References getCenterPos(), getLeftPos(), getRightPos(), and varianceMin2.
Referenced by UResPassable::combineNearIntervals(), and UFunctionPassable::handlePass().
|
inline |
Get segment euclidian width - straight line distance.
References ULineSegment::length, and segment.
|
inline |
Get segment width perpendicular to robot. When robot follows road this is an estimate of road width
References yw.
|
inline |
Is top (center) position valid
References centerValid.
ULineSegment* ULaserPi::makeBestFit | ( | ) |
Calculate best-fit line
Referenced by getTilt().
void ULaserPi::moveToMap | ( | UPose * | odoPose | ) |
Move fitted line segment to map coordinates from this robot pose
References ULineSegment::getOtherEnd(), UPose::getPoseToMap(), ULaserObst::isValid(), ULaserObst::moveToMap(), obstLeft, obstRight, ULine::pos, segment, and ULineSegment::setFromPoints().
Referenced by getTilt().
void ULaserPi::print | ( | const char * | preString | ) |
Print status for passable interval - i.e. scannumber left and right extreme and such
Referenced by getTilt(), and UResPassable::print().
void ULaserPi::print | ( | const char * | preString, |
char * | buff, | ||
const int | buffCnt | ||
) |
Print status to this string
References getLeftPos(), getRightPos(), ULaserScan::getSerial(), scan, UPosition::x, and UPosition::y.
void ULaserPi::setCenter | ( | double | segmentCenter, |
bool | valid | ||
) |
Set center position (parameter on line segment, i.e distance from right edge) and validity
References centerPosition, centerValid, getLeftPos(), ULaserScan::getPos(), getRightPos(), left, right, and scan.
Referenced by UResPassable::findTopOfRoad().
bool ULaserPi::setFromTag | ( | USmlTag * | tag | ) |
Set passable interval from tag
References ULaserData::clear(), USmlTagIn::getNextAttribute(), and MAX_SML_NAME_LENGTH.
Referenced by UClientFuncLaser::handleLaserScan().
void ULaserPi::setInterval | ( | int | right, |
int | left, | ||
ULaserScan * | sourceScan, | ||
double | varMin, | ||
double | varMin2 | ||
) |
Set interval. With these limits (both inclusive) and with this minimum variance
References ULaserScan::getLineSegmentFit(), ULineSegment::getOtherEnd(), left, ULine::pos, right, scan, segment, tilt, variance, varianceMin, varianceMin2, UPosition::y, yw, and UPosition::z.
Referenced by UResPassable::addPassableInterval(), and UResPassable::combineNearIntervals().
|
private |
Distance from right (reference) end of segment to top of road (center position).
Referenced by getCenter(), getCenterPos(), getTop(), and setCenter().
|
private |
Is top position valid - i.e. is a significant top found
Referenced by getCenterValid(), isTopValid(), and setCenter().
|
private |
Left extreme of passable interval
Referenced by findEdgeObstacles(), getLeft(), setCenter(), and setInterval().
|
private |
Left angle of interval
|
private |
3D Position of left edge of interval
|
private |
Right side (half robot distance)
|
private |
Number of links from this passable interval to other passable intervals in previous scan
|
private |
Obstacle to the left
Referenced by findEdgeObstacles(), getLeftObst(), and moveToMap().
|
private |
Obstacle to the right
Referenced by findEdgeObstacles(), getRightObst(), and moveToMap().
|
private |
Right extreme of passable interval
Referenced by findEdgeObstacles(), getRight(), setCenter(), and setInterval().
|
private |
Right angle of interval
|
private |
3D position of right edge of interval
|
private |
Left side (half robot distance)
|
private |
Parent scan
Referenced by findEdgeObstacles(), getDetectTime(), getScan(), print(), setCenter(), and setInterval().
|
private |
Line segment desribing the interval
Referenced by get2DLine(), getCenterPos(), getTop(), getWidth(), moveToMap(), and setInterval().
|
private |
Road tilt value relative to robot. This value is set from road edge-points
Referenced by getTilt(), and setInterval().
|
private |
Top of road
|
private |
Variance relative to segment
Referenced by getFitVariance(), and setInterval().
|
private |
Minimum half robot width variance (within minimum limit)
Referenced by getVarMin(), and setInterval().
|
private |
Minimum half robot width variance based on at leat 10 measurements, no min limit.
Referenced by getVarMin2(), and setInterval().
|
private |
Segment width perpendiculat ro robot. Could be taken as road width.
Referenced by getYWidth(), and setInterval().