AURobotServers
4
|
#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 |
Robot (measurement) iformation. Stores robot specific information in addition to the more generic map information in the map object.
UMapRobot::UMapRobot | ( | ) |
Constructor
UMapRobot::~UMapRobot | ( | ) |
Destructor
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().
|
inline |
Get distance SD
References distanceSD.
|
inline |
Get movement of left wheel since last update
References dL.
|
inline |
Get movement of right wheel since last update
References dR.
|
inline |
Get last movement in local map coordinates
References dx.
|
inline |
Get last movement in local map coordinates
References dy.
|
inline |
|
inline |
Get heading SD
References headingSD.
|
inline |
Get ID
References code, setErrorValuesB(), and setOdoPosition().
double UMapRobot::getMovedDistance | ( | ) |
Get moved distance from this new odometer x,y position
Referenced by isHeadingSDfromWheelBase().
|
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().
|
inline |
Get heading to new position relative to old heading
References toNewXY.
|
inline |
Get last calculated turn radius (from last odometer update)
References turnRadius.
|
inline |
|
inline |
Get last Theta (heading) in robot odometer coordinates
References zTheta.
|
inline |
|
inline |
Get last x-position in robot odometer coordinates
References zX.
|
inline |
Get last y-position in robot odometer coordinates
References zY.
|
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().
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().
|
inline |
Set odometer reset flag
References odoReset, and setWheelBase().
void UMapRobot::setWheelBase | ( | double | B | ) |
Set wheel base (distance between odometer wheels
Referenced by setOdoReset().
|
private |
Robot (unique) ID
Referenced by getID().
|
private |
measurement distance SD for one meter traveled distance
Referenced by getDistanceSD().
|
private |
Last moved distance for each wheel
Referenced by getdL().
|
private |
Referenced by getdR().
|
private |
Heading change since last update
|
private |
Last moved distance
Referenced by getdx().
|
private |
Referenced by getdy().
|
private |
measurement heading SD for one meter distance travelled
Referenced by getHeadingSD().
|
private |
Heading SD is set from wheel base. If false, then heading SD is set directly independent of wheelbase.
Referenced by isHeadingSDfromWheelBase().
|
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().
|
private |
angle from old heading to new x,y position
Referenced by getToNewHeading().
|
private |
Turn radius (1e5-1 if straight)
Referenced by getTurnRadius().
|
private |
Wheel separation
Referenced by getWheelBase().
|
private |
Measurement time
Referenced by getT(), and getzTime().
|
private |
Measurement heading (newest)
Referenced by getHeading(), and getzTheta().
|
private |
Measurement position (2D)
Referenced by getzX().
|
private |
Referenced by getzY().