|
TR-mbed 1.0
|
#include <WheelKalman.h>
Public Member Functions | |
| WheelKalman () | |
| void | setDt (double dt) |
Public Member Functions inherited from TinyEKF | |
| double | getX (int i) |
| void | setX (int i, double value) |
| bool | step (double *z) |
Public Attributes | |
| double | dt |
| double | u [ControlInputs] |
Protected Member Functions | |
| void | model (double fx[Nsta], double F[Nsta][Nsta], double hx[Mobs], double H[Mobs][Nsta]) override |
Protected Member Functions inherited from TinyEKF | |
| TinyEKF () | |
| ~TinyEKF () | |
| void | setP (int i, int j, double value) |
| void | setQ (int i, int j, double value) |
| void | setR (int i, int j, double value) |
Protected Attributes | |
| double | B [Nsta][ControlInputs] |
Protected Attributes inherited from TinyEKF | |
| double * | x |
The WheelKalman class is a Kalman filter used to control a single wheel/motor. It uses an Extended Kalman Filter (EKF) to implement position control of the wheel.
| WheelKalman::WheelKalman | ( | ) |
Creates a new WheelKalman object
|
overrideprotectedvirtual |
Implement this function for your EKF model.
| fx | gets output of state-transition function f(x0 .. n-1) |
| F | gets n × n Jacobian of f(x) |
| hx | gets output of observation function h(x0 .. n-1) |
| H | gets m × n Jacobian of h(x) |
Implements TinyEKF.
| void WheelKalman::setDt | ( | double | dt | ) |
Sets the dt (time delta) of the kalman filter, used to predict how much the position will change each timestep based on speed and dt
| dt | The time delta in milliseconds |
|
protected |
| double WheelKalman::dt |
| double WheelKalman::u[ControlInputs] |