From 24aadaf1f35d61f26637377bc353539d25989f94 Mon Sep 17 00:00:00 2001 From: HaraldSchafer Date: Wed, 17 Nov 2021 20:24:10 -0800 Subject: [PATCH] Lateral planner: lower max cost (#22960) * prevent ping pong when tuning is not so great * update refs --- selfdrive/controls/lib/lateral_planner.py | 2 +- selfdrive/test/process_replay/ref_commit | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/controls/lib/lateral_planner.py b/selfdrive/controls/lib/lateral_planner.py index f18c3370d6..74b27f595d 100644 --- a/selfdrive/controls/lib/lateral_planner.py +++ b/selfdrive/controls/lib/lateral_planner.py @@ -170,7 +170,7 @@ class LateralPlanner(): self.lat_mpc.set_weights(MPC_COST_LAT.PATH, MPC_COST_LAT.HEADING, CP.steerRateCost) else: d_path_xyz = self.path_xyz - path_cost = np.clip(abs(self.path_xyz[0,1]/self.path_xyz_stds[0,1]), 0.5, 5.0) * MPC_COST_LAT.PATH + path_cost = np.clip(abs(self.path_xyz[0,1]/self.path_xyz_stds[0,1]), 0.5, 1.5) * MPC_COST_LAT.PATH # Heading cost is useful at low speed, otherwise end of plan can be off-heading heading_cost = interp(v_ego, [5.0, 10.0], [MPC_COST_LAT.HEADING, 0.0]) self.lat_mpc.set_weights(path_cost, heading_cost, CP.steerRateCost) diff --git a/selfdrive/test/process_replay/ref_commit b/selfdrive/test/process_replay/ref_commit index 5027b0c179..92ae208dd0 100644 --- a/selfdrive/test/process_replay/ref_commit +++ b/selfdrive/test/process_replay/ref_commit @@ -1 +1 @@ -6540e8c5a765975fd292b1efdef97b2d6391fa9c \ No newline at end of file +848bc88a069b182d6f50698dd785ba360915e8dc \ No newline at end of file