AURobotServers
4
|
#include <ulaserdataset.h>
Public Member Functions | |
bool | addMeasurement (ULaserMeasurement *source) |
bool | addMeasurements (int count, double startAngle, double stride) |
void | clear () |
void | copy (ULaserData *source) |
U2Dpos | get2d (int index, int set=0) |
double | getAngle () |
double | getAngleDeg (int index) |
double | getAngleRad (int index) |
double | getAngleResolutionDeg () |
double | getAngleResolutionRad () |
double | getAngleStart () |
double | getAngleStartRad () |
virtual const char * | getDataType () |
int | getDeviceNum () |
double | getDistance () |
UPose | getFakePose () |
UPoseTVQ | getFakePoseTime () |
int | getFlag () |
int * | getFlags (int index) |
double | getMaxAngleDeg () |
double | getMaxValidRange () |
ULaserMeasurement * | getMeasurement (int idx) |
double | getMeasurementAngleDeg (int index) |
int | getMeasurementsCnt () |
int | getMeasurementSetCnt (int set) |
int | getMeasurementSetsCnt () |
double | getMinAngleDeg () |
UPosition | getPosition (UPosition laserPos, double cosLaserTilt) |
UPosition | getPosition (UMatrix4 *movLtoR) |
int | getRangeCnt (int set=0) |
double | getRangeMeter (int index, bool *rangeValid=NULL, int set=0) |
double | getRangeMetre (int index, bool *rangeValid=NULL, int set=0) |
int | getRangeRaw (int index, int set) |
UTime | getScanTime () |
double | getSdL () |
unsigned long | getSerial () |
double | getTilt () |
int | getUnit () |
double | getVarL () |
bool | inZoneA () |
bool | inZoneB () |
bool | isDazzled () |
bool | isFake () |
bool | isMeasurementStructure () |
bool | isMirror () |
bool | isValid () |
void | print (char *prestring) |
void | print (char *preString) |
void | reInitMeasurements () |
bool | saveToLogFile (FILE *logfile) |
void | setAngleResAndStart (double start, double res) |
void | setDeviceNum (int value) |
void | setFakeDataRad (double minAng, double maxAng, double resolution, double minRange, double maxRange, UPose sourcePose, UPosRot sensorPose, int fakeMode) |
void | setFakePose (UPose pose) |
bool | setFromTag (USmlTag *tag) |
void | setMaxValidRange (double value) |
void | setMeasurement (int idx, int set, int range) |
void | setMirror (bool value) |
void | setRangeCnt (int value) |
void | setScanTime (UTime value) |
void | setSerial (const unsigned long value) |
void | setSimData (double minAng, double maxAng, double resolution, double minRange, double maxRange, UPose sourcePose, UPosRot sensorPose, int fake) |
void | setUnit (int toUnit) |
void | setValid (bool value) |
void | setValue (double ang, unsigned char lsb, unsigned char msb, double measurementUnits) |
void | setValue (double ang, double distance, bool inA, bool inB, bool inZ) |
void | setValue (int idx, unsigned char lsb, unsigned char msb) |
ULaserData () | |
ULaserData () | |
~ULaserData () | |
Public Member Functions inherited from UDataBase | |
bool | isA (const char *typeString) |
virtual bool | isAlsoA (const char *typeString) |
virtual void | snprint (const char *preString, char *buff, const int buffCnt) |
UDataBase () | |
virtual | ~UDataBase () |
Public Member Functions inherited from ULock | |
bool | lock () |
void | lockInit () |
void | post () |
bool | tryLock () |
bool | tryWait () |
ULock () | |
void | unlock () |
bool | wait () |
~ULock () | |
Protected Member Functions | |
int * | getRange (int index) |
Protected Attributes | |
double | angleResolution |
double | angleStart |
int | device |
bool | fake |
UPoseV | fakePose |
int | flags [MAX_RANGE_VALUES] |
ULaserMeasurement ** | laserMeasurement |
pointer array More... | |
int | laserMeasurementCnt |
size of pointer array - rangeCnt is number of used values More... | |
int | laserMeasurementMaxCnt |
size of pointer array - rangeCnt is number of used values More... | |
int | laserMeasurementSetCnt [5] |
number of (non-zero) measurements in each range bin More... | |
double | maxValidRange |
int | range [MAX_RANGE_VALUES] |
int | rangeCnt |
UTime | scanTime |
unsigned long | serial |
int | unit |
bool | useLaserMeasurementStructure |
bool | valid |
Private Attributes | |
double | angle |
int | flag |
double | range |
double | tilt |
double | varL |
Class to hold one measurement of a laser scan
Laser values in integer array, with flag support
ULaserData::ULaserData | ( | ) |
ULaserData::ULaserData | ( | ) |
Constructor
ULaserData::~ULaserData | ( | ) |
Destructor
References bool2str(), print(), and ULaserMeasurement::rangeCnt.
Referenced by ULaserMeasurement::clear().
bool ULaserData::addMeasurement | ( | ULaserMeasurement * | source | ) |
Add a measurement to the list of known measurements The source is copied - not just linked.
References ULaserMeasurement::angle, ULaserMeasurement::flags, ULaserMeasurement::intens, ULaserMeasurement::MAX_VALUES_PER_ANGLE, ULaserMeasurement::range, ULaserMeasurement::rangeCnt, and ULaserMeasurement::ULaserMeasurement().
Referenced by ULaserMeasurement::clear().
bool ULaserData::addMeasurements | ( | int | count, |
double | startAngle, | ||
double | stride | ||
) |
Allocate this number of measurements, and set angle values
References ULaserMeasurement::angle, and ULaserMeasurement::ULaserMeasurement().
Referenced by ULaserMeasurement::clear(), USickData::getDataTo(), ULms100::getDataTo(), ULms500::getDataTo(), UHokuyo::getDataTo(), UV360Scan::getScan(), and UReplayDevice::replayStep().
void ULaserData::clear | ( | void | ) |
set all values to default in old structure format (not measurement) but allocated memory for measurements are not cleared, just count, not maxCount
References ULaserMeasurement::rangeCnt.
Referenced by ULaserMeasurement::clear(), USick::getNewestData(), ULaserPi::setFromTag(), UPlannerValue::setFromTag(), ULaserDataSet::ULaserDataSet(), and UPlannerValue::UPlannerValue().
void ULaserData::copy | ( | ULaserData * | source | ) |
Copy data to another structure
References ULaserMeasurement::flags, getAngleResolutionDeg(), getAngleStart(), getDeviceNum(), getFakePose(), getFlags(), getMaxValidRange(), getMeasurement(), getMeasurementSetCnt(), getRange(), getRangeCnt(), getScanTime(), getSerial(), getUnit(), isFake(), isMeasurementStructure(), isValid(), laserMeasurementCnt, ULaserMeasurement::range, and ULaserMeasurement::rangeCnt.
Referenced by ULaserMeasurement::clear(), ULaserSim::getNewestData(), UReplayDevice::getNewestData(), ULms100::getNewestData(), ULms500::getNewestData(), UHokuyo::getNewestData(), and ULaserDevice::gotNewScan().
U2Dpos ULaserData::get2d | ( | int | index, |
int | set = 0 |
||
) |
Get range measurement as x,y coordinate in laser scanner coordinates.
int | index to measurement (up to getRangeCnt() - 1) |
set | is dataset number if more than one range per angle (0..4) x,y in metre, or 0,0 if not a valid measurement. |
References a, U2Dpos::clear(), ULaserMeasurement::range, ULaserMeasurement::rangeCnt, U2Dpos::x, and U2Dpos::y.
Referenced by ULaserMeasurement::clear(), and UNamedBox::doDetect().
|
inline |
Get measurement angle
References angle.
Referenced by UClientFuncLaserGui::doImage(), getPosition(), UClientFuncLaserGui::paintScanStatData(), and ULaserDataSet::print().
|
inline |
Get angle for this measurement. NB! no range check for index. Returns angle in degrees, 0 is front, left is positive.
Referenced by Funcavoid::findHuller(), Funcavoid::findSpring(), handlePeopleDetection(), and UFunctionLaser::sendScan().
|
inline |
Get angle for this measurement in radians. NB! no range check for index. Returns angle in radians, 0 is front, left is positive.
Referenced by Funcavoid::direkte(), UFuncRoseBot::handleCommand(), UFuncLobst::handleCommand(), UFuncLocalize::handleLocalize(), UFuncLocalize::handleLocalizeMHF(), UFuncLocalize::handleLocalizeUKF(), UResLobst::makeObst(), UResLocater::retrieveData(), ULaserScan::setScan(), UResAuEf::toCartesian(), and UV360Scan::update().
|
inline |
Get resolution angle (in degrees). If scanner is mounted upside down then the start angle is positive, and the resolution negative.
Referenced by ULaserMeasurement::clear(), copy(), USickData::getDataTo(), and UFunctionLaser::sendScan().
|
inline |
Get resolution angle (in radians) Resolution is the angular interval between measurements. If scanner is mounted upside down then the start angle is positive, and the resolution negative.
Referenced by UV360Scan::update().
|
inline |
Get start angle (in degrees, center is 0, right is negative). If scanner is mounted upside down then the start angle is positive, and the resolution negative.
Referenced by ULaserMeasurement::clear(), copy(), USickData::getDataTo(), and ULaserScan::setScan().
|
inline |
Get start angle (in radians, center is 0, left is positive). If scanner is mounted upside down then the start angle is positive, and the resolution negative.
Referenced by UV360Scan::update().
|
inlinevirtual |
Get (end) type of this structure
Reimplemented from UDataBase.
|
inline |
Get device number for source device
References device.
Referenced by UResV360::callGotNewDataWithObject(), ULaserMeasurement::clear(), copy(), UFuncLaserBase::getScan(), ULaserPool::getScan(), UFunctionPassable::handlePass(), UFunctionLaser::handleScanGetCommand(), and UResV360::update().
|
inline |
Get measured distance
References range.
Referenced by UClientFuncLaserGui::doImage(), getPosition(), and UClientFuncLaserGui::paintHistScan().
|
inline |
Get faked pose - only valid if the data actually is faked, and the fake method uses a pose to generate the data
Referenced by ULaserMeasurement::clear(), copy(), UFuncEfLine::getCurrentOdoPose(), UFunctionPassable::handlePass(), UFunctionLaser::sendScan(), and UResV360::update().
|
inline |
Get faked pose - only valid if the data actually is faked, and the fake method uses a pose to generate the data
References UPoseTVQ::q, UPoseTVQ::set(), and UPoseTime::t.
Referenced by UFunctionLaser::handleScanGetCommand().
|
inline |
Is measurement dazzeled (measurement is not valid)
References flag.
Referenced by UClientFuncLaserGui::paintHistScan(), and UClientFuncLaserGui::paintScanStatData().
|
inline |
Get pointer to measurement flag values with this index. NB! no range test for index (or value)
Referenced by ULaserMeasurement::clear(), copy(), USickData::getDataTo(), ULms100::getDataTo(), UV360Scan::getScan(), UReplayDevice::replayStep(), and UFunctionLaser::sendScan().
double ULaserData::getMaxAngleDeg | ( | ) |
Get maximum (leftmost) angle
References maxd(), and ULaserMeasurement::rangeCnt.
Referenced by ULaserMeasurement::clear().
|
inline |
Set the maximum (valid) sensor range for sensor data
Referenced by ULaserMeasurement::clear(), copy(), UResPassable::doFullAnalysis(), UResPassable::doObstAnalysis(), UFuncLobst::handleCommand(), UResLocater::locate(), UFunctionLaser::sendScan(), ULaserScan::setScan(), and UV360Scan::update().
ULaserMeasurement * ULaserData::getMeasurement | ( | int | idx | ) |
het laser measurement structure with this index
idx | id element to get - in received order |
Referenced by ULaserMeasurement::clear(), and copy().
double ULaserData::getMeasurementAngleDeg | ( | int | index | ) |
Get angle of this measurement
index | is measurement number. |
References ULaserMeasurement::angle.
Referenced by ULaserMeasurement::clear().
|
inline |
Get number og measurements allocated (number of angles in scan)
|
inline |
Get statistics of valid measurements in each dataset
set | is the set number 0..4 |
Referenced by ULaserMeasurement::clear(), and copy().
|
inline |
Referenced by UFunctionLaser::sendScan().
double ULaserData::getMinAngleDeg | ( | ) |
Get minimum (rightmost) angle
References mind(), and ULaserMeasurement::rangeCnt.
Referenced by ULaserMeasurement::clear().
Get position as 3D relative to robot, when laser is positioned at laserPos - assuming same orientation
References getAngle(), getDistance(), UPosition::x, and UPosition::y.
Referenced by UClientFuncLaserGui::doRepaint(), getTilt(), UClientFuncLaserGui::paintHistScan(), and UClientFuncLaserGui::paintScanStatData().
Get position in robot coordinates using full pose set
References getAngle(), getDistance(), UPosition::x, UPosition::y, and UPosition::z.
|
inlineprotected |
Get pointer to range measurement with this index. NB! no range check on index.
Referenced by ULaserMeasurement::clear(), copy(), and handlePeopleDetection().
|
inline |
Get measurement count
Referenced by ULaserMeasurement::clear(), copy(), Funcavoid::direkte(), UNamedBox::doDetect(), filterLaserData(), Funcavoid::findHuller(), Funcavoid::findSpring(), UFuncRoseBot::handleCommand(), UFuncLobst::handleCommand(), UFuncLocalize::handleLocalize(), UFuncLocalize::handleLocalizeMHF(), UFuncLocalize::handleLocalizeUKF(), handlePeopleDetection(), UResLobst::makeObst(), UHokuyo::receiveData(), UResLocater::retrieveData(), UFunctionLaser::sendScan(), ULaserScan::setScan(), UResAuEf::toCartesian(), and UV360Scan::update().
double ULaserData::getRangeMeter | ( | int | index, |
bool * | rangeValid = NULL , |
||
int | set = 0 |
||
) |
Get range measurement in metre with this index. Returns range in metre.
References ULaserMeasurement::range, and ULaserMeasurement::rangeCnt.
Referenced by ULaserMeasurement::clear(), Funcavoid::direkte(), filterLaserData(), Funcavoid::findHuller(), Funcavoid::findSpring(), UFuncRoseBot::handleCommand(), UFuncLobst::handleCommand(), UFuncLocalize::handleLocalize(), UFuncLocalize::handleLocalizeMHF(), UFuncLocalize::handleLocalizeUKF(), UResLobst::makeObst(), UResLocater::retrieveData(), UFunctionLaser::sendScan(), ULaserScan::setScan(), and UResAuEf::toCartesian().
|
inline |
Get range measurement in meter with this index. Returns range in meter (same call as below, but different spelling).
Referenced by UV360Scan::update().
int ULaserData::getRangeRaw | ( | int | index, |
int | set | ||
) |
Get range in integer with the default scaling
index | index to value (angle) |
set | is measurement set - up to 5, default is 0 (all others than lms5xx |
References ULaserMeasurement::range, and ULaserMeasurement::rangeCnt.
Referenced by ULaserMeasurement::clear(), and UFunctionLaser::sendScan().
|
inline |
Get scantime
Referenced by ULaserMeasurement::clear(), copy(), UNamedBoxes::doDetect(), UResPassable::doFullAnalysis(), UResPassable::doObstAnalysis(), UResAuEf::findFeatures(), UFuncEfLine::getCurrentOdoPose(), ULaserDevice::gotNewScan(), UFuncRoseBot::handleCommand(), UFuncLobst::handleCommand(), UFuncPpl::handleCommand(), UFuncLocalize::handleLocalize(), UFuncLocalize::handleLocalizeMHF(), UFuncLocalize::handleLocalizeUKF(), UFunctionPassable::handlePass(), UFunctionLaser::handleScanGetCommand(), UResLocater::locate(), UResLobst::makeObst(), UFuncEfLine::sendAllLines(), UFuncEfLine::sendBoxLines(), UFuncEfLine::sendBoxPose(), UFunctionLaser::sendScan(), ULaserScan::setScan(), and UResV360::update().
|
inline |
Get measurement deviation to the left
References varL.
Referenced by UClientFuncLaserGui::paintScanStatData().
|
inline |
Get serial number (scan number)
Referenced by ULaserMeasurement::clear(), copy(), UResPassable::doFullAnalysis(), UResAuEf::findFeatures(), ULaserSim::getNewestData(), UReplayDevice::getNewestData(), ULms100::getNewestData(), ULms500::getNewestData(), UHokuyo::getNewestData(), ULaserPool::getScan(), UFuncLobst::handleCommand(), UFuncPpl::handleCommand(), UClientFuncSimScan::handleLaserScan(), UFunctionPassable::handlePass(), UFunctionLaser::handleScanGetCommand(), UResLocater::locate(), UResLobst::makeObst(), ULaserSim::receiveData(), UReplayDevice::replayStepToScan(), UFunctionLaser::sendScan(), ULaserScan::setScan(), UV360Scan::update(), and UResV360::update().
|
inline |
Get combined variance to the left Get combined deviation to the left Get measurement variance to the left Get measurement variance to the right
References getPosition(), print(), setFromTag(), and tilt.
Referenced by UClientFuncLaserGui::paintScanStatData().
|
inline |
Get unit measurement unit 0 = cm, 1 = mm, 2 = 10cm
Referenced by ULaserMeasurement::clear(), copy(), handlePeopleDetection(), and UFunctionLaser::sendScan().
|
inline |
Get measurement variance Get measurement variance to the left
References varL.
|
inline |
Is measurement inside zone A
References flag.
Referenced by UClientFuncLaserGui::doRepaint(), UClientFuncLaserGui::paintHistScan(), UClientFuncLaserGui::paintScanStatData(), and print().
|
inline |
Is measurement inside zone B
References flag.
Referenced by UClientFuncLaserGui::doRepaint(), UClientFuncLaserGui::paintHistScan(), UClientFuncLaserGui::paintScanStatData(), and print().
|
inline |
Is measurement dazzeled (measurement is not valid)
References flag.
Referenced by UClientFuncLaserGui::doRepaint(), UClientFuncLaserGui::paintHistScan(), and print().
|
inline |
Is the data based on one of the fixed fake scenarios
Referenced by ULaserMeasurement::clear(), copy(), UFuncEfLine::getCurrentOdoPose(), and UFunctionLaser::handleScanGetCommand().
|
inline |
is it new or old structure
Referenced by ULaserMeasurement::clear(), and copy().
|
inline |
Is the dataset mirrored. This is set to be true if the resolution value is set negative (corresponding to the missor flag is set true)
Referenced by UFunctionLaser::sendScan().
|
inline |
Get valid flag
Referenced by ULaserMeasurement::clear(), copy(), ULms100::getNewestData(), ULms500::getNewestData(), UHokuyo::getNewestData(), Funcavoid::handleCommand(), UFuncRoseBot::handleCommand(), UFuncPpl::handleCommand(), UFuncEfLine::handleCommand(), UFuncLaserBox::handleCommand(), UFuncLocalize::handleLocalize(), UFuncLocalize::handleLocalizeMHF(), UFuncLocalize::handleLocalizeUKF(), UFunctionPassable::handlePass(), handlePeopleDetection(), UFunctionLaser::handleScanGetCommand(), and UResV360::update().
void ULaserData::print | ( | char * | prestring | ) |
Print metadata for this set:
void ULaserData::print | ( | char * | preString | ) |
Get measurement edge value Get measurement curvature value Print values of this measurement
References angle, inZoneA(), inZoneB(), isDazzled(), and range.
Referenced by ULaserMeasurement::clear(), ULaserDataSet::getLaserTilt(), getTilt(), ULaserDataSet::print(), and ~ULaserData().
void ULaserData::reInitMeasurements | ( | ) |
Reinit angle settings in allstored measurements to be used when changing mirror or width
References ULaserMeasurement::angle, and ULaserMeasurement::ULaserMeasurement().
Referenced by ULaserMeasurement::clear(), and UHokuyo::getDataTo().
bool ULaserData::saveToLogFile | ( | FILE * | logfile | ) |
Write data to logfile. 'logfile' must be open in write mode. Returns true if successfull.
References ULaserMeasurement::rangeCnt.
Referenced by ULaserMeasurement::clear(), and ULaserDevice::logThisScan().
|
inline |
Set angle start and resolution
start | angle is for first measurement. |
res | is increment for each measurement. Both values are in degrees. zero angle is forwardt. e.g. start=-90.0 res=1.0 fits for 181 measurements with 1 deg resolution for a SICK laser |
Referenced by USick::getNewestData(), UClientFuncSimScan::handleLaserScan(), and UReplayDevice::replayStep().
|
inline |
Set device number for source device
Referenced by UResV360::callGotNewDataWithObject(), ULms100::decodeData(), ULms500::decodeData(), ULaserDevice::getFakeScan(), ULaserSim::getNewestData(), ULms100::getNewestData(), ULms500::getNewestData(), UHokuyo::getNewestData(), USick::getNewestData(), ULaserPool::getScan(), ULaserSim::receiveData(), UHokuyo::receiveData(), UReplayDevice::replayStep(), and UResV360::update().
void ULaserData::setFakeDataRad | ( | double | minAng, |
double | maxAng, | ||
double | resolution, | ||
double | minRange, | ||
double | maxRange, | ||
UPose | sourcePose, | ||
UPosRot | sensorPose, | ||
int | fakeMode | ||
) |
Fill random simulated data into structure all angles in radians. fakeMode is: 0 = not fake data. 1 = random data. 2,3,4 = fake corridor data.
References a, fakeMap, ULaserMeasurement::flags, UFakeMap::getFake2range(), UPosRot::getPhi(), UPosRot::getZ(), MAX_RANGE_VALUES, maxd(), maxi(), mini(), ULaserMeasurement::range, ULaserMeasurement::rangeCnt, and roundi().
Referenced by ULaserMeasurement::clear().
|
inline |
Set faked pose - used to set a pose relevant to the scandata.
Referenced by UFunctionPassable::handlePass(), and UFunctionLaser::handleScanGetCommand().
bool ULaserData::setFromTag | ( | USmlTag * | tag | ) |
Set values from a message tag
References angle, flag, USmlTagIn::getNextAttribute(), MAX_SML_NAME_LENGTH, range, tilt, and varL.
Referenced by getTilt(), UClientFuncLaser::handleLaserScan(), ULaserPathResult::isPathCrashed(), and UPlannerValue::UPlannerValue().
|
inline |
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. Set the maximum (valid) sensor range for sensor data
Referenced by ULms100::decodeData(), ULms500::decodeData(), ULaserDevice::getFakeScan(), ULaserSim::getNewestData(), USick::getNewestData(), UV360Scan::getScan(), ULaserSim::receiveData(), UHokuyo::receiveData(), and UReplayDevice::replayStep().
void ULaserData::setMeasurement | ( | int | idx, |
int | set, | ||
int | range | ||
) |
set new range measurement
idx | is the index to measurement angle |
set | is distance measurement set (0..4) |
range | is range in mm |
References ULaserMeasurement::MAX_VALUES_PER_ANGLE, ULaserMeasurement::range, and ULaserMeasurement::rangeCnt.
Referenced by ULaserMeasurement::clear(), USickData::getDataTo(), ULms100::getDataTo(), ULms500::getDataTo(), UHokuyo::getDataTo(), UV360Scan::getScan(), and UReplayDevice::replayStep().
void ULaserData::setMirror | ( | bool | value | ) |
Set data to the mirror if value is true. This corresponds to turning the laser scanner upside down.
Referenced by ULaserMeasurement::clear(), ULms100::decodeData(), ULms500::decodeData(), UHokuyo::getDataTo(), ULaserDevice::getFakeScan(), ULaserSim::getNewestData(), USick::getNewestData(), ULaserSim::receiveData(), and UHokuyo::receiveData().
|
inline |
Set measurement count
Referenced by USickData::getDataTo(), UClientFuncSimScan::handleLaserScan(), and UReplayDevice::replayStep().
|
inline |
|
inline |
Set serial number (scan number)
Referenced by ULms100::decodeData(), ULms500::decodeData(), UHokuyo::decodeData(), ULaserDevice::getFakeScan(), ULaserSim::getNewestData(), USick::getNewestData(), UV360Scan::getScan(), ULaserPool::getScan(), UFuncLobst::handleCommand(), UClientFuncSimScan::handleLaserScan(), and UReplayDevice::replayStep().
void ULaserData::setSimData | ( | double | minAng, |
double | maxAng, | ||
double | resolution, | ||
double | minRange, | ||
double | maxRange, | ||
UPose | sourcePose, | ||
UPosRot | sensorPose, | ||
int | fake | ||
) |
Fill random simulated data into structure NB! min- maxAng and resolution in degrees - range [-180,180]
Referenced by ULaserMeasurement::clear(), and ULaserDevice::getFakeScan().
|
inline |
Get range measurement in metre with this index. Returns range in metre. Set unit measurement unit 0 = cm, 1 = mm, 2 = 10cm
Referenced by ULms100::decodeData(), ULms500::decodeData(), UHokuyo::decodeData(), USickData::getDataTo(), UV360Scan::getScan(), UClientFuncSimScan::handleLaserScan(), and UReplayDevice::replayStep().
|
inline |
Set valid flag
Referenced by ULms100::decodeData(), ULms500::decodeData(), UHokuyo::decodeData(), USickData::getDataTo(), UReplayDevice::getNewestData(), ULms100::getNewestData(), ULms500::getNewestData(), UHokuyo::getNewestData(), USick::getNewestData(), UV360Scan::getScan(), ULaserSim::receiveData(), and UReplayDevice::replayStep().
void ULaserData::setValue | ( | double | ang, |
unsigned char | lsb, | ||
unsigned char | msb, | ||
double | measurementUnits | ||
) |
Set values from 2-byte data
References angle, flag, and range.
Referenced by ULaserMeasurement::clear(), filterLaserData(), UClientFuncSimScan::handleLaserScan(), and UClientFuncLaser::handleLaserScan().
void ULaserData::setValue | ( | double | ang, |
double | distance, | ||
bool | inA, | ||
bool | inB, | ||
bool | inZ | ||
) |
Set values from tag data
void ULaserData::setValue | ( | int | idx, |
unsigned char | lsb, | ||
unsigned char | msb | ||
) |
Set data value
References ULaserMeasurement::flags, ULaserMeasurement::range, and roundi().
|
private |
Edge value Curvature value Angle of measurement in radians
Referenced by getAngle(), print(), setFromTag(), and setValue().
|
protected |
angle resolution in degrees
|
protected |
Start angle - zero is front
|
protected |
Device number for data
|
protected |
Are the current range data from a fake source - set true on fake update and false on setAngleResAnsStart()
|
protected |
Fake robot pose (for fake = 2 or 3)
|
private |
Measuremnt is in zone A
Referenced by getFlag(), inZoneA(), inZoneB(), isDazzled(), setFromTag(), setValue(), and ULaserData().
|
protected |
Flag value related to range measurements
|
protected |
pointer array
|
protected |
size of pointer array - rangeCnt is number of used values
Referenced by ULaserMeasurement::clear(), and copy().
|
protected |
size of pointer array - rangeCnt is number of used values
|
protected |
number of (non-zero) measurements in each range bin
|
protected |
Maximum (valid) laser range. for sick laser it should be set some distance less than max range to allow to assert range validity.
|
private |
Measuremnt is in zone B Measuremnt is dazzled - not valid e.g. in sunshine debug variable - not used Distance in meter
Referenced by getDistance(), print(), setFromTag(), and setValue().
|
protected |
Measured range values
|
protected |
Number of valid ranges (not as measurements)
|
protected |
Scantime
|
protected |
Scannumber
Referenced by ULaserDataSet::setData().
|
private |
Combined variance and curvature tilt of line-fit
Referenced by getTilt(), and setFromTag().
|
protected |
measurment unit: 0 = cm, 1 = mm, 2 = 10cm
Referenced by ULaserDataSet::print(), and ULaserDataSet::setData().
|
protected |
Get fake range using fake=2 option Advance robot position towards target pose in total 'dt' seconds. Returns the distance to the the target position. Make fake map and path Is new structure used - else just range[...]
|
protected |
Is data valid
Referenced by UPlannerValue::clear(), UPlannerValue::getAsString(), UPlannerValue::isValid(), UPlannerValue::setFromTag(), and UPlannerValue::UPlannerValue().
|
private |
Variance Variance
Referenced by getSdL(), getVarL(), and setFromTag().