AURobotServers
4
|
#include <ulaserobst.h>
Public Member Functions | |
bool | findEdgeObstacle (int refIdx, bool toTheLeft, ULaserScan *scanRef, ULaserPi *neighbourPi) |
ULaserPi * | getClosebyPi () |
double | getClosebyPiDist () |
int | getIndexMax () |
int | getLeftIndex () |
ULineSegment * | getLineSegment () |
double | getLineSegmentVar () |
int | getRightIndex () |
bool | isValid () |
void | moveToMap (UPose odoPose) |
void | setInvalid () |
ULaserObst () | |
~ULaserObst () | |
Private Attributes | |
UPosition | center |
ULaserPi * | closePi |
double | closePiDist |
int | leftIdx |
ULineSegment | lineFit |
double | lineFitVariance |
int | rightIdx |
ULaserScan * | scan |
Class that holds an obstacle as seen by the lase scanner
ULaserObst::ULaserObst | ( | ) |
Constructor
References leftIdx, lineFitVariance, and rightIdx.
ULaserObst::~ULaserObst | ( | ) |
Destructor
bool ULaserObst::findEdgeObstacle | ( | int | refIdx, |
bool | toTheLeft, | ||
ULaserScan * | scanRef, | ||
ULaserPi * | neighbourPi | ||
) |
find obstacle at edge of passable interval
References absi(), center, closePi, closePiDist, ULaserScan::data, ULaserScan::dataCnt, UPosition::dist(), ULaserPi::getLeft(), ULaserPi::getLeftPos(), ULaserScan::getLineSegmentFit(), ULaserScan::getPos(), ULaserPi::getRight(), ULaserPi::getRightPos(), ULaserPoint::isValid(), leftIdx, ULineSegment::length, lineFit, lineFitVariance, ULaserPoint::passQ, ULaserPoint::pos, PQ_EASY, PQ_ROUGH, rightIdx, UPosition::scaled(), scan, ULineSegment::setFromPoints(), and UPosition::x.
Referenced by ULaserPi::findEdgeObstacles().
ULaserPi * ULaserObst::getClosebyPi | ( | ) |
|
inline |
Get distance to closeby passable interval
References closePiDist, and getClosebyPi().
int ULaserObst::getIndexMax | ( | ) |
Get max index into laserscan
References ULaserScan::getDataMax(), and scan.
Referenced by getLeftIndex().
|
inline |
Get left index into laserscan
References getIndexMax(), and leftIdx.
Referenced by ULaserPi::findEdgeObstacles().
|
inline |
Get pointer to fitted line segment
References lineFit.
|
inline |
Get variance for fitted line
References lineFitVariance, and moveToMap().
|
inline |
bool ULaserObst::isValid | ( | ) |
void ULaserObst::moveToMap | ( | UPose | odoPose | ) |
Move coordinates from robot to map coordinates, using this pose
References center, ULineSegment::getOtherEnd(), UPose::getPoseToMap(), lineFit, ULine::pos, and ULineSegment::setFromPoints().
Referenced by getLineSegmentVar(), and ULaserPi::moveToMap().
|
inline |
Make obstacle invalid
References leftIdx.
|
private |
Center of obstacle
Referenced by findEdgeObstacle(), and moveToMap().
|
private |
Is this edge just another passable interva then this pointer is to the other PI
Referenced by findEdgeObstacle(), and getClosebyPi().
|
private |
Distance to end of neighbohs end position
Referenced by findEdgeObstacle(), and getClosebyPiDist().
|
private |
leftmost laser measurement of obstacle
Referenced by findEdgeObstacle(), getLeftIndex(), isValid(), setInvalid(), and ULaserObst().
|
private |
Line segment best fitting the obstacle
Referenced by findEdgeObstacle(), getLineSegment(), and moveToMap().
|
private |
Line fit variance
Referenced by findEdgeObstacle(), getLineSegmentVar(), and ULaserObst().
|
private |
rightmost laser measurement of obstacle
Referenced by findEdgeObstacle(), getRightIndex(), and ULaserObst().
|
private |
Reference to the scan detected the obstacle
Referenced by findEdgeObstacle(), getIndexMax(), and isValid().