Lateral planner: lower max cost (#22960)

* prevent ping pong when tuning is not so great

* update refs
old-commit-hash: 24aadaf1f3
commatwo_master
HaraldSchafer 3 years ago committed by GitHub
parent 816fbec7ab
commit 6eb5dce881
  1. 2
      selfdrive/controls/lib/lateral_planner.py
  2. 2
      selfdrive/test/process_replay/ref_commit

@ -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)

@ -1 +1 @@
6540e8c5a765975fd292b1efdef97b2d6391fa9c
848bc88a069b182d6f50698dd785ba360915e8dc
Loading…
Cancel
Save