AURobotServers  4
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | List of all members
UFakeMap Class Reference

#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...
 
UResPoseHistresOdo
 pointer to odo pose history More...
 
UResPoseHistresUTM
 pointer to odo pose history More...
 
int state
 current start in fake path More...
 
UResVarPoolvarPool
 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 ()
 

Detailed Description

Class with fixed fake map used by fake laser scanner device

Constructor & Destructor Documentation

UFakeMap::UFakeMap ( )

Member Function Documentation

bool UFakeMap::copyToPoly ( )
double UFakeMap::fakeAdvanceControl ( UPoseTVQ currentPose,
UPose  targetPose,
double  dt 
)
private

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

Parameters
angleis direction to look - as device angle
maxRis maximum range
Returns
detected distance in meters (with added noise)

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().

double UFakeMap::getPink ( double  width,
int  times 
)
private

Simple zero mean radom noice maximum width is +/- width*times/2

References ULaserMeasurement::clear(), and ULaserData::ULaserData().

Referenced by ULaserMeasurement::clear().

void UFakeMap::initFakeMap ( )
private

Make fake map and path

References fakeMap.

Referenced by ULaserMeasurement::clear().

void UFakeMap::reset ( )

reset to initial position

Referenced by ULaserMeasurement::clear(), and UFakeDevice::openPort().

Member Data Documentation

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

UPose UFakeMap::fakeTargetPose[FMPC]

fake path poses

int UFakeMap::fakeTargetPoseCnt

fake waypoint count

int UFakeMap::fakeWallOnlyCnt

count of line part of fake scan

const int UFakeMap::FMMC = 40
static

fake map max count

const int UFakeMap::FMPC = 9
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().


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