|
bitsim
Model, simulate, estimate and control robots in C++
|
The motion model of DiffDriveEKF: a differential drive robot that knows how far it drove from its wheel encoders and how fast it turned from a gyroscope with a bias. More...
#include <diff_drive_ekf.h>
Classes | |
| struct | Input |
Public Types | |
| using | state_type = dynamics::SysState<4> |
| using | matrix_type = DynMat<real_t> |
| using | input_type = Input |
Public Member Functions | |
| DiffDriveGyroModel () | |
| state_type & | evaluate (const Input &input) |
| Move the state by one step, and work out F and L at the state before it. | |
| state_type & | get_state () |
| const state_type & | get_state () const |
| real_t | get_state_property (const std::string &name) const |
| const matrix_type & | get_matrix (const std::string &name) const |
The motion model of DiffDriveEKF: a differential drive robot that knows how far it drove from its wheel encoders and how fast it turned from a gyroscope with a bias.
The state is (x, y, yaw, b): the centre of the axle, the heading and the gyroscope's bias. Over a step of dt the robot drives d and turns by \(\Delta\psi = (g - b)\, dt\), where g is what the gyroscope reads:
\[x' = x + d \cos(\psi + \Delta\psi / 2), \quad y' = y + d \sin(\psi + \Delta\psi / 2), \quad \psi' = \psi + \Delta\psi, \quad b' = b \]
The process noise is (error in d, noise of the gyroscope, random walk of the bias), and F and L are the Jacobians of the step with respect to the state and to that noise.
| bitsim::estimation::DiffDriveGyroModel::DiffDriveGyroModel | ( | ) |
| DiffDriveGyroModel::state_type & bitsim::estimation::DiffDriveGyroModel::evaluate | ( | const Input & | input | ) |
Move the state by one step, and work out F and L at the state before it.
| const DiffDriveGyroModel::matrix_type & bitsim::estimation::DiffDriveGyroModel::get_matrix | ( | const std::string & | name | ) | const |
|
inline |
|
inline |
|
inline |