#include <estimator.h>
Inheritance diagram for EncEstimator:

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 |
Definition at line 28 of file estimator.h.
|
||||||||||||||||
|
Definition at line 35 of file estimator.h. |
|
||||||||||||||||||||
|
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)
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(). |
|
|
Definition at line 31 of file estimator.h. Referenced by EncEstimator(), and update(). |
|
|
Definition at line 31 of file estimator.h. Referenced by EncEstimator(), and update(). |
1.4.4