Skip to content

Commit

Permalink
Reapply "Remove steering wheel offset for planner slow down for curve…
Browse files Browse the repository at this point in the history
…s" (commaai#33848) (commaai#33849)

* Reapply "Remove steering wheel offset for planner slow down for curves" (commaai#33848)

This reverts commit 4f8b112.

* careless

* Update ref_commit
  • Loading branch information
sshane authored and FrogAi committed Oct 25, 2024
1 parent 3341fe3 commit bb36fb9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion selfdrive/controls/lib/longitudinal_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ def update(self, classic_model, radarless_model, sm, frogpilot_toggles):

accel_limits = [sm['frogpilotPlan'].minAcceleration, sm['frogpilotPlan'].maxAcceleration]
if self.mpc.mode == 'acc':
accel_limits_turns = limit_accel_in_turns(v_ego, sm['carState'].steeringAngleDeg, accel_limits, self.CP)
steer_angle_without_offset = sm['carState'].steeringAngleDeg - sm['liveParameters'].angleOffsetDeg
accel_limits_turns = limit_accel_in_turns(v_ego, steer_angle_without_offset, accel_limits, self.CP)
else:
accel_limits_turns = [ACCEL_MIN, ACCEL_MAX]

Expand Down
2 changes: 1 addition & 1 deletion selfdrive/controls/plannerd.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def plannerd_thread():

longitudinal_planner = LongitudinalPlanner(CP)
pm = messaging.PubMaster(['longitudinalPlan', 'uiPlan'])
sm = messaging.SubMaster(['carControl', 'carState', 'controlsState', 'radarState', 'modelV2', 'frogpilotCarControl', 'frogpilotCarState', 'frogpilotPlan'],
sm = messaging.SubMaster(['carControl', 'carState', 'controlsState', 'liveParameters', 'radarState', 'modelV2', 'frogpilotCarControl', 'frogpilotCarState', 'frogpilotPlan'],
poll='modelV2', ignore_avg_freq=['radarState'])

# FrogPilot variables
Expand Down

0 comments on commit bb36fb9

Please sign in to comment.