AURobotServers
4
|
#include <ulaserdata.h>
Public Member Functions | |
bool | copyToPoly () |
set original map as polygons More... | |
UPoseTVQ | fakeAdvancePose (double dt) |
double | getFake2range (double angle, double maxR, double minR) |
void | reset () |
reset to initial position More... | |
UFakeMap () | |
Public Attributes | |
UPose | currentLaserPose |
current pose of the laser scanner (updated with currentTruePose) More... | |
UPoseTVQ | currentOdoPose |
pose with offset and error More... | |
UPoseTVQ | currentTruePose |
current robot pose (and sensor pose) More... | |
UPosRot | devicePose |
pose of laser device relative to currentTruePose More... | |
double | distError |
distance error per meter moved More... | |
double | distOffset |
distance offset per meter moved; More... | |
ULineSegment | fakeMap [FMMC] |
fake map More... | |
int | fakeMapCnt |
fake map number of lines More... | |
UPose | fakeTargetPose [FMPC] |
fake path poses More... | |
int | fakeTargetPoseCnt |
fake waypoint count More... | |
int | fakeWallOnlyCnt |
count of line part of fake scan More... | |
double | headError |
heading error per meter moved More... | |
double | headOffset |
heading offset per meter moved More... | |
bool | keepODOpose |
update odoPose with noisy pose More... | |
bool | keepUTMpose |
update UTM pose with true pose More... | |
UPolygon ** | polyMap |
polygon description of map; More... | |
int | polyMapCnt |
number of valid polygons More... | |
double | rangeError |
distance error for laser scanner range (in m) More... | |
UResPoseHist * | resOdo |
pointer to odo pose history More... | |
UResPoseHist * | resUTM |
pointer to odo pose history More... | |
int | state |
current start in fake path More... | |
UResVarPool * | varPool |
global variable entry resource More... | |
Static Public Attributes | |
static const int | FMMC = 40 |
fake map max count More... | |
static const int | FMPC = 9 |
fake path waypoint max count More... | |
Private Member Functions | |
double | fakeAdvanceControl (UPoseTVQ *currentPose, UPose targetPose, double dt) |
double | getPink (double width, int times) |
void | initFakeMap () |
Class with fixed fake map used by fake laser scanner device
UFakeMap::UFakeMap | ( | ) |
Referenced by ULaserMeasurement::clear().
bool UFakeMap::copyToPoly | ( | ) |
set original map as polygons
References UPolygon::add(), UPolygon::clear(), UPosition::distSq(), fakeMap, ULineSegment::getOtherEnd(), UPolygon::getPointsCnt(), ULine::pos, UPolygon::setAsPolyline(), UPolygon::setColor(), UPolygon::setSize(), UPosition::x, UPose::x, UPosition::y, and UPose::y.
Referenced by ULaserMeasurement::clear(), and UFakeDevice::getNewestData().
Advance robot position towards target pose in total 'dt' seconds. Returns the distance to the the target position.
References a, UPose::add(), UPose::h, limitToPi(), UPoseTime::t, UPoseTVQ::vel, UPose::x, and UPose::y.
Referenced by ULaserMeasurement::clear().
UPoseTVQ UFakeMap::fakeAdvancePose | ( | double | dt | ) |
Advance a fake robot position (fake=2 or 3) a delta time of 'dt' in seconds. The state and startPose should be saved between calls. Returns the new pose after the advance (and this should be used as the new start pose at the next call.
References dist, UPose::getDistance(), UPose::h, limitToPi(), UPoseTVQ::q, and UPoseTime::t.
Referenced by ULaserMeasurement::clear(), and ULaserDevice::getFakeScan().
double UFakeMap::getFake2range | ( | double | angle, |
double | maxR, | ||
double | minR | ||
) |
Get fake range using fake=2 option
angle | is direction to look - as device angle |
maxR | is maximum range |
References a, UPosition::add(), ULaserMeasurement::angle, fakeMap, ULineSegment::getSegmentCrossingXY(), ULaserMeasurement::range, UPosition::scale(), UPosition::set(), ULineSegment::setFromPoints(), UPosition::x, and UPosition::y.
Referenced by ULaserMeasurement::clear(), and ULaserData::setFakeDataRad().
|
private |
Simple zero mean radom noice maximum width is +/- width*times/2
References ULaserMeasurement::clear(), and ULaserData::ULaserData().
Referenced by ULaserMeasurement::clear().
|
private |
void UFakeMap::reset | ( | ) |
reset to initial position
Referenced by ULaserMeasurement::clear(), and UFakeDevice::openPort().
UPose UFakeMap::currentLaserPose |
current pose of the laser scanner (updated with currentTruePose)
UPoseTVQ UFakeMap::currentOdoPose |
pose with offset and error
UPoseTVQ UFakeMap::currentTruePose |
current robot pose (and sensor pose)
Referenced by ULaserDevice::getFakeScan(), and UFakeDevice::print().
UPosRot UFakeMap::devicePose |
pose of laser device relative to currentTruePose
Referenced by UFakeDevice::getNewestData().
double UFakeMap::distError |
distance error per meter moved
Referenced by UFakeDevice::getNewestData().
double UFakeMap::distOffset |
distance offset per meter moved;
Referenced by UFakeDevice::getNewestData().
ULineSegment UFakeMap::fakeMap[FMMC] |
fake map
int UFakeMap::fakeMapCnt |
fake map number of lines
int UFakeMap::fakeTargetPoseCnt |
fake waypoint count
int UFakeMap::fakeWallOnlyCnt |
count of line part of fake scan
|
static |
fake map max count
|
static |
fake path waypoint max count
double UFakeMap::headError |
heading error per meter moved
Referenced by UFakeDevice::getNewestData().
double UFakeMap::headOffset |
heading offset per meter moved
Referenced by UFakeDevice::getNewestData().
bool UFakeMap::keepODOpose |
update odoPose with noisy pose
Referenced by UFakeDevice::getNewestData().
bool UFakeMap::keepUTMpose |
update UTM pose with true pose
Referenced by UFakeDevice::getNewestData().
UPolygon** UFakeMap::polyMap |
polygon description of map;
int UFakeMap::polyMapCnt |
number of valid polygons
double UFakeMap::rangeError |
distance error for laser scanner range (in m)
Referenced by UFakeDevice::getNewestData().
UResPoseHist* UFakeMap::resOdo |
pointer to odo pose history
Referenced by UFunctionLaser::setResource().
UResPoseHist* UFakeMap::resUTM |
pointer to odo pose history
Referenced by UFunctionLaser::setResource().
int UFakeMap::state |
current start in fake path
UResVarPool* UFakeMap::varPool |
global variable entry resource
Referenced by ULaserPool::ULaserPoolInit().