bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
bitsim::estimation::DiffDriveGyroModel Class Reference

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

Detailed Description

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.

Member Typedef Documentation

◆ input_type

◆ matrix_type

◆ state_type

Constructor & Destructor Documentation

◆ DiffDriveGyroModel()

bitsim::estimation::DiffDriveGyroModel::DiffDriveGyroModel ( )

Member Function Documentation

◆ evaluate()

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.

◆ get_matrix()

const DiffDriveGyroModel::matrix_type & bitsim::estimation::DiffDriveGyroModel::get_matrix ( const std::string & name) const

◆ get_state() [1/2]

state_type & bitsim::estimation::DiffDriveGyroModel::get_state ( )
inline

◆ get_state() [2/2]

const state_type & bitsim::estimation::DiffDriveGyroModel::get_state ( ) const
inline

◆ get_state_property()

real_t bitsim::estimation::DiffDriveGyroModel::get_state_property ( const std::string & name) const
inline

The documentation for this class was generated from the following files: