Created by [ Rowan Dempster], last modified by [ Henry Wang] on Jan 16, 2020
Associated file: prediction/tracker/kalman_filter.h
A kalman filter uses a time series of measurements to predict unknown variables. For our purpose, the measurements are bounding boxes, i.e., the position of objects. The implemented kalman filter can then be used to predict position and velocity of objects.
High level description of kalman filter loop for a single object:
[Description]{.inline-comment-marker
data-ref=”2b09d905-d472-496b-855c-1a8d97af4b0c”} of kalman filter
attributes:
kalman_filter.measurement_matrix:
9x9 matrix, just diagonal entries are important; (1,1) = (2,2) = (3,3) = 1.0 (since position in x_1, x_2, x_3 are measured; v_1, v_2, v_3, a_1, a_2, a_3 are not measured), all other entries are set to zero.
kalman_filter.errorCovPost:
9x9 matrix, just diagonal entries are important; this matrix is updated within the algorithm and just has to be set after the first measurement; as mentioned above we have to set the initial state manually; velocities and accelerations are assumed to be zero (which might be not accurate) therefore high covariance. Covariance for positions is set low since we assume measurements (coming from perception) are accurate. It is not entirely clear how the behaviour of the kalman_filter would change, if those values are modified, i.e., best values still tbd.
kalman_filter.statePost:
9x1 vector; this vector is updated within the algorithm and just has to be set after the first measurement; as mentioned above v_1,v_2,v_3,a_1,a_2,a_3 = 0.0, and x_1, x_2, x_3 are set to first measurement
kalman_filter.transitionMatrix:
9x9 matrix; physical model for motion, e.g., x_2(t+dt) = x_2(t) + dt*v_2(t) + 0.5*dt*dt*a_2(t)
kalman_filter.processNoiseCov:
9x9 matrix, process noise is the noise due to process, e.g., bumps in the street, hills, winds (things that can influence the state of the car which are not accommodated for in the physical model). This matrix should not be so important, but again best values still tbd.
kalman_filter.measurementNoiseCov:
3x3 matrix, just diagonal entries are important. Choose values values higher if measurements have a lot of noise, lower if the measurements are accurate; again best values still tbd.
For more information check out: https://docs.opencv.org/3.4/dd/d6a/classcv_1_1KalmanFilter.html
Document generated by Confluence on Dec 10, 2021 04:02