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

#include <umaprobot.h>

Public Member Functions

void clear ()
 
void copy (UMapRobot *source)
 
double getDeltaHeading ()
 
double getDistanceSD ()
 
double getdL ()
 
double getdR ()
 
double getdx ()
 
double getdy ()
 
double getHeading ()
 
double getHeadingSD ()
 
const unsigned long getID ()
 
double getMovedDistance ()
 
bool getOdoReset ()
 
UPose getPose ()
 
UMatrix4 getQ (double dist)
 
UTime getT ()
 
double getToNewHeading ()
 
double getTurnRadius ()
 
double getWheelBase ()
 
double getzTheta ()
 
UTime getzTime ()
 
double getzX ()
 
double getzY ()
 
bool isHeadingSDfromWheelBase ()
 
bool load (Uxml3D *fxmap, char *name=NULL)
 
UMapRobot operator= (UMapRobot source)
 
bool save (Uxml3D *fxmap, const char *name=NULL)
 
void setErrorValuesB (float distSD, float B)
 
void setID (const unsigned long ID)
 
void setOdo (double x, double y)
 
void setOdo (double x, double y, double theta)
 
bool setOdoPosition (float x, float y, float theta, UTime t, bool testReset, bool doReset)
 
void setOdoReset (bool value)
 
void setWheelBase (double B)
 
 UMapRobot ()
 
 ~UMapRobot ()
 

Private Attributes

unsigned long code
 
double distanceSD
 
double dL
 
double dR
 
double dTheta
 
double dx
 
double dy
 
double headingSD
 
bool headingSDfromWheelBase
 
bool odoReset
 
double toNewXY
 
double turnRadius
 
double wheelBase
 
UTime zT
 
double zTheta
 
double zX
 
double zY
 

Detailed Description

Robot (measurement) iformation. Stores robot specific information in addition to the more generic map information in the map object.

Constructor & Destructor Documentation

UMapRobot::UMapRobot ( )

Constructor

UMapRobot::~UMapRobot ( )

Destructor

Member Function Documentation

void UMapRobot::clear ( )

Clear measurement and including ID and size

void UMapRobot::copy ( UMapRobot source)

Make this object a copy og source object

double UMapRobot::getDeltaHeading ( )

Get heading change. Returned value is within +/- PI Get heading change to this new heading. Returned value is within +/- PI

Referenced by isHeadingSDfromWheelBase().

double UMapRobot::getDistanceSD ( )
inline

Get distance SD

References distanceSD.

double UMapRobot::getdL ( )
inline

Get movement of left wheel since last update

References dL.

double UMapRobot::getdR ( )
inline

Get movement of right wheel since last update

References dR.

double UMapRobot::getdx ( )
inline

Get last movement in local map coordinates

References dx.

double UMapRobot::getdy ( )
inline

Get last movement in local map coordinates

References dy.

double UMapRobot::getHeading ( )
inline

Get measured heading (from odometer calculation)

References getPose(), and zTheta.

double UMapRobot::getHeadingSD ( )
inline

Get heading SD

References headingSD.

const unsigned long UMapRobot::getID ( )
inline

Get ID

References code, setErrorValuesB(), and setOdoPosition().

double UMapRobot::getMovedDistance ( )

Get moved distance from this new odometer x,y position

Referenced by isHeadingSDfromWheelBase().

bool UMapRobot::getOdoReset ( )
inline

Get odometer reset flag. This flag indicates hat odometer based position is reset (has new reference)

References odoReset.

UPose UMapRobot::getPose ( )

Get measured pose

Referenced by getHeading().

UMatrix4 UMapRobot::getQ ( double  dist)

Get covariance matrix for this moved distance. The matrix is a 2x2 of the form [Vd, 0; 0, Vtheta].

Referenced by isHeadingSDfromWheelBase().

UTime UMapRobot::getT ( )
inline

Get update time

References zT.

double UMapRobot::getToNewHeading ( )
inline

Get heading to new position relative to old heading

References toNewXY.

double UMapRobot::getTurnRadius ( )
inline

Get last calculated turn radius (from last odometer update)

References turnRadius.

double UMapRobot::getWheelBase ( )
inline

Set wheel base (distance between odometer wheels

References setOdo(), and wheelBase.

double UMapRobot::getzTheta ( )
inline

Get last Theta (heading) in robot odometer coordinates

References zTheta.

UTime UMapRobot::getzTime ( )
inline

Get last odometer update time

References load(), save(), and zT.

double UMapRobot::getzX ( )
inline

Get last x-position in robot odometer coordinates

References zX.

double UMapRobot::getzY ( )
inline

Get last y-position in robot odometer coordinates

References zY.

bool UMapRobot::isHeadingSDfromWheelBase ( )
inline

Is heading SD calculated from wheel-base, i.e. is stearing done by controlling left and right drive wheel.

References dist, getDeltaHeading(), getMovedDistance(), getQ(), headingSDfromWheelBase, and operator=().

bool UMapRobot::load ( Uxml3D *  fxmap,
char *  name = NULL 
)

Load robot odometry information from a xml-class object. Returns true if read.

Referenced by getzTime().

UMapRobot UMapRobot::operator= ( UMapRobot  source)

Assign new values from measurement

Referenced by isHeadingSDfromWheelBase().

bool UMapRobot::save ( Uxml3D *  fxmap,
const char *  name = NULL 
)

SAve robot info in html-like format. Returns true if saved.

Referenced by getzTime().

void UMapRobot::setErrorValuesB ( float  distSD,
float  B 
)

Set position measurement error parameters Set position measurement error parameters from known distance SD (meter per moved meter) and wheel base B (meter)

Referenced by getID().

void UMapRobot::setID ( const unsigned long  ID)

Set Guidemark code. Code -1 is invalid

void UMapRobot::setOdo ( double  x,
double  y 
)

Set known odometer position of (last) update. The theta is not set (left as is).

Referenced by getWheelBase().

void UMapRobot::setOdo ( double  x,
double  y,
double  theta 
)

Set known odometer position of (last) update.

bool UMapRobot::setOdoPosition ( float  x,
float  y,
float  theta,
UTime  t,
bool  testReset,
bool  doReset 
)

Set measurement position. if optional parameter 'reset' is true, then this is the first measurement, so no compare with previous measurement is meaningful. Returns false if no valid previous odometer position is valid, i.e. odometer position is reset to provided position.

Referenced by getID().

void UMapRobot::setOdoReset ( bool  value)
inline

Set odometer reset flag

References odoReset, and setWheelBase().

void UMapRobot::setWheelBase ( double  B)

Set wheel base (distance between odometer wheels

Referenced by setOdoReset().

Member Data Documentation

unsigned long UMapRobot::code
private

Robot (unique) ID

Referenced by getID().

double UMapRobot::distanceSD
private

measurement distance SD for one meter traveled distance

Referenced by getDistanceSD().

double UMapRobot::dL
private

Last moved distance for each wheel

Referenced by getdL().

double UMapRobot::dR
private

Referenced by getdR().

double UMapRobot::dTheta
private

Heading change since last update

double UMapRobot::dx
private

Last moved distance

Referenced by getdx().

double UMapRobot::dy
private

Referenced by getdy().

double UMapRobot::headingSD
private

measurement heading SD for one meter distance travelled

Referenced by getHeadingSD().

bool UMapRobot::headingSDfromWheelBase
private

Heading SD is set from wheel base. If false, then heading SD is set directly independent of wheelbase.

Referenced by isHeadingSDfromWheelBase().

bool UMapRobot::odoReset
private

Is odometer position reset. this means that this position can not be compared with the previous, and that no real update can be performed with this data.

Referenced by getOdoReset(), and setOdoReset().

double UMapRobot::toNewXY
private

angle from old heading to new x,y position

Referenced by getToNewHeading().

double UMapRobot::turnRadius
private

Turn radius (1e5-1 if straight)

Referenced by getTurnRadius().

double UMapRobot::wheelBase
private

Wheel separation

Referenced by getWheelBase().

UTime UMapRobot::zT
private

Measurement time

Referenced by getT(), and getzTime().

double UMapRobot::zTheta
private

Measurement heading (newest)

Referenced by getHeading(), and getzTheta().

double UMapRobot::zX
private

Measurement position (2D)

Referenced by getzX().

double UMapRobot::zY
private

Referenced by getzY().


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