Main Page   Class Hierarchy   Compound List   Compound Members  

ArSonarDevice Class Reference

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

#include <ArSonarDevice.h>

Inheritance diagram for ArSonarDevice::

ArRangeDevice List of all members.

Public Methods

 ArSonarDevice (size_t currentBufferSize=24, size_t cumulativeBufferSize=64, const char *name="sonar")
 Constructor.

 ~ArSonarDevice (void)
 Destructor.

void processReadings (void)
 Grabs the new readigns from the robot and adds them to the buffers.

virtual void setRobot (ArRobot *robot)
 Sets the robot pointer, also attaches its process function to the sensorInterp of the robot.

virtual void addReading (double x, double y)
 Adds sonar readings to the current and cumulative buffers Overrides the ArRangeDevice default action. More...

void setCumulativeMaxRange (double r)
 Maximum range for a reading to be added to the cumulative buffer (mm).


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


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.

Adds a sonar reading with the global coordinates x,y. Makes sure the reading is within the proper distance to the robot, for both current and cumulative buffers. Filters buffer points Note: please lock the device using lockDevice() / unlockDevice() if calling this from outside process().

Parameters:
x  the global x coordinate of the reading
y  the global y coordinate of the reading

Reimplemented from ArRangeDevice.


The documentation for this class was generated from the following files:
Generated on Tue Nov 12 17:44:06 2002 for Aria by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001