Skip to content

Estimate the state of a moving object with noisy Lidar and Radar data using UKF

Notifications You must be signed in to change notification settings

m-loay/LIDAR-and-RADAR-Fusion-to-Track-Vehicles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SFND_Unscented_Kalman_Filter

Sensor Fusion UKF Highway Project Starter Code

ukf

In this project you will implement an Unscented Kalman Filter to estimate the state of multiple cars on a highway using noisy lidar and radar measurements. Passing the project requires obtaining RMSE values that are lower that the tolerance outlined in the project rubric.

The main program can be built and ran by doing the following from the project top directory.

  1. mkdir build
  2. cd build
  3. cmake ..
  4. make
  5. ./ukf_highway

Note that the programs that need to be written to accomplish the project are src/ukf.cpp, and src/ukf.h

The program main.cpp has already been filled out, but feel free to modify it.

ukf2

main.cpp is using highway.h to create a straight 3 lane highway environment with 3 traffic cars and the main ego car at the center. The viewer scene is centered around the ego car and the coordinate system is relative to the ego car as well. The ego car is green while the other traffic cars are blue. The traffic cars will be accelerating and altering their steering to change lanes. Each of the traffic car's has it's own UKF object generated for it, and will update each indidual one during every time step.

The red spheres above cars represent the (x,y) lidar detection and the purple lines show the radar measurements with the velocity magnitude along the detected angle. The Z axis is not taken into account for tracking, so you are only tracking along the X/Y axis.


Other Important Dependencies

or a docker image can be used with nivida support Click here for installation instructions

Basic Build Instructions

  1. Clone this repo.
  2. Make a build directory: mkdir build && cd build
  3. Compile: cmake .. && make
  4. Run it: ./ukf_highway

Editor Settings

We've purposefully kept editor configuration files out of this repo in order to keep it as simple and environment agnostic as possible. However, we recommend using the following settings:

  • indent using spaces
  • set tab width to 2 spaces (keeps the matrices in source code aligned)

Code Style

Please stick to Google's C++ style guide as much as possible.

Generating Additional Data

This is optional!

If you'd like to generate your own radar and lidar modify the code in highway.h to alter the cars. Also check out tools.cpp to change how measurements are taken, for instance lidar markers could be the (x,y) center of bounding boxes by scanning the PCD environment and performing clustering. This is similar to what was done in Sensor Fusion Lidar Obstacle Detection.

Project Instructions and Rubric

Accuracy

The output RMSE px, py, vx, vy output coordinates [0.04852,0.062393,0.366935,0.400275]. Also the NIS for both lidar and radar is consistent as shown in the following figures:

For Lidar:

lidar

For Radar:

radar

Project results:

UKF results:

For Lidar:

lidarUKF

For Radar:

radarUKF

Output position Estimation VS Measurements VS GT:

outputUKF

Output velocity Estimation VS GT:

velUKF

EkF results:

For Lidar:

lidarEKF

For Radar:

radarEKF

Output position Estimation VS Measurements VS GT:

outputEKF

Output velocity Estimation VS GT:

velEKF

Project Quality Work:

Test Report Generated from google-test frame work:

tc

Coverage Reprot Report Generated from google-test frame work:

cr

gcovr -r . --exclude-throw-branches --html --html --html-details -o example-html-details.html

About

Estimate the state of a moving object with noisy Lidar and Radar data using UKF

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages