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

ArSonarDevice Class Reference

A class for keeping track of sonar. More...

#include <ArSonarDevice.h>

Inheritance diagram for ArSonarDevice:

ArRangeDevice List of all members.

Public Member Functions

virtual void addReading (double x, double y)
 ArSonarDevice (size_t currentBufferSize=24, size_t cumulativeBufferSize=64, const char *name="sonar")
 Constructor.
void processReadings (void)
 Grabs the new readings from the robot and adds them to the buffers.
void setCumulativeMaxRange (double range)
 you should see and use setMaxDistToKeepCumulative (it replaces this)
virtual void setRobot (ArRobot *robot)
virtual ~ArSonarDevice ()
 Destructor.

Protected Attributes

double myFilterFarDist
double myFilterNearDist
ArFunctorC< ArSonarDevicemyProcessCB

Detailed Description

A class for keeping track of sonar.

This class is for keeping a sonar history, and using that for obstacle avoidance and displays and what not

Definition at line 41 of file ArSonarDevice.h.


Member Function Documentation

void ArSonarDevice::addReading double  x,
double  y
[virtual]
 

Adds sonar readings to the current and cumulative buffers Overrides the ArRangeDevice default action

Reimplemented from ArRangeDevice.

Definition at line 116 of file ArSonarDevice.cpp.

References ArRangeBuffer::addReading(), ArRangeBuffer::beginInvalidationSweep(), ArRangeBuffer::endInvalidationSweep(), ArRangeBuffer::getBuffer(), ArRobot::getX(), ArRobot::getY(), and ArRangeBuffer::invalidateReading().

Referenced by processReadings().

void ArSonarDevice::setRobot ArRobot robot  )  [virtual]
 

Sets the robot pointer, also attaches its process function to the sensorInterp of the robot

Reimplemented from ArRangeDevice.

Definition at line 60 of file ArSonarDevice.cpp.

References ArRobot::addSensorInterpTask(), and ArRangeDevice::setRobot().


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