LongitudinaPlanner: add comment about lateral accel calculation (#24096)

* space

* if
old-commit-hash: 5a8b4bbcaa
taco
Shane Smiskol 3 years ago committed by GitHub
parent 56ca717731
commit d6fb92825b
  1. 2
      selfdrive/controls/lib/longitudinal_planner.py

@ -35,6 +35,8 @@ def limit_accel_in_turns(v_ego, angle_steers, a_target, CP):
this should avoid accelerating when losing the target in turns
"""
# FIXME: This function to calculate lateral accel is incorrect and should use the VehicleModel
# The lookup table for turns should also be updated if we do this
a_total_max = interp(v_ego, _A_TOTAL_MAX_BP, _A_TOTAL_MAX_V)
a_y = v_ego ** 2 * angle_steers * CV.DEG_TO_RAD / (CP.steerRatio * CP.wheelbase)
a_x_allowed = math.sqrt(max(a_total_max ** 2 - a_y ** 2, 0.))

Loading…
Cancel
Save