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

ArInterpolation Class Reference

#include <ArInterpolation.h>

List of all members.


Detailed Description

This class takes care of storing in readings of position vs time, and then interpolating between them to find where the robot was at a particular point in time. It has two lists, one containing the times, and one containing the positions at those same times (per position), they must be walked through jointly to maintain cohesion. The new entries are at the front of the list, while the old ones are at the back. numberOfReadings and the setNumberOfReadings control the number of entries in the list. If a size is set that is smaller than the current size, then the old ones are chopped off.


Public Member Functions

bool addReading (ArTime timeOfReading, ArPose position)
 Adds a new reading.
 ArInterpolation (size_t numberOfReadings=100)
 Constructor.
size_t getNumberOfReadings (void) const
 Gets the number of readings this instance holds back in time.
int getPose (ArTime timeStamp, ArPose *position)
 Finds a position.
void reset (void)
 Empties the interpolated positions.
void setNumberOfReadings (size_t numberOfReadings)
 Sets the number of readings this instance holds back in time.
virtual ~ArInterpolation ()
 Destructor.

Protected Attributes

ArMutex myDataMutex
std::list< ArPosemyPoses
size_t mySize
std::list< ArTimemyTimes


Member Function Documentation

int ArInterpolation::getPose ArTime  timeStamp,
ArPose position
 

Finds a position.

Parameters:
timeStamp the time we are interested in
position the pose to set to the given position
Returns:
1 its good interpolation, 0 its predicting, -1 its too far to predict, -2 its too old, -3 there's not enough data to predict


The documentation for this class was generated from the following files:
Generated on Thu Jan 7 10:34:41 2010 for Aria by  doxygen 1.4.2