Tuning specific to odyssey

pull/155/head
Ted Slesinski 7 years ago
parent fac22f4038
commit 71057c586f
  1. 10
      selfdrive/car/honda/carcontroller.py
  2. 4
      selfdrive/car/honda/interface.py

@ -12,7 +12,7 @@ from . import hondacan
from .values import AH from .values import AH
def actuator_hystereses(brake, braking, brake_steady, v_ego, civic): def actuator_hystereses(brake, braking, brake_steady, v_ego, civic, odyssey):
# hyst params... TODO: move these to VehicleParams # hyst params... TODO: move these to VehicleParams
brake_hyst_on = 0.02 # to activate brakes exceed this value brake_hyst_on = 0.02 # to activate brakes exceed this value
brake_hyst_off = 0.005 # to deactivate brakes below this value brake_hyst_off = 0.005 # to deactivate brakes below this value
@ -32,7 +32,7 @@ def actuator_hystereses(brake, braking, brake_steady, v_ego, civic):
brake_steady = brake + brake_hyst_gap brake_steady = brake + brake_hyst_gap
brake = brake_steady brake = brake_steady
if not civic and brake > 0.0: if (not civic and not odyssey) and brake > 0.0:
brake += 0.15 brake += 0.15
return brake, braking, brake_steady return brake, braking, brake_steady
@ -78,7 +78,7 @@ class CarController(object):
return return
# *** apply brake hysteresis *** # *** apply brake hysteresis ***
brake, self.braking, self.brake_steady = actuator_hystereses(actuators.brake, self.braking, self.brake_steady, CS.v_ego, CS.civic) brake, self.braking, self.brake_steady = actuator_hystereses(actuators.brake, self.braking, self.brake_steady, CS.v_ego, CS.civic, CS.odyssey)
# *** no output if not enabled *** # *** no output if not enabled ***
if not enabled and CS.pcm_acc_status: if not enabled and CS.pcm_acc_status:
@ -121,8 +121,8 @@ class CarController(object):
tt = sec_since_boot() tt = sec_since_boot()
GAS_MAX = 1004 GAS_MAX = 1004
BRAKE_MAX = 1024/4 BRAKE_MAX = 1024/4
if CS.civic: if CS.civic or CS.odyssey:
is_fw_modified = os.getenv("DONGLE_ID") in ['b0f5a01cf604185c'] is_fw_modified = os.getenv("DONGLE_ID") in ['b0f5a01cf604185cxxx']
STEER_MAX = 0x1FFF if is_fw_modified else 0x1000 STEER_MAX = 0x1FFF if is_fw_modified else 0x1000
elif CS.crv: elif CS.crv:
STEER_MAX = 0x300 # CR-V only uses 12-bits and requires a lower value STEER_MAX = 0x300 # CR-V only uses 12-bits and requires a lower value

@ -104,7 +104,7 @@ class CarInterface(object):
# self.accord_msg = [] # self.accord_msg = []
raise NotImplementedError raise NotImplementedError
if not self.CS.civic: if not self.CS.civic and not self.CS.odyssey:
self.compute_gb = get_compute_gb_acura() self.compute_gb = get_compute_gb_acura()
else: else:
self.compute_gb = compute_gb_honda self.compute_gb = compute_gb_honda
@ -215,7 +215,7 @@ class CarInterface(object):
ret.wheelbase = 3.00 ret.wheelbase = 3.00
ret.centerToFront = ret.wheelbase * 0.41 ret.centerToFront = ret.wheelbase * 0.41
ret.steerRatio = 15.3 ret.steerRatio = 15.3
ret.steerKp, ret.steerKi = 0.8, 0.24 ret.steerKp, ret.steerKi = 0.6, 0.18
ret.longitudinalKpBP = [0., 5., 35.] ret.longitudinalKpBP = [0., 5., 35.]
ret.longitudinalKpV = [1.2, 0.8, 0.5] ret.longitudinalKpV = [1.2, 0.8, 0.5]

Loading…
Cancel
Save