Skip to content

Commit

Permalink
add groundwork for accel response profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
sshane committed Dec 21, 2021
1 parent f1e7503 commit 0c93900
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions selfdrive/car/toyota/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
class CarInterface(CarInterfaceBase):
@staticmethod
def get_pid_accel_limits(CP, current_speed, cruise_speed):
# as well as here (pid output is clipped to this)
return CarControllerParams.ACCEL_MIN, CarControllerParams.ACCEL_MAX

@staticmethod
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/car/toyota/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


class CarControllerParams:
ACCEL_MAX = 1.6 # m/s2, lower than allowed 2.0 m/s2 for tuning reasons
ACCEL_MAX = 1.8 # m/s2, lower than allowed 2.0 m/s2 for tuning reasons
ACCEL_MIN = -3.5 # m/s2

STEER_MAX = 1500
Expand Down
1 change: 1 addition & 0 deletions selfdrive/controls/lib/longitudinal_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@


def get_max_accel(v_ego):
# change A_CRUISE_MAX_VALS live
return interp(v_ego, A_CRUISE_MAX_BP, A_CRUISE_MAX_VALS)


Expand Down

0 comments on commit 0c93900

Please sign in to comment.