|
bitsim
Model, simulate, estimate and control robots in C++
|
Classes | |
| class | ObservationModel |
| class | ExtendedKalmanFilter |
| The extended Kalman filter: it predicts the state with a non-linear motion model and corrects it with measurements from any number of observation models, each linearised about the current estimate. More... | |
| class | DiffDriveDynamics |
| DiffDriveDynamics class. Describes the motion of a differential drive robot in the plane: the centre of its axle at (x, y), facing theta. Three versions: More... | |
| class | SysState |
| SysState utility class describing the state of a system. More... | |
| class | IterationCounter |
| The IterationCounter class. More... | |
| class | CSVWriter |
| The CSVWriter class. Handles writing into CSV file format. More... | |
Typedefs | |
| template<typename T> | |
| using | DynMat |
| Dynamically sized matrix to use around the library. | |
| template<typename T> | |
| using | DynVec |
| Dynamically sized row vector. | |
| using | real_t |
| real_t | |
| using | uint_t |
| uint_t | |
Functions | |
| list[float] | get_u () |
| list[float] | motion_model (list[float] x, list[float] u) |
| list[float] | jacob_f (list[float] x, list[float] u) |
| list[float] | observation_model (list[float] x) |
| ObservationOutput | observation (list[float] xTrue, list[float] xd, list[float] u) |
| jacob_h () | |
| EKFEstimationOutput | ekf_estimation (xEst, PEst, z, u) |
| main () | |
| const DynVec< real_t > | get_measurement (const SysState< 3 > &state) |
Variables | |
| str | BROKER = "localhost" |
| int | PORT = 1883 |
| str | GPS_TOPIC = "GPS_TOPIC" |
| str | INPUT_TOPIC = "U_TOPIC" |
| str | STATE_TOPIC = "STATE_TOPIC" |
| bool | SHOW_ANIMATION = False |
| int | INPUT_NOISE = np.diag([1.0, np.deg2rad(30.0)]) ** 2 |
| int | GPS_NOISE = np.diag([0.5, 0.5]) ** 2 |
| float | DT = 0.1 |
| float | SIM_TIME = 50.0 |
| F | |
| H | |
| int | Q |
| int | R = np.diag([1.0, 1.0]) ** 2 |
| ObservationOutput | |
| EKFEstimationOutput | |
Extended kalman filter (EKF) localization sample author: Atsushi Sakai (@Atsushi_twi) This file is edited from https://github.com/AtsushiSakai/PythonRobotics/blob/master/Localization/extended_kalman_filter/extended_kalman_filter.py
| using bitsim::DynMat |
Dynamically sized matrix to use around the library.
| using bitsim::DynVec |
Dynamically sized row vector.
| using bitsim::real_t |
| using bitsim::uint_t |
| EKFEstimationOutput extended_kalman_filter.ekf_estimation | ( | xEst, | |
| PEst, | |||
| z, | |||
| u ) |
| list[float] extended_kalman_filter.get_u | ( | ) |
| list[float] extended_kalman_filter.jacob_f | ( | list[float] | x, |
| list[float] | u ) |
Jacobian of Motion Model
motion model
x_{t+1} = x_t+v*dt*cos(yaw)
y_{t+1} = y_t+v*dt*sin(yaw)
yaw_{t+1} = yaw_t+omega*dt
v_{t+1} = v{t}
so
dx/dyaw = -v*dt*sin(yaw)
dx/dv = dt*cos(yaw)
dy/dyaw = v*dt*cos(yaw)
dy/dv = dt*sin(yaw)
| extended_kalman_filter.jacob_h | ( | ) |
| extended_kalman_filter.main | ( | ) |
| list[float] extended_kalman_filter.motion_model | ( | list[float] | x, |
| list[float] | u ) |
| ObservationOutput extended_kalman_filter.observation | ( | list[float] | xTrue, |
| list[float] | xd, | ||
| list[float] | u ) |
| list[float] extended_kalman_filter.observation_model | ( | list[float] | x | ) |
| str extended_kalman_filter.BROKER = "localhost" |
| float extended_kalman_filter.DT = 0.1 |
| extended_kalman_filter.EKFEstimationOutput |
| extended_kalman_filter.F |
| int extended_kalman_filter.GPS_NOISE = np.diag([0.5, 0.5]) ** 2 |
| str extended_kalman_filter.GPS_TOPIC = "GPS_TOPIC" |
| extended_kalman_filter.H |
| int extended_kalman_filter.INPUT_NOISE = np.diag([1.0, np.deg2rad(30.0)]) ** 2 |
| str extended_kalman_filter.INPUT_TOPIC = "U_TOPIC" |
| extended_kalman_filter.ObservationOutput |
| int extended_kalman_filter.PORT = 1883 |
| int extended_kalman_filter.Q |
| int extended_kalman_filter.R = np.diag([1.0, 1.0]) ** 2 |
| bool extended_kalman_filter.SHOW_ANIMATION = False |
| float extended_kalman_filter.SIM_TIME = 50.0 |
| str extended_kalman_filter.STATE_TOPIC = "STATE_TOPIC" |