Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

EncEstimator Class Reference

#include <estimator.h>

Inheritance diagram for EncEstimator:

EstimatorBase List of all members.

Public Member Functions

 EncEstimator (double x=0.0, double y=0.0, double ang=0.0)
void update (double fr, double fl, double br, double bl)
 Takes differetial encoder values and uses them to estimate postion/angle of truck.

Protected Attributes

double cosValue
double sinValue

Detailed Description

Definition at line 28 of file estimator.h.


Constructor & Destructor Documentation

EncEstimator::EncEstimator double  x = 0.0,
double  y = 0.0,
double  ang = 0.0
[inline]
 

Definition at line 35 of file estimator.h.

References cosValue, and sinValue.


Member Function Documentation

void EncEstimator::update double  fr,
double  fl,
double  br,
double  bl
 

Takes differetial encoder values and uses them to estimate postion/angle of truck.

The front and rear wheels both have differentials which allows the left and right wheels to move different amounts. Yet, the front set and back set of wheels have to move the same amount. From doing tests on the truck we know that when the truck is making a turn that the left wheels travel about same amount, and so the and the right wheels. This seems to imply that the Right and left wheels are following two circular paths.

formula relating the instantanious forward and angular velocity of the truck to the velocity of the rear wheels.

Formula Key : V_br (meters/s) - forward velocity of back right wheel V_bl (meters/s) - forward velocity of back left wheel V (meters/s) - foward velocity of center of rear axle w (radians/s) - angular velocity of around center of rear axle in CCW direction diameter (meters) - distance from center of right wheel to to center of left wheel radius (meters) - diameter / 2 Forward Formula : V_br = V + w * radius V_bl = V - w * radius Reverse Formula : V = (V_br + V_bl) / 2.0 w = (V_br - V_bl) / (diameter)

Parameters:
<fr> <CHANGE in="" front="" right="" encoder="" value>="">
<fl> <CHANGE in="" front="" left="" encoder="" value>="">
<br> <CHANGE in="" back="" right="" encoder="" value>="">
<bl> <CHANGE in="" back="" left="" encoder="" value>="">
Returns:
<void>
Author:
<Derek>

Definition at line 44 of file estimator.cpp.

References EstimatorBase::angle, hwInterface::axleLength, cosValue, forward(), hwInterface::metersPerTick, sinValue, EstimatorBase::xpos, and EstimatorBase::ypos.

Referenced by main(), and Controller::run().


Member Data Documentation

double EncEstimator::cosValue [protected]
 

Definition at line 31 of file estimator.h.

Referenced by EncEstimator(), and update().

double EncEstimator::sinValue [protected]
 

Definition at line 31 of file estimator.h.

Referenced by EncEstimator(), and update().


The documentation for this class was generated from the following files:
Generated on Fri Sep 1 14:26:00 2006 for Raptor by  doxygen 1.4.4