AURobotServers
4
|
#include <ufeaturepool.h>
Public Member Functions | |
bool | addSegment (ULineSegment *seg, int segInt, double segVal, const char *idStr) |
void | clear () |
const char * | getDataType () |
UTime | getScanTime () |
ULineSegment * | getSegs () |
int | getSegsCnt () |
int * | getSegsInt () |
int | getSegsMax () |
double * | getSegsVal () |
int | getTypeMax () |
bool | isA (const char *key) |
bool | isValid () |
void | moveLocalToOdo (UPose scanPose, UPosRot sensorPose) |
UFeatureData () | |
~UFeatureData () | |
Public Member Functions inherited from ULock | |
bool | lock () |
void | lockInit () |
void | post () |
bool | tryLock () |
bool | tryWait () |
ULock () | |
void | unlock () |
bool | wait () |
~ULock () | |
Public Attributes | |
int | coordinateRef |
bool | isNewest |
UPose | pose |
UTime | scanTime |
ULineSegment | segs [MAX_SEGMENTS] |
int | segsCnt |
int | segsInt [MAX_SEGMENTS] |
char | segsStr [MAX_SEGMENTS][MAX_SEG_STR_LENGTH] |
double | segsValue [MAX_SEGMENTS] |
char | type [MAX_TYPE_LENGTH] |
bool | valid |
Static Public Attributes | |
static const int | MAX_SEG_STR_LENGTH = 16 |
static const int | MAX_SEGMENTS = 40 |
static const int | MAX_TYPE_LENGTH = 5 |
UFeatureData::UFeatureData | ( | ) |
Constructor
References clear().
UFeatureData::~UFeatureData | ( | ) |
Destructor
bool UFeatureData::addSegment | ( | ULineSegment * | seg, |
int | segInt, | ||
double | segVal, | ||
const char * | idStr | ||
) |
add segment
References MAX_SEG_STR_LENGTH, MAX_SEGMENTS, segs, segsCnt, segsInt, segsStr, and segsValue.
Referenced by UFeaturePool::addData(), UResLaserIfSf::handlePass(), UResLaserIfSf::handleRoad(), and UResLaserIfSf::handleSF().
void UFeatureData::clear | ( | void | ) |
Clear segments
References UTime::clear(), coordinateRef, scanTime, segsCnt, and valid.
Referenced by UFeaturePool::addData(), UFeaturePool::clear(), getSegsCnt(), and UFeatureData().
|
inline |
Get line data type
References type.
Referenced by UNavPaint::paintFeatures(), and UNavView::paintFeatures().
|
inline |
Get segment scan time
References moveLocalToOdo(), and scanTime.
|
inline |
Get line segment
References segs.
Referenced by UNavPaint::paintFeatures(), and UNavView::paintFeatures().
|
inline |
Get segment count
References clear(), and segsCnt.
Referenced by UNavPaint::paintFeatures(), and UNavView::paintFeatures().
|
inline |
Get line integer array
References segsInt.
Referenced by UNavPaint::paintFeatures(), and UNavView::paintFeatures().
|
inline |
Get max number of segments allowed
References MAX_SEGMENTS.
|
inline |
|
inline |
Get max number of characters in type string
References MAX_TYPE_LENGTH.
Referenced by UFeaturePool::addData().
|
inline |
Compare this type with a key string. Compare is case sensitive. Returns true if type match.
References type.
Referenced by UFeaturePool::markAsNotNew().
|
inline |
Is scan data valid
References valid.
Move data to odometry pose
References coordinateRef, ULineSegment::getOtherEnd(), UPose::getPoseToMap(), UPosRot::getRtoMMatrix(), ULine::pos, pose, segs, segsCnt, and ULineSegment::setFromPoints().
Referenced by getScanTime(), UResLaserIfSf::handlePass(), and UResLaserIfSf::handleSF().
int UFeatureData::coordinateRef |
Is the dataset valid in robot coordinates or anothe grid system valid values are -1 = local robot coordinates 0 odometry coordinates 1 UTM coordinates 2 map coordinates
Referenced by clear(), UResLaserIfSf::handleSF(), and moveLocalToOdo().
bool UFeatureData::isNewest |
Is data the newest
Referenced by UFeaturePool::addData(), UFeaturePool::markAsNotNew(), and UNavPaint::paintFeatures().
|
static |
Max length of string value for a segment
Referenced by addSegment(), UResLaserIfSf::handleRoad(), and UResLaserIfSf::handleSF().
|
static |
Max number of segments
Referenced by addSegment(), and getSegsMax().
|
static |
Maximum string length of segment type
Referenced by getTypeMax(), UResLaserIfSf::handlePass(), UResLaserIfSf::handleRoad(), and UResLaserIfSf::handleSF().
UPose UFeatureData::pose |
Robot pose at scantime
Referenced by UFeaturePool::addData(), UResLaserIfSf::handlePass(), UResLaserIfSf::handleSF(), and moveLocalToOdo().
UTime UFeatureData::scanTime |
Timestamp for scan
Referenced by UFeaturePool::addData(), clear(), getScanTime(), UResLaserIfSf::handlePass(), UResLaserIfSf::handleRoad(), and UResLaserIfSf::handleSF().
ULineSegment UFeatureData::segs[MAX_SEGMENTS] |
Segments
Referenced by UFeaturePool::addData(), addSegment(), getSegs(), and moveLocalToOdo().
int UFeatureData::segsCnt |
Number of segments in array
Referenced by UFeaturePool::addData(), addSegment(), clear(), getSegsCnt(), and moveLocalToOdo().
int UFeatureData::segsInt[MAX_SEGMENTS] |
Data integer for general use, e.g. for road lines (left=0, center=1 right=2)
Referenced by UFeaturePool::addData(), addSegment(), and getSegsInt().
char UFeatureData::segsStr[MAX_SEGMENTS][MAX_SEG_STR_LENGTH] |
Data string for general use
Referenced by UFeaturePool::addData(), addSegment(), UNavPaint::paintFeatures(), and UNavView::paintFeatures().
double UFeatureData::segsValue[MAX_SEGMENTS] |
An extra double value associated to each feature
Referenced by UFeaturePool::addData(), addSegment(), and getSegsVal().
char UFeatureData::type[MAX_TYPE_LENGTH] |
Segment type (c-string) typically holding the XML tag name
Referenced by UFeaturePool::addData(), getDataType(), UResLaserIfSf::handlePass(), UResLaserIfSf::handleRoad(), UResLaserIfSf::handleSF(), and isA().
bool UFeatureData::valid |
Is the dataset valid
Referenced by UFeaturePool::addData(), clear(), and isValid().