GithubHelp home page GithubHelp logo

ser94mor / sensor-fusion Goto Github PK

View Code? Open in Web Editor NEW
173.0 173.0 54.0 4 MB

Filters: KF, EKF, UKF || Process Models: CV, CTRV || Measurement Models: Radar, Lidar

License: GNU General Public License v3.0

CMake 2.58% C++ 83.74% C 1.85% Shell 0.15% Cuda 1.03% Fortran 10.47% Python 0.07% JavaScript 0.06% CSS 0.04%
cpp cpp14 ctrv cv eigen-library ekf extended-kalman-filter fusion kalman-filter kf lidar measurement-models process-models radar sensor-fusion ukf unscented-kalman-filter

sensor-fusion's Introduction

Sensor Fusion with KF, EKF, and UKF for CV & CTRV Process Models and Lidar & Radar Measurements Models

This repository contains implementations of Kalman filter, extended Kalman filter, and unscented Kalman filter for the selected process and measurement models.

Process Models:

Measurement Models:

The project relies on the Eigen library for vector and matrix operations.

A great effort has been put in designing abstractions of filter, process model, and measurement model. The code heavily relies on C++ templates and avoids dynamic memory allocations, which is crucial for embedded systems, such as, self-driving car's onboard computer.

Configurations

There are several files defining int main(int, char**) function.

Demo

One of the configurations works with the Udacity Self-Driving Car Engineer Nanodegree Term 2 Simulator.
demo

Dependencies

  • cmake >= 3.5
  • gcc/g++ >= 6.0

Additional:

Build

The project can be built by doing the following from the project top directory.

$> mkdir build
$> cd build
$> cmake ..
$> make
$> cd ..

Run

Filters

While implementing different variations of Kalman filters, the notation from the book "Thrun, S., Burgard, W. and Fox, D., 2005. Probabilistic robotics. MIT press." was followed.

Kalman Filter

The equations below describe the Kalman filter and are implemented in the KalmanFilter class. Algorithm_Kalman_filter
For explanations of what each variable means, please, refer to comments in the code in corresponding files or the book "Thrun, S., Burgard, W. and Fox, D., 2005. Probabilistic robotics. MIT press."

Extended Kalman Filter

The equations below describe the extended Kalman filter and are implemented in the ExtendedKalmanFilter class. Algorithm_Extended_Kalman_filter For explanations of what each variable means, please, refer to comments in the code in corresponding files or the book "Thrun, S., Burgard, W. and Fox, D., 2005. Probabilistic robotics. MIT press."

Unscented Kalman Filter

The equations below describe the unscented Kalman filter and are implemented in the UnscentedKalmanFilter class. Algorithm_Unscented_Kalman_filter For explanations of what each variable means, please, refer to comments in the code in corresponding files or the book "Thrun, S., Burgard, W. and Fox, D., 2005. Probabilistic robotics. MIT press."

Process Models

The following illustration helps to understand what the state vector dimensions mean.
graph

CV (Constant Velocity)

The CV process model is a process model where the object moves linearly with constant velocity. In this project, CV process model dials with a 2D world. The state vector consists of 4 components---px, py, vx, vy---where p* represents the position and v* represents the velocity. The leftmost column in the following equation represents the additive process noise; a* represents acceleration. CV_process_model The CV process model is implemented as a CVProcessModel class.

CTRV (Constant Turn Rate and Velocity Magnitude)

The CTRV process model is a process model where the object moves with a constant turn rate and velocity, that is, with zero longitudinal and yaw accelerations. CTRV process model dials with a 2D world. The state vector consists of 5 components---px, py, v, yaw, yaw_rate---where p* represents the position, v represents the velocity module, yaw represents the yaw angle, and yaw_rate represents the yaw velocity. The leftmost column in the following equation represents the non-linear process noise; a_a represents longitudinal acceleration, and a_psi is yaw acceleration. CTRV_process_model
where CTRV_process_model_alpha and CTRV_process_model_beta The results of solving these integrals depends on the yaw_rate, see CTRVProcessModel.

Measurement Models

Lidar

The Lidar measurement model is a linear measurement model. This project does not deal with the lidar point cloud. It assumes that the lidar point cloud has already been processed and a single measurement vector has been identified for the object under consideration. The measurement vector consists of 2 components---px, py---where p* represents the position. The transformation from the state space to the Lidar measurement space is as follows
Lidar_measurement_model where Lidar_measurement_model_H The Lidar measurement model is implemented as a LidarMeasurementModel class.

Radar

The Radar measurement model is a non-linear measurement model. The measurement vector consists of 3 components---range, bearing, range_rate---where the range is a radial distance from the origin, the bearing is an angle between range and X-axis which points into the direction of the heading of the vehicle, where sensors are installed, and range_rate is a radial velocity. The transformation from the state space to the Radar measurement space is as follows
Radar_measurement_model where Radar_measurement_model_h The Radar measurement model is implemented as a RadarMeasurementModel class.

sensor-fusion's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sensor-fusion's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.