![]() |
Visual Servoing Platform version 3.7.0
|
Functions | |
| ColVector | fx (ColVector x, float dt) |
| ColVector | hx (ColVector x) |
| ColVector | add_state_vectors (a, b) |
| ColVector | residual_state_vectors (a, b) |
| Matrix | generate_Q_matrix (float dt) |
Variables | |
| bool | has_gui = True |
| float | dt = 0.01 |
| float | gt_dx = 0.01 |
| float | gt_dy = 0.005 |
| gt_dX = ColVector([gt_dx, gt_dy]) | |
| float | gt_vx = gt_dx / dt |
| float | gt_vy = gt_dy / dt |
| float | proc_var = 0.000004 |
| float | sigma_x_meas = 0.05 |
| float | sigma_y_meas = 0.05 |
| drawer = UKSigmaDrawerMerwe(n=4, alpha=0.3, beta=2, kappa=-1, resFunc=residual_state_vectors, addFunc=add_state_vectors) | |
| P0 = Matrix(np.eye(4) * 1.) | |
| R = Matrix(np.eye(2) * 0.01) | |
| Matrix | Q = generate_Q_matrix(dt) * proc_var |
| ukf = UnscentedKalman(Q, R, drawer, fx, hx) | |
| int | num_plots = 4 |
| plot = Plot(num_plots) | |
| list | plot_titles |
| list | plot_y_units |
| list | plot_legends = ['GT', 'Measure', 'Filtered'] |
| gt_X = ColVector(2, 0.) | |
| z_prec = ColVector(2, 0.) | |
| x_meas = gt_X[0] + np.random.normal(0.0, sigma_x_meas) | |
| y_meas = gt_X[1] + np.random.normal(0.0, sigma_y_meas) | |
| z = ColVector([x_meas, y_meas]) | |
| Xest = ukf.getXest() | |
| tuple | vX_meas = (x_meas - z_prec[0]) / dt |
| tuple | vY_meas = (y_meas - z_prec[1]) / dt |
| ColVector ukf-linear-example.add_state_vectors | ( | a, | |
| b ) |
Method that permits to add two state vectors. :param a: The first state vector to which another state vector must be added. :param b: The other state vector that must be added to a. :return ColVector: The sum a + b.
Definition at line 105 of file ukf-linear-example.py.
| ColVector ukf-linear-example.fx | ( | ColVector | x, |
| float | dt ) |
Process function that projects in time the internal state of the UKF. :param x: The internal state of the UKF. :param dt: The sampling time: how far in the future are we projecting x. :return ColVector: The updated internal state, projected in time, also known as the prior.
Definition at line 75 of file ukf-linear-example.py.
| Matrix ukf-linear-example.generate_Q_matrix | ( | float | dt | ) |
Method that generates the process covariance matrix for a process for which the state vector can be written as (x, dx/dt)^T :param dt: The sampling period. :return Matrix: The corresponding process covariance matrix.
Definition at line 127 of file ukf-linear-example.py.
| ColVector ukf-linear-example.hx | ( | ColVector | x | ) |
Measurement function that expresses the internal state of the UKF in the measurement space. :param x: The internal state of the UKF. :return ColVector: The internal state, expressed in the measurement space.
Definition at line 92 of file ukf-linear-example.py.
| ColVector ukf-linear-example.residual_state_vectors | ( | a, | |
| b ) |
Method that permits to subtract a state vector to another. :param a: The first state vector to which another state vector must be subtracted. :param b: The other state vector that must be subtracted to a. :return ColVector: The subtraction a - b.
Definition at line 116 of file ukf-linear-example.py.
| ukf-linear-example.drawer = UKSigmaDrawerMerwe(n=4, alpha=0.3, beta=2, kappa=-1, resFunc=residual_state_vectors, addFunc=add_state_vectors) |
Definition at line 154 of file ukf-linear-example.py.
| float ukf-linear-example.dt = 0.01 |
Definition at line 143 of file ukf-linear-example.py.
Definition at line 146 of file ukf-linear-example.py.
| float ukf-linear-example.gt_dx = 0.01 |
Definition at line 144 of file ukf-linear-example.py.
| float ukf-linear-example.gt_dy = 0.005 |
Definition at line 145 of file ukf-linear-example.py.
Definition at line 147 of file ukf-linear-example.py.
Definition at line 148 of file ukf-linear-example.py.
| ukf-linear-example.gt_X = ColVector(2, 0.) |
Definition at line 187 of file ukf-linear-example.py.
| bool ukf-linear-example.has_gui = True |
Definition at line 70 of file ukf-linear-example.py.
| int ukf-linear-example.num_plots = 4 |
Definition at line 166 of file ukf-linear-example.py.
| ukf-linear-example.P0 = Matrix(np.eye(4) * 1.) |
Definition at line 156 of file ukf-linear-example.py.
Definition at line 167 of file ukf-linear-example.py.
| list ukf-linear-example.plot_legends = ['GT', 'Measure', 'Filtered'] |
Definition at line 176 of file ukf-linear-example.py.
| list ukf-linear-example.plot_titles |
Definition at line 168 of file ukf-linear-example.py.
| list ukf-linear-example.plot_y_units |
Definition at line 172 of file ukf-linear-example.py.
| float ukf-linear-example.proc_var = 0.000004 |
Definition at line 149 of file ukf-linear-example.py.
| Matrix ukf-linear-example.Q = generate_Q_matrix(dt) * proc_var |
Definition at line 158 of file ukf-linear-example.py.
| ukf-linear-example.R = Matrix(np.eye(2) * 0.01) |
Definition at line 157 of file ukf-linear-example.py.
| float ukf-linear-example.sigma_x_meas = 0.05 |
Definition at line 150 of file ukf-linear-example.py.
| float ukf-linear-example.sigma_y_meas = 0.05 |
Definition at line 151 of file ukf-linear-example.py.
Definition at line 159 of file ukf-linear-example.py.
Definition at line 204 of file ukf-linear-example.py.
Definition at line 205 of file ukf-linear-example.py.
| ukf-linear-example.x_meas = gt_X[0] + np.random.normal(0.0, sigma_x_meas) |
Definition at line 193 of file ukf-linear-example.py.
| ukf-linear-example.Xest = ukf.getXest() |
Definition at line 201 of file ukf-linear-example.py.
| ukf-linear-example.y_meas = gt_X[1] + np.random.normal(0.0, sigma_y_meas) |
Definition at line 194 of file ukf-linear-example.py.
Definition at line 195 of file ukf-linear-example.py.
| ukf-linear-example.z_prec = ColVector(2, 0.) |
Definition at line 188 of file ukf-linear-example.py.