AURobotServers
4
|
#include <umapobj.h>
Public Member Functions | |
list< UMapRel * >::iterator | beginRel () |
void | clear () |
bool | compareSerial (UMapObj bigger) |
bool | compareSerial (UMapObj smaller, UMapObj bigger) |
bool | copy (UMapObj *source) |
list< UMapRel * >::iterator | endRel () |
UMapObj * | get () |
UMap3dPos * | get3d () |
int | getEstUpdates () |
UMapGmk * | getGmk () |
UPose | getPose () |
UPoseQ | getPoseQ () |
UPose * | getpPose () |
UPoseQ * | getpPoseQ () |
UMapRobot * | getRobot () |
UMapSegment * | getSegment () |
unsigned long | getSerial () |
mapObjType | getType () |
UTime | getUpdTime () |
void | linkAdd (UMapRel *constraint) |
bool | load (Uxml3D *fxmap) |
void | moveTo (double x, double y) |
bool | save (Uxml3D *fmap) |
void | saveHist () |
bool | set3d (UMap3dPos *source) |
bool | set3dPos (UPosition pos, UMatrix4 *posQ=NULL, URotation *ori=NULL, UMatrix4 *oriQ=NULL) |
void | setErrorValuesB (float distSD, float B, bool reset) |
void | setEstPose (double x, double y, double h) |
void | setEstPoseQ (double x, double y, double h, UMatrix4 *zQ=NULL) |
bool | setGmk (unsigned long ID, float blockSize, int frameSize) |
bool | setGmk (UMapGmk *source) |
bool | setInitialGmk (UMapObj *robot, UMapZGmk *measured) |
bool | setInitialPose () |
bool | setInitialPose (UPose zPose, UMatrix4 *zQ, UTime atTime) |
void | setParent (UMapSegment *parentSegment) |
void | setPose (UPoseQ *source) |
bool | setRobot (unsigned long ID, float wheelBase, float distSD, double odoX, double odoY, double odoTheta) |
bool | setRobot (UMapRobot *source) |
bool | setSegment (UMapObj *parentObj, unsigned long segID, char *name) |
void | setSerial (unsigned int value) |
void | setType (mapObjType typ) |
void | setUpdTime (UTime t) |
void | show (const char *prestring) |
UTime * | time () |
const char * | typeAsString () |
UMapObj (UMapSegment *parentSegment) | |
bool | unlink (UMapRel *rel) |
void | updateOdo (double x, double y, double theta, UTime t, bool testReset) |
~UMapObj () | |
Static Public Member Functions | |
static const char * | typeAsString (mapObjType typ) |
static mapObjType | typeFromString (const char *typs) |
Public Attributes | |
UPose | histPose [MAX_POSE_HISTORY] |
int | histPoseCnt |
Protected Attributes | |
UPoseQ * | estPose |
int | estUpds |
list< UMapRel * > | mapRelations |
UMapSegment * | parent |
unsigned long | serial |
UMap3dPos * | to3d |
UMapGmk * | toGmk |
UMapRobot * | toRob |
UMapSegment * | toSeg |
mapObjType | type |
UTime | updTime |
Map object
UMapObj::UMapObj | ( | UMapSegment * | parentSegment | ) |
Constructor
UMapObj::~UMapObj | ( | ) |
Constructor from known pose and measurement error Constructor from known pose details and measurement error Destructor
|
inline |
Get first relation pointer (as iterator)
References mapRelations.
void UMapObj::clear | ( | ) |
Reset object position
|
inline |
Compare two elements for sorting
References compareSerial(), moveTo(), saveHist(), setErrorValuesB(), show(), and updateOdo().
bool UMapObj::copy | ( | UMapObj * | source | ) |
Set content of this object as a copy from the source, except for parent and ID. If source do not contain a sub-elements then that existing sub-elements will be maintained. NB! any relation relations in source or destination will be ignored (left as is). Returns true if successful. Fails if object is a segment or if needed sub-objects could not be created.
|
inline |
Get last (end) relation pointer (as iterator)
References mapRelations.
|
inline |
Get pointer to this
|
inline |
Get number of updates for this object.
References estUpds.
|
inline |
get estimated position
References estPose, and UPoseQ::getPose().
|
inline |
get pointer to estimated position.
References estPose, and UPoseQ::getpPose().
|
inline |
Get reference to last robot info (read only)
References toRob.
|
inline |
Get reference to guidemark info (read only)
References toSeg.
|
inline |
Get serial number
References serial.
|
inline |
Get type of object.
References type.
bool UMapObj::load | ( | Uxml3D * | fxmap | ) |
Load an object from this xml-class. Returns true if read correctly (legally).
Referenced by setType().
void UMapObj::moveTo | ( | double | x, |
double | y | ||
) |
Just move position - and leave the rest as is
Referenced by compareSerial().
bool UMapObj::save | ( | Uxml3D * | fmap | ) |
Save map object data to file in html-like format. returnes true if saved.
Referenced by setType().
void UMapObj::saveHist | ( | ) |
Save pose history
Referenced by compareSerial().
bool UMapObj::set3d | ( | UMap3dPos * | source | ) |
Set 3d position object information as a copy of source.
bool UMapObj::set3dPos | ( | UPosition | pos, |
UMatrix4 * | posQ = NULL , |
||
URotation * | ori = NULL , |
||
UMatrix4 * | oriQ = NULL |
||
) |
Set - make if needed - object 3D position, with optional orientation and (block) covariance matrix for position and orientation separately. If covariance is set to NULL, then matrix is filled with 10.0 in main diaginal for position and orientation (~3pi).
void UMapObj::setErrorValuesB | ( | float | distSD, |
float | B, | ||
bool | reset | ||
) |
Set as robot object and set error values to provided. If reset, then odometer values are reset at next update. Set as robot object and set error values to provided. Heading SD is calculated from wheel separation B. If reset, then odometer values are reset at next update.
Referenced by compareSerial().
void UMapObj::setEstPose | ( | double | x, |
double | y, | ||
double | h | ||
) |
void UMapObj::setEstPoseQ | ( | double | x, |
double | y, | ||
double | h, | ||
UMatrix4 * | zQ = NULL |
||
) |
Create (if needed) estimated pose (with covariance) and set to provided parameters. If covariance is NULL, then covariance set to unit matrix.
bool UMapObj::setGmk | ( | unsigned long | ID, |
float | blockSize, | ||
int | frameSize | ||
) |
Set guidemark information
bool UMapObj::setGmk | ( | UMapGmk * | source | ) |
Set guidemark information
Set object as guidemark from this first measurement
bool UMapObj::setInitialPose | ( | ) |
Update this measurement to absolute zero with zero covariance
Update with this measurement as position only object
|
inline |
void UMapObj::setPose | ( | UPoseQ * | source | ) |
Set estimated pose and covariance from this value
Referenced by setParent().
bool UMapObj::setRobot | ( | unsigned long | ID, |
float | wheelBase, | ||
float | distSD, | ||
double | odoX, | ||
double | odoY, | ||
double | odoTheta | ||
) |
Set - make if needed - robot object with the following parameters.
bool UMapObj::setRobot | ( | UMapRobot * | source | ) |
Set robot inf as copy from source
bool UMapObj::setSegment | ( | UMapObj * | parentObj, |
unsigned long | segID, | ||
char * | name | ||
) |
Set object as new local map. Parent must not be NULL and name must be usable as filename (extension will be added on save).
|
inline |
Set serial number
References serial.
|
inline |
Set object type
References linkAdd(), load(), save(), type, typeAsString(), typeFromString(), and unlink().
void UMapObj::show | ( | const char * | prestring | ) |
Print to console
Referenced by compareSerial().
const char* UMapObj::typeAsString | ( | ) |
Get type of this object as string
Referenced by setType().
|
static |
Get the provided object type as string
|
static |
Convert string to object type, the string must be the one set by typeAsString()
Referenced by setType().
bool UMapObj::unlink | ( | UMapRel * | rel | ) |
Unlink the provided relation from the list of relations. This is normally called from the relation object, when a relation is removed or eliminated.
Referenced by setType().
void UMapObj::updateOdo | ( | double | x, |
double | y, | ||
double | theta, | ||
UTime | t, | ||
bool | testReset | ||
) |
Update object with new robot measurement data. Returns true if the update seems valid, i.e. Reset flag is not set. Time since last update is less than 10 seconds, Heading change is less than o.5 radians, Distance traveled is less than 1 meter. Update robot with this new odometer position
Referenced by compareSerial().
|
protected |
Base position estimate of this object
Referenced by getPose(), getPoseQ(), getpPose(), and getpPoseQ().
|
protected |
Number of updates
Referenced by getEstUpdates().
UPose UMapObj::histPose[MAX_POSE_HISTORY] |
Pose history
int UMapObj::histPoseCnt |
Used history points
|
protected |
List of relation constraints to other objects.
Referenced by beginRel(), and endRel().
|
protected |
Parent segment
Referenced by setParent().
|
protected |
Object serial number
Referenced by compareSerial(), getSerial(), and setSerial().
|
protected |
Object type details, this could be guidemark, correlation detaild, object type estimatein etc.
Referenced by getGmk().
|
protected |
Object type details for moving robot with odometry information
Referenced by getRobot().
|
protected |
Map segment (local map)
Referenced by getSegment().
|
protected |
|
protected |
Time of last update
Referenced by getUpdTime(), setUpdTime(), and time().