AURobotServers  4
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | List of all members
UMapObj Class Reference

#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 ()
 
UMapObjget ()
 
UMap3dPosget3d ()
 
int getEstUpdates ()
 
UMapGmkgetGmk ()
 
UPose getPose ()
 
UPoseQ getPoseQ ()
 
UPosegetpPose ()
 
UPoseQgetpPoseQ ()
 
UMapRobotgetRobot ()
 
UMapSegmentgetSegment ()
 
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)
 
UTimetime ()
 
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

UPoseQestPose
 
int estUpds
 
list< UMapRel * > mapRelations
 
UMapSegmentparent
 
unsigned long serial
 
UMap3dPosto3d
 
UMapGmktoGmk
 
UMapRobottoRob
 
UMapSegmenttoSeg
 
mapObjType type
 
UTime updTime
 

Detailed Description

Map object

Author
Christian Andersen

Constructor & Destructor Documentation

UMapObj::UMapObj ( UMapSegment parentSegment)

Constructor

UMapObj::~UMapObj ( )

Constructor from known pose and measurement error Constructor from known pose details and measurement error Destructor

Member Function Documentation

list<UMapRel *>::iterator UMapObj::beginRel ( )
inline

Get first relation pointer (as iterator)

References mapRelations.

void UMapObj::clear ( )

Reset object position

bool UMapObj::compareSerial ( UMapObj  bigger)
inline

Compare two elements for sorting

References serial.

Referenced by compareSerial().

bool UMapObj::compareSerial ( UMapObj  smaller,
UMapObj  bigger 
)
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.

list<UMapRel *>::iterator UMapObj::endRel ( )
inline

Get last (end) relation pointer (as iterator)

References mapRelations.

UMapObj* UMapObj::get ( )
inline

Get pointer to this

UMap3dPos* UMapObj::get3d ( )
inline

get estimated orientation

References to3d.

int UMapObj::getEstUpdates ( )
inline

Get number of updates for this object.

References estUpds.

UMapGmk* UMapObj::getGmk ( )
inline

Get reference to guidemark info (read only)

References toGmk.

UPose UMapObj::getPose ( )
inline

get estimated position

References estPose, and UPoseQ::getPose().

UPoseQ UMapObj::getPoseQ ( )
inline

get pointer to estimated position block.

References estPose.

UPose* UMapObj::getpPose ( )
inline

get pointer to estimated position.

References estPose, and UPoseQ::getpPose().

UPoseQ* UMapObj::getpPoseQ ( )
inline

get pointer to estimated position block.

References estPose.

UMapRobot* UMapObj::getRobot ( )
inline

Get reference to last robot info (read only)

References toRob.

UMapSegment* UMapObj::getSegment ( )
inline

Get reference to guidemark info (read only)

References toSeg.

unsigned long UMapObj::getSerial ( )
inline

Get serial number

References serial.

mapObjType UMapObj::getType ( )
inline

Get type of object.

References type.

UTime UMapObj::getUpdTime ( )
inline

Get last update tile as UTime type.

References updTime.

void UMapObj::linkAdd ( UMapRel constraint)

Add a link to a relation

Referenced by setType().

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

bool UMapObj::setInitialGmk ( UMapObj robot,
UMapZGmk measured 
)

Set object as guidemark from this first measurement

bool UMapObj::setInitialPose ( )

Update this measurement to absolute zero with zero covariance

bool UMapObj::setInitialPose ( UPose  zPose,
UMatrix4 zQ,
UTime  atTime 
)

Update with this measurement as position only object

void UMapObj::setParent ( UMapSegment parentSegment)
inline

Set relation to parent map segment. This should not be needed, as new objects should be created using add(), that assigne ID and parent relation itself

References parent, and setPose().

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

void UMapObj::setSerial ( unsigned int  value)
inline

Set serial number

References serial.

void UMapObj::setType ( mapObjType  typ)
inline

Set object type

References linkAdd(), load(), save(), type, typeAsString(), typeFromString(), and unlink().

void UMapObj::setUpdTime ( UTime  t)
inline

Set serial number

References updTime.

void UMapObj::show ( const char *  prestring)

Print to console

Referenced by compareSerial().

UTime* UMapObj::time ( )
inline

Get pointer to update time

References updTime.

const char* UMapObj::typeAsString ( )

Get type of this object as string

Referenced by setType().

static const char* UMapObj::typeAsString ( mapObjType  typ)
static

Get the provided object type as string

static mapObjType UMapObj::typeFromString ( const char *  typs)
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().

Member Data Documentation

UPoseQ* UMapObj::estPose
protected

Base position estimate of this object

Referenced by getPose(), getPoseQ(), getpPose(), and getpPoseQ().

int UMapObj::estUpds
protected

Number of updates

Referenced by getEstUpdates().

UPose UMapObj::histPose[MAX_POSE_HISTORY]

Pose history

int UMapObj::histPoseCnt

Used history points

list<UMapRel *> UMapObj::mapRelations
protected

List of relation constraints to other objects.

Referenced by beginRel(), and endRel().

UMapSegment* UMapObj::parent
protected

Parent segment

Referenced by setParent().

unsigned long UMapObj::serial
protected

Object serial number

Referenced by compareSerial(), getSerial(), and setSerial().

UMap3dPos* UMapObj::to3d
protected

3D position supplement to map position

Referenced by get3d().

UMapGmk* UMapObj::toGmk
protected

Object type details, this could be guidemark, correlation detaild, object type estimatein etc.

Referenced by getGmk().

UMapRobot* UMapObj::toRob
protected

Object type details for moving robot with odometry information

Referenced by getRobot().

UMapSegment* UMapObj::toSeg
protected

Map segment (local map)

Referenced by getSegment().

mapObjType UMapObj::type
protected

Object type marker

Referenced by getType(), and setType().

UTime UMapObj::updTime
protected

Time of last update

Referenced by getUpdTime(), setUpdTime(), and time().


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