Skip to content
This repository has been archived by the owner on Dec 16, 2023. It is now read-only.

Feature/opgm ap integration #246

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions selfdrive/car/gm/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,15 @@ def update(self, CC, CS, now_nanos):
# accGain = interp(CS.out.vEgo, [0., 5], [0.23, 0.130])
# else:
# accGain = interp(CS.out.vEgo, [0., 5], [0.23, 0.165])
#TODO
#정속도 구간별 acc가 '0'일 때, 페달값 정의
#예시 accGain3 = interp(actuators.accel, [-3.5,0,0 2], [0.1667,??, 0.1325])
accGain = 0.1429
accGain2 = interp(actuators.accel, [-3.5, 2], [0.1667, 0.1325])
zero = interp(CS.out.vEgo,[0., 5, 10, 30], [0, accGain2, 0.19, 0.265])
pedal_gas = clip((actuators.accel * accGain + zero), 0.0, 1.0)
accGain3 = interp(actuators.accel, [-3.5, 2], [0.185, 0.130])
accGain10 = interp(actuators.accel, [-3.5, 2], [0.245, 0.185])
accGain15 = interp(actuators.accel, [-3.5, 2], [0.25, 0.215])
zero = interp(CS.out.vEgo,[0., 3, 10, 15, 30], [0, accGain3, accGain10, accGain15, 0.280])
pedal_gas = clip((zero + actuators.accel * accGain), 0.0, 1.0)

self.pedalGasRaw_valueStore = pedal_gas

Expand Down
2 changes: 1 addition & 1 deletion selfdrive/car/gm/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def _get_params(ret, candidate, fingerprint, car_fw, experimental_long, docs):
ret.longitudinalTuning.kpBP = [0.]
ret.longitudinalTuning.kpV = [1.0]
ret.longitudinalTuning.kiBP = [0.]
ret.longitudinalTuning.kiV = [0.0]
ret.longitudinalTuning.kiV = [0.]
ret.longitudinalTuning.kf = 0.3
ret.stoppingDecelRate = 0.8 # reach stopping target smoothly, brake_travel/s while trying to stop
ret.stopAccel = 0. # Required acceleration to keep vehicle stationary
Expand Down
Loading