|
|
@ -122,8 +122,9 @@ class LongitudinalPlanner: |
|
|
|
self.mpc.update(sm['radarState'], v_cruise, x, v, a, j) |
|
|
|
self.mpc.update(sm['radarState'], v_cruise, x, v, a, j) |
|
|
|
|
|
|
|
|
|
|
|
self.v_desired_trajectory_full = np.interp(T_IDXS, T_IDXS_MPC, self.mpc.v_solution) |
|
|
|
self.v_desired_trajectory_full = np.interp(T_IDXS, T_IDXS_MPC, self.mpc.v_solution) |
|
|
|
|
|
|
|
self.a_desired_trajectory_full = np.interp(T_IDXS, T_IDXS_MPC, self.mpc.a_solution) |
|
|
|
self.v_desired_trajectory = self.v_desired_trajectory_full[:CONTROL_N] |
|
|
|
self.v_desired_trajectory = self.v_desired_trajectory_full[:CONTROL_N] |
|
|
|
self.a_desired_trajectory = np.interp(T_IDXS[:CONTROL_N], T_IDXS_MPC, self.mpc.a_solution) |
|
|
|
self.a_desired_trajectory = self.a_desired_trajectory_full[:CONTROL_N] |
|
|
|
self.j_desired_trajectory = np.interp(T_IDXS[:CONTROL_N], T_IDXS_MPC[:-1], self.mpc.j_solution) |
|
|
|
self.j_desired_trajectory = np.interp(T_IDXS[:CONTROL_N], T_IDXS_MPC[:-1], self.mpc.j_solution) |
|
|
|
|
|
|
|
|
|
|
|
# TODO counter is only needed because radar is glitchy, remove once radar is gone |
|
|
|
# TODO counter is only needed because radar is glitchy, remove once radar is gone |
|
|
|