Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

ArIrrfDevice Class Reference

A class for connecting to a PB-9 and managing the resulting data. More...

#include <ArIrrfDevice.h>

Inheritance diagram for ArIrrfDevice:

ArRangeDevice List of all members.

Public Member Functions

 ArIrrfDevice (size_t currentBufferSize=91, size_t cumulativeBufferSize=273, const char *name="irrf")
 Constructor.
bool packetHandler (ArRobotPacket *packet)
 The packet handler for use when connecting to an H8 micro-controller.
void setCumulativeMaxRange (double r)
 Maximum range for a reading to be added to the cumulative buffer (mm).
virtual void setRobot (ArRobot *)
 Sets the robot this device is attached to.
virtual ~ArIrrfDevice ()
 Destructor.

Protected Member Functions

void processReadings (void)

Protected Attributes

double myCumulativeMaxRange
double myFilterFarDist
double myFilterNearDist
std::map< int, ArSensorReading * > myIrrfReadings
ArTime myLastReading
ArRetFunctor1C< bool, ArIrrfDevice,
ArRobotPacket * > 
myPacketHandler

Detailed Description

A class for connecting to a PB-9 and managing the resulting data.

This class is for use with a PB9 IR rangefinder. It has the packethandler necessary to process the packets, and will put the data into ArRangeBuffers for use with obstacle avoidance, etc.

The PB9 is still under development, and only works on an H8 controller running AROS.

Definition at line 47 of file ArIrrfDevice.h.


Member Function Documentation

bool ArIrrfDevice::packetHandler ArRobotPacket packet  ) 
 

The packet handler for use when connecting to an H8 micro-controller.

This is the packet handler for the PB9 data, which is sent via the micro controller, to the client. This will read the data from the packets, and then call processReadings to filter add the data to the current and cumulative buffers.

Definition at line 145 of file ArIrrfDevice.cpp.

References ArTransform::doInvTransform(), ArRobot::getCounter(), ArRobot::getEncoderTransform(), ArRobot::getPose(), ArSensorReading::newData(), ArTime::setToNow(), and ArTransform::setTransform().


The documentation for this class was generated from the following files:
Generated on Wed Oct 19 12:56:49 2005 for Aria by  doxygen 1.4.0