Lateral planner: lower max cost (#22960)

* prevent ping pong when tuning is not so great

* update refs
pull/22964/head
HaraldSchafer 3 years ago committed by GitHub
parent ddea21e648
commit 24aadaf1f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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) self.lat_mpc.set_weights(MPC_COST_LAT.PATH, MPC_COST_LAT.HEADING, CP.steerRateCost)
else: else:
d_path_xyz = self.path_xyz 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 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]) 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) self.lat_mpc.set_weights(path_cost, heading_cost, CP.steerRateCost)

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