Giter Site home page Giter Site logo

badri-r-s / ekf_sensor_fusion Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 14.07 MB

Implementation of extended kalman filter in C++ that fuses data from lidar and radar to track a bicycle moving around a car

CMake 0.59% C 1.95% C++ 90.79% Makefile 6.65% TypeScript 0.01% Shell 0.02%

ekf_sensor_fusion's Introduction

Extended Kalman Filter and Sensor Fusion for 2-D position and velocity tracking

In this project, an Extended Kalman Filter and Sensor Fusion were utilized to estimate the state of a moving object of interest (bicycle) with noisy lidar and radar measurements. The available sensors were LIDAR and RADAR. LIDAR produces point cloud output from which the position of the bicycle can be found. RADAR uses the Doppler effect to give velocity output and the radial position. The performance of the filter has been measured using the RMSE error metric. It has been measured between ground truth and the predicted state at each step.

Workflow

The workflow for this project can be described as shown in the image:

Point to note:

  • For LIDAR measurements, the usual Kalman filter equations were used.
  • Since the measurement model for the RADAR is non-linear (it sees the world differently), the Extended Kalman FIlter has been used.
  • It was achieved by approximating the non-linear measurement matrix H using first-order Taylor series expansion.
  • The measurement covariance matrix for RADAR is 3x3 since RADAR measures three quantities (unlike LIDAR which measures the x and y position directly) namely, Range (rho), Bearing (phi), Radial velocity (rho_dot).

Folder structure

  • The src folder contains the code that runs the Kalman filter.
  • main.cpp - communicates with the Term 2 Simulator receiving data measurements, calls a function to run the Kalman filter, and calls a function to calculate RMSE.
  • FusionEKF.cpp - initializes the filter, calls the predict function, and calls the update function.
  • kalman_filter.cpp- defines the predict function, the update function for lidar, and the update function for radar.
  • tools.cpp- function to calculate RMSE and the Jacobian matrix.

Steps to run the code

  • The simulator can be downloaded from this link : Simulator
  • The dependencies can be installed by simply running the install-linux.sh file that has been provided in the repository.
  • You can build the workspace by running the following commands from the root of the workspace run:
    • mkdir build && cd build
    • cmake .. && make
  • To run the program, make sure to have opened the simulator and have built the workspace. Then run ./ExtendedKF in the build directory

Results:

  • The Lidar measurements are shown as red circles, radar measurements are blue circles with an arrow pointing in the direction of the observed angle, and estimation markers are green triangles.

  • the full video can be viewed at : Result

ekf_sensor_fusion's People

Contributors

badri-r-s avatar

Stargazers

 avatar

Watchers

 avatar

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.