rec::robotino::api2 C++ interface
Public Member Functions | Friends | List of all members
rec::robotino::api2::Odometry Class Reference

Represents Robotino's odoemtry module. More...

#include <Odometry.h>

Inheritance diagram for rec::robotino::api2::Odometry:
rec::robotino::api2::ComObject

Public Member Functions

void setComId (const ComId &id)
 
void readings (double *x, double *y, double *phi, unsigned int *sequence=0) const
 
bool set (double x, double y, double phi, int timeout=0)
 
virtual void readingsEvent (double x, double y, double phi, float vx, float vy, float omega, unsigned int sequence)
 
virtual void mapFrameCoordinatesEvent (double x, double y, double phi)
 
virtual void mapImagePixelCoordinatesEvent (int x, int y, double phi)
 
- Public Member Functions inherited from rec::robotino::api2::ComObject
 ComObject ()
 
virtual ~ComObject ()
 
ComId comId () const
 

Friends

class OdometryImpl
 

Additional Inherited Members

- Protected Attributes inherited from rec::robotino::api2::ComObject
ComId _comID
 

Detailed Description

Represents Robotino's odoemtry module.

Member Function Documentation

virtual void rec::robotino::api2::Odometry::mapFrameCoordinatesEvent ( double  x,
double  y,
double  phi 
)
virtual

Called when new odometry data is available.

Parameters
xGlobal x position of Robotino in the map frame in m.
yGlobal y position of Robotino in the map frame in m.
phiGlobal orientation of Robotino in the map frame in rad.
Remarks
This function is called from the thread in which Com::processEvents() is called.
See also
Com::processEvents
virtual void rec::robotino::api2::Odometry::mapImagePixelCoordinatesEvent ( int  x,
int  y,
double  phi 
)
virtual

Called when new odometry data is available.

Parameters
xx-position of Robotino in the map image in pixel.
yy-position of Robotino in the map image in pixel.
phiGlobal orientation of Robotino in the map frame in rad.
Remarks
This function is called from the thread in which Com::processEvents() is called.
See also
Com::processEvents
void rec::robotino::api2::Odometry::readings ( double *  x,
double *  y,
double *  phi,
unsigned int *  sequence = 0 
) const
Parameters
xGlobal x position of Robotino in m.
yGlobal y position of Robotino in m.
phiGlobal orientation of Robotino in rad.
sequenceThe sequence number of the current readings. When starting your application the sequence number is 0. The sequence number is increased 1 each time the odometry is updated.
Exceptions
nothing.
Remarks
This function is thread save
virtual void rec::robotino::api2::Odometry::readingsEvent ( double  x,
double  y,
double  phi,
float  vx,
float  vy,
float  omega,
unsigned int  sequence 
)
virtual

Called when new odometry data is available.

Parameters
xGlobal x position of Robotino in m.
yGlobal y position of Robotino in m.
phiGlobal orientation of Robotino in rad.
vxx velocity of Robotino.
vyy velocity of Robotino.
omegaAngular velocity of Robotino.
sequenceThe sequence number of the current readings. When starting your application the sequence number is 0. The sequence number is increased 1 each time the odometry is updated.
Remarks
This function is called from the thread in which Com::processEvents() is called.
See also
Com::processEvents
bool rec::robotino::api2::Odometry::set ( double  x,
double  y,
double  phi,
int  timeout = 0 
)

Set Robotino's odometry to the given coordinates

Parameters
xGlobal x position in m
yGlobal y position in m
phiGlobal phi orientation in rad
timeoutTimeout parameter in Milliseconds If 0 the function returns true immediately. If -1 the function blocks until the odometry is set. If >0 the function blocks until the odometry is set or if the operation timed out. In the case of timeout the function returns false.
Exceptions
RobotinoExceptionif the current communication object is invalid.
Remarks
This function is thread save
void rec::robotino::api2::Odometry::setComId ( const ComId id)

Sets the associated communication object.

Parameters
idThe id of the associated communication object.
Exceptions
RobotinoExceptionif given id is invalid.
Remarks
This function is thread save

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