# Object Tracking

Object tracking has several applications, not only in the military but also today in autonomous vehicles, for example, to avoid collisions. Autonomous vehicles use different sensors to understand their context, cameras, radars and/or lasers. Sensor fusion merges multiple inputs and considers the strengths of each of the them. To help tracking better the different objects using Kallman Filters [1].

An algorithm used for sensor fusion is the **Kalman filter**[2], which is
a recursive algorithm that helps solve the problem of tracking moving objects. Each iteration of the algorithm consists
of two steps the update and measurement of the object position and velocity. The benefit is that it minimizes the root
mean square error (RMSE) on each iteration.

Photo by Samuele Errico Piccarini on Unsplash

However, the Kalman filter can only be used on linear problems, such as the usage of Lidar sensors, to calculate the
position of the tracked object. On the other hand, the **Extended Kalman Filter** can track objects with a non-linear
sensor such as the Radar of a car, that can help calculate the velocity of the tracked
object[3].

In this project[4], we have implemented in C++ both algorithms and using the Udacity Simulator[5] to verify the implementation results.

Implementing the filter in C++ over Python increases the complexity of the matrix calculations, but also increases the performance. Debugging using the Eigen library can be a daunting task, However, having implemented before on python helped to have a clear understanding of the algorithms and the expectations.

Using a docker image for the compilation together with Clion also makes the implementation and debugging faster and easier.

**As always is an interesting project with a direct application and visualization of the solution.**

## References

[1] Understanding Kalman Filters https://www.mathworks.com/videos/series/understanding-kalman-filters.html

[2] Moving Object Tracking Using Kalman Filter https://doi.org/10.1109/ICACCT.2018.8529402

[3] Extended Kalman filter for extended object tracking https://doi.org/10.1109/ICASSP.2017.7952985

[4] Extended Kalman filter implementation https://github.com/hurtadosanti/ExtendedKalmanFilter

[5] Udacity Simulator https://github.com/udacity/self-driving-car-sim/releases/