Aria  2.8.0
ArTCMCompassRobot Class Reference

Interface to a TCM 2/2.5/2.6 3-axis compass through the robot microcontroller. More...

#include <ArTCMCompassRobot.h>

Inherits ArTCM2.

Public Member Functions

 ArTCMCompassRobot (ArRobot *robot)
 
virtual void commandAutoCalibration (void)
 
virtual void commandContinuousPackets (void)
 
virtual void commandJustCompass (void)
 
virtual void commandOff (void)
 
virtual void commandOnePacket (void)
 
virtual void commandSoftReset (void)
 
virtual void commandStopCalibration (void)
 
virtual void commandUserCalibration (void)
 
- Public Member Functions inherited from ArTCM2
void addHeadingDataCallback (ArFunctor1< double > *f)
 
virtual bool blockingConnect (unsigned long connectTimeout=5000)
 If a connection/initialization procedure is required, perform it, wait until data is recieved from the compass, and return true on success, false on failure. More...
 
virtual bool connect ()
 If a connection/initialization procedure is required, perform it, and return true on success, false on failure. More...
 
double getCalibrationH (void) const
 Get the calibration H score (See TCM Manual)
 
double getCalibrationM (void) const
 Get the calibration M score (See TCM Manual)
 
double getCalibrationV (void) const
 Get the calibration V score (See TCM Manual)
 
double getCompass (void) const
 Get the compass heading (-180, 180] degrees. More...
 
int getError (void) const
 
double getHeading (void) const
 Get the compass heading (-180, 180] degrees.
 
int getPacCount (void)
 Gets the number of readings recieved in the last second.
 
double getPitch (void) const
 Get the pitch (-180,180] degrees.
 
double getRoll (void) const
 Get the roll (-180,180] degrees.
 
double getTemperature (void) const
 Get the temperature (degrees C)
 
double getXMagnetic (void) const
 Get the magnetic field X component (See TCM2 Manual)
 
double getYMagnetic (void) const
 Get the magnetic field Y component (See TCM2 Manual)
 
double getZMagnetic (void) const
 Get the magnetic field Z component (See TCM2 Manual)
 
bool haveCalibrationH () const
 
bool haveCalibrationM () const
 
bool haveCalibrationV () const
 
bool haveHeading () const
 
bool havePitch () const
 
bool haveRoll () const
 
bool haveTemperature () const
 
bool haveXMagnetic () const
 
bool haveYMagnetic () const
 
bool haveZMagnetic () const
 

Additional Inherited Members

- Protected Member Functions inherited from ArTCM2
void incrementPacketCount ()
 
void invokeHeadingDataCallbacks (double heading)
 
- Protected Attributes inherited from ArTCM2
double myCalibrationH
 
double myCalibrationM
 
double myCalibrationV
 
int myError
 
bool myHaveCalibrationH
 
bool myHaveCalibrationM
 
bool myHaveCalibrationV
 
bool myHaveHeading
 
bool myHavePitch
 
bool myHaveRoll
 
bool myHaveTemperature
 
bool myHaveXMag
 
bool myHaveYMag
 
bool myHaveZMag
 
double myHeading
 
std::list< ArFunctor1< double > *> myHeadingDataCallbacks
 
int myPacCount
 
int myPacCurrentCount
 
double myPitch
 
double myRoll
 
double myTemperature
 
time_t myTimeLastPacket
 
double myXMag
 
double myYMag
 
double myZMag
 

Detailed Description

Interface to a TCM 2/2.5/2.6 3-axis compass through the robot microcontroller.

When a Pioneer robot is equipped with a TCM compass, it is typically connected to the robot microcontroller, which returns compass information in compass data packets upon request (set compass mode/type to 2 or 3 in firmware configuration; mode 1 (data in SIP) is not supported by ARIA). This class communicates with the robot microcontroller to configure the compass and recieve data from it.


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