uiPlan: add planned acceleration field (#27484)

* add accel

* bump cereal

* Update ref_commit

---------

Co-authored-by: Bruce Wayne <harald.the.engineer@gmail.com>
old-commit-hash: 3ab8645d3af948a35ac410ad7f841ab670091e32
This commit is contained in:
Shane Smiskol
2023-03-02 20:11:24 -08:00
committed by GitHub
parent 042ff4e58f
commit 827c5678f0
4 changed files with 5 additions and 3 deletions
+1 -1
Submodule cereal updated: b88523f05a...42f84fd85d
@@ -122,8 +122,9 @@ class LongitudinalPlanner:
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.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.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)
# TODO counter is only needed because radar is glitchy, remove once radar is gone
+1
View File
@@ -22,6 +22,7 @@ def publish_ui_plan(sm, pm, lateral_planner, longitudinal_planner):
uiPlan.position.x = np.interp(plan_odo, model_odo, lateral_planner.lat_mpc.x_sol[:,0]).tolist()
uiPlan.position.y = np.interp(plan_odo, model_odo, lateral_planner.lat_mpc.x_sol[:,1]).tolist()
uiPlan.position.z = np.interp(plan_odo, model_odo, lateral_planner.path_xyz[:,2]).tolist()
uiPlan.accel = longitudinal_planner.a_desired_trajectory_full.tolist()
pm.send('uiPlan', ui_send)
def plannerd_thread(sm=None, pm=None):
+1 -1
View File
@@ -1 +1 @@
dfa8e947c4ef76a9d89974a434e94a078e1ccc6a
f9c7e05b836c4bff364978752e82d64b90f9d6e6