{"id":44655479,"url":"https://github.com/shazraz/Extended-Kalman-Filter","last_synced_at":"2026-02-27T09:01:13.627Z","repository":{"id":160488996,"uuid":"105371000","full_name":"shazraz/Extended-Kalman-Filter","owner":"shazraz","description":"Implementation of an EKF in C++","archived":false,"fork":false,"pushed_at":"2024-11-21T18:20:27.000Z","size":1520,"stargazers_count":87,"open_issues_count":0,"forks_count":27,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-21T19:25:30.157Z","etag":null,"topics":["extended-kalman-filters","kalman-filter","object-tracking"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shazraz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-30T13:15:34.000Z","updated_at":"2024-11-21T18:20:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"f23f1095-0585-4568-8d75-ca3cc1c0573f","html_url":"https://github.com/shazraz/Extended-Kalman-Filter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shazraz/Extended-Kalman-Filter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shazraz%2FExtended-Kalman-Filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shazraz%2FExtended-Kalman-Filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shazraz%2FExtended-Kalman-Filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shazraz%2FExtended-Kalman-Filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shazraz","download_url":"https://codeload.github.com/shazraz/Extended-Kalman-Filter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shazraz%2FExtended-Kalman-Filter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29888777,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T08:34:21.514Z","status":"ssl_error","status_checked_at":"2026-02-27T08:32:38.035Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["extended-kalman-filters","kalman-filter","object-tracking"],"created_at":"2026-02-14T22:00:18.750Z","updated_at":"2026-02-27T09:01:13.621Z","avatar_url":"https://github.com/shazraz.png","language":"C++","funding_links":[],"categories":["Code"],"sub_categories":["C++"],"readme":"# Extended Kalman Filter in C++\n\n## 1. Introduction\n\nThis project utilizes an EKF (Extended Kalman Filter) implemented in C++ to estimate the state of a moving object using noisy LIDAR and RADAR data measurements passed via a simulator. Here's a great resource to get up to speed with the basics of a Kalman Filter.\n\n* [Kalman Filter](http://www.bzarg.com/p/how-a-kalman-filter-works-in-pictures/)\n\nThe Extended Kalman filter builds on the Kalman Filter to incorporate non-linearities in the sensor transformation matrixes using a matrix of first order derivatives, known as a Jacobian. Here's a good resource for beginners:\n\n* [Extended Kalman Filter](https://simondlevy.github.io/ekf-tutorial/)\n\nThis project was completed as part of Term 2 of Udacity's Self Driving Car Nanodegree program.\n\n## 2. Project Environment\nThe project was built using the Ubuntu 16-04 bash shell in Windows 10. Instructions to set this up can be found [here](https://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/). The following dependencies need to be in place to build and execute the project.\n\n* [Udacity SDC Term 2 Simulator](https://github.com/udacity/self-driving-car-sim/releases)\n* cmake \u003e= 3.5\n* make \u003e= 4.1 (Linux, Mac), 3.81 (Windows)\n* gcc/g++ \u003e= 5.4\n* uWebSocketIO (installed via the [install-ubuntu.sh](https://github.com/shazraz/Extended-Kalman-Filter/blob/master/install-ubuntu.sh) script) \n \nThe project consists of the following files located in the [src](https://github.com/shazraz/Extended-Kalman-Filter/tree/master/src) folder:\n\n* [main.cpp](https://github.com/shazraz/Extended-Kalman-Filter/blob/master/src/main.cpp): Interfaces with the simulator using uWebSocketIO to recieve measurements and transmit estimates and RMSE values output by the EKF.\n* [FusionEKF.cpp](https://github.com/shazraz/Extended-Kalman-Filter/blob/master/src/FusionEKF.cpp): Instantiates the EKF, initial object state (x), covariance (P) and calls the appropriate Predict() or Update() methods depending on whether LIDAR or RADAR measurements are being processed.\n* [kalman_filter.cpp](https://github.com/shazraz/Extended-Kalman-Filter/blob/master/src/kalman_filter.cpp): Implements the Predict(), Update() and UpdateEKF() methods for prediction, LIDAR updates \u0026 RADAR updates respectively.\n* [tools.cpp](https://github.com/shazraz/Extended-Kalman-Filter/blob/master/src/tools.cpp): Contains tools for calculating the Jacobian and RMSE values.\n\nOnce the environment is ready, the code can be tested as follows:\n\n1. Modify initializations for x_ or P_ in FusionEKF.cpp to test other values (Optional)\n2. cd build\n3. make\n4. Launch the simulator and select the EKF/UKF project\n5. ./ExtendedKF\n6. Click Start in the simulator\n\nThe simulator shows a blue vehicle moving in a figure 8 around a stationary sensor. Green markers represent the state estimations determined by the EKF using the noisy RADAR (blue markers) and LIDAR (red markers) data. Two datasets are provided, Dataset 1 has the vehicle initially moving in the positive x direction and Dataset 2 has the vehicle initially moving in the negative x direction.\n\n## 3. Results \u0026 Discussion\n\nThis EKF models the following characteristics of object state, x: (px, py, vx, vy) where p \u0026 v represent the position and velocity respectively. The state is initalized with values x:(```meas1_px```, ```meas1_py```, 0.5, 0.5) where meas1_px and meas1_py are set using the first measurement recieved. The covariance matrix, P, is initialized with a variance of (1,1,500,500) along the diagonals to reflect the uncertainty in the initial velocity but relative certainty in the initial position.\n\nThe following images show the results in the simulator for both datasets.\n\nDataset 1             |  Dataset 2 \n:-------------------------:|:-------------------------:\n\u003cimg src=\"./graphics/Dataset1.png\" width=\"500\"\u003e  |   \u003cimg src=\"./graphics/Dataset2.png\" width=\"500\"\u003e \n\n\nThe images above show accurate estimations of state for the vehicle with the final RMSE values over all timesteps. The effect of individual sensor measurements can be analyzed by turning off the updates for a particular sensor. The images below show the effect of using LIDAR only measurements and RADAR only measurements for Dataset 1.\n\nLIDAR Only           |  RADAR Only\n:-------------------------:|:-------------------------:\n\u003cimg src=\"./graphics/LIDAR.png\" width=\"500\"\u003e  |   \u003cimg src=\"./graphics/RADAR.png\" width=\"500\"\u003e \n\nIt is seen that the overall RMSE value for position in the absence of one sensor is higher than the position RMSE values when both sensors are used. In particular, the RADAR sensor does a poor job of position estimation due to the sensing mechanism used by the sensor i.e. Doppler effect to directly measure velocity. The LIDAR does a relatively better job of estimating position, however, velocity measurements are worse in the absence of RADAR data. \n\nThis demonstrates the value of an EKF which is able to take noisy measurements from multiple sensor types and generate a state estimation more accurate than estimations from individual sensors by combining the Gaussian probability distributions of the measurements with its own prediction (also a Gaussian prob. dist.) of where the tracked object is located.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshazraz%2FExtended-Kalman-Filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshazraz%2FExtended-Kalman-Filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshazraz%2FExtended-Kalman-Filter/lists"}