- remove precompiled
- make sure all files are in kalman namespace
- make an analytics class to record and generate result metrics
- separate measurement_package into laser,radar models
- separate kalman_filter into separate linear and extended process models
- rename matrices and vectors to meaningful names
- matrices/vectors typedefs
- code documentation
- write a project outline with overview of implementation steps
- write project dir tree + description of each
- write expected input, output format and examples
- write out relevant rubric metrics checklist
- make documentation notebook
- results analysis
- make viz gifs
- put back install scripts and license, make sure it will compile
- make a standard base cmake project template (cmakelists.txt, gitignore, etc).
- numpy matricx multiply in left to right order, maintaining expected order of operations
- each sensor has its own update scheme
- update should be called once per sensor
- updates are asynchronous
- if two at same time: use both, careful of division by zero
- at first measurement: init and just set the mean
- we use a linear approximation of the non-linear conversion function of radar polar coordinate data
- For radar measurements, we need to map back to polar coordinates calculate the error
y
, that's what the Jacobian matrix is used for. - Radar measurement don't hold enough information to calculate
vx
andvy
.
-
Measurement update step via bayes rule multiplication.
-
Motion prediction step via done via total probability addition.
-
Our priors are the measurement and motion variances
The measurement update step: $$ y = z-H \cdot x \ S = H \cdot P \cdot H^T + R \ K = P \cdot H^T \cdot S^{-1} \ x' = x + K \cdot y \ P' = (I-K \cdot H) \cdot P $$
and the prediction step: $$ x' = F\cdot x+u \ P' = F \cdot P\cdot F^T \ $$
where:
- x is estimate
- P is uncertainty covariance
- F is state transition
- u is motion vector
- z is measurement
- H is measurement function
- R is measurement noise
- I is identity matrix
The linear Taylor series expansion approximation (1st order) of a non-linear function:
where:
- f(µ) is arctan(µ)
- ∂f(µ) is 1/(1+x^2)
Generalized to n dimensions: $$ h(x')= \begin{pmatrix} \sqrt{ p{'}_x^2 + p{'}_y^2 }\ \arctan(p_y' / p_x')\ \frac{p_x' v_x' + p_y' v_y'}{\sqrt{p{'}x^2 + p{'}{y}^2}} \end{pmatrix} $$
We'll calculate only the Jacobian matrix, containing all the partial derivatives:
L 3.122427e-01 5.803398e-01 1477010443000000 6.000000e-01 6.000000e-01 5.199937e+00 0 0 6.911322e-03
R 1.014892e+00 5.543292e-01 4.892807e+00 1477010443050000 8.599968e-01 6.000449e-01 5.199747e+00 1.796856e-03 3.455661e-04 1.382155e-02
...
- timestamp is in microseconds
- fradar data is in polar coordinates
- kalman filter - wikipedia
- RMSE - wikipedia
- project rubric
- starter code
- simulator
- visualization tools
- Q&A video
- uWebsockets Library
- Eigen Library
- JSON Library
- Google C++ Style Guide
- C++ Core Guidelines
- Pointer to Implementation Pattern
- https://github.com/mherb/kalman
- https://github.com/igormiktor/arduino-EventManager/blob/master/EventManager/EventManager.h
- https://github.com/ndrplz/self-driving-car
- https://github.com/JunshengFu/tracking-with-Extended-Kalman-Filter
- https://github.com/mithi/fusion-ekf
- https://github.com/ethz-asl/ethzasl_msf
- https://github.com/NikolasEnt/Extended-Kalman-Filter
- https://github.com/jeremy-shannon/CarND-Extended-Kalman-Filter-Project