ArSonarDevice Class Reference

#include <ArSonarDevice.h>

Inheritance diagram for ArSonarDevice:

ArRangeDevice List of all members.

Detailed Description

Keep track of recent sonar readings from a robot as an ArRangeDevice.

This class is for keeping a sonar history, which you may use for obstacle avoidance, display, etc. Simply use ArRobot::addRangeDevice() (or ArSonarDevice::setRobot()) to attach an ArSonarDevice object to an ArRobot robot object; ArSonarDevice will add a Sensor Interpretation task to the ArRobot which will read new sonar readings each robot cycle and add them to its sonar history.

(Note that sonar range readings are from the surface of the sonar transducer disc, not from the center of the robot.)


actionExample.cpp, actionGroupExample.cpp, actsColorFollowingExample.cpp, demo.cpp, gotoActionExample.cpp, gripperExample.cpp, gyroExample.cpp, robotSyncTaskExample.cpp, teleopActionsExample.cpp, triangleDriveToActionExample.cpp, and wander.cpp.

Definition at line 48 of file ArSonarDevice.h.

Public Member Functions

virtual void addReading (double x, double y)
 ArSonarDevice (size_t currentBufferSize=24, size_t cumulativeBufferSize=64, const char *name="sonar")
void processReadings (void)
void setCumulativeMaxRange (double range)
virtual void setRobot (ArRobot *robot)
virtual ~ArSonarDevice ()

Protected Attributes

double myFilterFarDist
double myFilterNearDist
ArFunctorC< ArSonarDevicemyProcessCB

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. (This method is primarily for internal use.)

Reimplemented from ArRangeDevice.

Definition at line 115 of file ArSonarDevice.cpp.

void ArSonarDevice::processReadings ( void   ) 

Grabs the new readings from the robot and adds them to the buffers (Primarily for internal use.)

Definition at line 67 of file ArSonarDevice.cpp.

void ArSonarDevice::setCumulativeMaxRange ( double  range  )  [inline]

See also:

Definition at line 73 of file ArSonarDevice.h.

void ArSonarDevice::setRobot ( ArRobot robot  )  [virtual]

Sets the robot pointer, also attaches its process function to the robot as a Sensor Interpretation task.

Reimplemented from ArRangeDevice.

Definition at line 59 of file ArSonarDevice.cpp.

The documentation for this class was generated from the following files:
Generated on Fri Dec 1 10:55:19 2006 for Aria by  doxygen 1.4.7