Skip to content

Commit

Permalink
updated default parameters for dampening
Browse files Browse the repository at this point in the history
  • Loading branch information
Gernby committed Mar 27, 2019
1 parent ecb67bd commit 0845916
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 32 deletions.
8 changes: 4 additions & 4 deletions selfdrive/car/chrysler/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ def get_params(candidate, fingerprint):
ret.steerKf = 0.00006 # full torque for 10 deg at 80mph means 0.00007818594
ret.steerActuatorDelay = 0.1
ret.steerRateCost = 0.7
ret.steerMPCReactTime = 0.05 # increase total MPC projected time by 50 ms
ret.steerMPCDampTime = 0.2 # dampen desired angle over 200ms (4 mpc cycles)
ret.steerReactTime = -0.1 # decrease total projected angle by 100 ms
ret.steerDampTime = 0.2 # dampen projected steer angle over 200ms (20 control cycles)
ret.steerMPCReactTime = 0.025 # increase total MPC projected time by 25 ms
ret.steerMPCDampTime = 0.05 # dampen desired angle over 50ms (1 mpc cycles)
ret.steerReactTime = -0.02 # decrease total projected angle by 20 ms
ret.steerDampTime = 0.03 # dampen projected steer angle over 30ms (3 control cycles)

if candidate == CAR.JEEP_CHEROKEE:
ret.wheelbase = 2.91 # in meters
Expand Down
8 changes: 4 additions & 4 deletions selfdrive/car/ford/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ def get_params(candidate, fingerprint):
ret.steerKf = 1. / MAX_ANGLE # MAX Steer angle to normalize FF
ret.steerActuatorDelay = 0.1 # Default delay, not measured yet
ret.steerRateCost = 1.0
ret.steerMPCReactTime = 0.05 # increase total MPC projected time by 50 ms
ret.steerMPCDampTime = 0.2 # dampen desired angle over 200ms (4 mpc cycles)
ret.steerReactTime = -0.1 # decrease total projected angle by 100 ms
ret.steerDampTime = 0.2 # dampen projected steer angle over 200ms (20 control cycles)
ret.steerMPCReactTime = 0.025 # increase total MPC projected time by 25 ms
ret.steerMPCDampTime = 0.05 # dampen desired angle over 50ms (1 mpc cycles)
ret.steerReactTime = -0.02 # decrease total projected angle by 20 ms
ret.steerDampTime = 0.03 # dampen projected steer angle over 30ms (3 control cycles)

f = 1.2
tireStiffnessFront_civic *= f
Expand Down
8 changes: 4 additions & 4 deletions selfdrive/car/gm/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ def get_params(candidate, fingerprint):
ret.carFingerprint = candidate

ret.enableCruise = False
ret.steerMPCReactTime = 0.05 # increase total MPC projected time by 50 ms
ret.steerMPCDampTime = 0.2 # dampen desired angle over 200ms (4 mpc cycles)
ret.steerReactTime = -0.1 # decrease total projected angle by 100 ms
ret.steerDampTime = 0.2 # dampen projected steer angle over 200ms (20 control cycles)
ret.steerMPCReactTime = 0.025 # increase total MPC projected time by 25 ms
ret.steerMPCDampTime = 0.05 # dampen desired angle over 50ms (1 mpc cycles)
ret.steerReactTime = -0.02 # decrease total projected angle by 20 ms
ret.steerDampTime = 0.03 # dampen projected steer angle over 30ms (3 control cycles)

# Presence of a camera on the object bus is ok.
# Have to go passive if ASCM is online (ACC-enabled cars),
Expand Down
16 changes: 8 additions & 8 deletions selfdrive/car/honda/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@ def get_params(candidate, fingerprint):
rotationalInertia_civic = 2500
tireStiffnessFront_civic = 192150
tireStiffnessRear_civic = 202500
ret.steerMPCReactTime = 0.025 # increase total MPC projected time by 25 ms
ret.steerMPCDampTime = 0.1 # dampen desired angle over 100ms (2 mpc cycles)
ret.steerReactTime = -0.04 # decrease total projected angle by 40 ms
ret.steerDampTime = 0.05 # dampen projected steer angle over 50ms (1 control cycles)
ret.steerMPCReactTime = 0.025 # increase total MPC projected time by 25 ms
ret.steerMPCDampTime = 0.05 # dampen desired angle over 50ms (1 mpc cycles)
ret.steerReactTime = -0.02 # decrease total projected angle by 20 ms
ret.steerDampTime = 0.03 # dampen projected steer angle over 30ms (3 control cycles)

# Optimized car params: tire_stiffness_factor and steerRatio are a result of a vehicle
# model optimization process. Certain Hondas have an extra steering sensor at the bottom
Expand Down Expand Up @@ -224,10 +224,10 @@ def get_params(candidate, fingerprint):
ret.steerRatio = 15.96 # 11.82 is spec end-to-end
tire_stiffness_factor = 0.8467
ret.syncID = 330
ret.steerMPCReactTime = 0.05 # project desired angle 0 ms
ret.steerMPCDampTime = 0.25 # smooth desired angle over 300ms (30 samples)
ret.steerMPCReactTime = 0.025 # project desired angle 0 ms
ret.steerMPCDampTime = 0.3 # smooth desired angle over 300ms (30 samples)
ret.steerReactTime = 0.0 # project steer angle 0 ms (using steer rate)
ret.steerDampTime = 0.25 # smooth projected steer angle over 300ms (30 samples)
ret.steerDampTime = 0.3 # smooth projected steer angle over 300ms (30 samples)
ret.steerKpV, ret.steerKiV = [[0.6], [0.18]]
ret.longitudinalKpBP = [0., 5., 35.]
ret.longitudinalKpV = [1.2, 0.8, 0.5]
Expand Down Expand Up @@ -363,7 +363,7 @@ def get_params(candidate, fingerprint):

# no max steer limit VS speed
ret.steerMaxBP = [0.] # m/s
ret.steerMaxV = [1.] # max steer allowed
ret.steerMaxV = [1.] # max steer allowed

ret.gasMaxBP = [0.] # m/s
ret.gasMaxV = [0.6] if ret.enableGasInterceptor else [0.] # max gas allowed
Expand Down
8 changes: 4 additions & 4 deletions selfdrive/car/hyundai/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ def get_params(candidate, fingerprint):
rotationalInertia_civic = 2500
tireStiffnessFront_civic = 192150
tireStiffnessRear_civic = 202500
ret.steerMPCReactTime = 0.05 # increase total MPC projected time by 50 ms
ret.steerMPCDampTime = 0.2 # dampen desired angle over 200ms (4 mpc cycles)
ret.steerReactTime = -0.1 # decrease total projected angle by 100 ms
ret.steerDampTime = 0.2 # dampen projected steer angle over 200ms (20 control cycles)
ret.steerMPCReactTime = 0.025 # increase total MPC projected time by 25 ms
ret.steerMPCDampTime = 0.05 # dampen desired angle over 50ms (1 mpc cycles)
ret.steerReactTime = -0.02 # decrease total projected angle by 20 ms
ret.steerDampTime = 0.03 # dampen projected steer angle over 30ms (3 control cycles)

ret.steerActuatorDelay = 0.1 # Default delay
tire_stiffness_factor = 1.
Expand Down
4 changes: 4 additions & 0 deletions selfdrive/car/subaru/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ def get_params(candidate, fingerprint):
ret.enableCruise = False
ret.steerLimitAlert = True
ret.enableCamera = True
ret.steerMPCReactTime = 0.025 # increase total MPC projected time by 25 ms
ret.steerMPCDampTime = 0.05 # dampen desired angle over 50ms (1 mpc cycles)
ret.steerReactTime = -0.02 # decrease total projected angle by 20 ms
ret.steerDampTime = 0.03 # dampen projected steer angle over 30ms (3 control cycles)

std_cargo = 136
ret.steerRateCost = 0.7
Expand Down
12 changes: 4 additions & 8 deletions selfdrive/car/toyota/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ def get_params(candidate, fingerprint):
rotationalInertia_civic = 2500
tireStiffnessFront_civic = 192150
tireStiffnessRear_civic = 202500
ret.steerMPCReactTime = 0.05 # increase total MPC projected time by 50 ms
ret.steerMPCDampTime = 0.2 # dampen desired angle over 200ms (4 mpc cycles)
ret.steerReactTime = -0.1 # decrease total projected angle by 100 ms
ret.steerDampTime = 0.2 # dampen projected steer angle over 200ms (20 control cycles)
ret.steerMPCReactTime = 0.025 # increase total MPC projected time by 25 ms
ret.steerMPCDampTime = 0.05 # dampen desired angle over 50ms (1 mpc cycles)
ret.steerReactTime = -0.02 # decrease total projected angle by 20 ms
ret.steerDampTime = 0.03 # dampen projected steer angle over 30ms (3 control cycles)

ret.steerKiBP, ret.steerKpBP = [[0.], [0.]]
ret.steerActuatorDelay = 0.12 # Default delay, Prius has larger delay
Expand All @@ -89,10 +89,6 @@ def get_params(candidate, fingerprint):
ret.mass = 3045 * CV.LB_TO_KG + std_cargo
ret.steerKpV, ret.steerKiV = [[0.4], [0.01]]
ret.steerKf = 0.00006 # full torque for 10 deg at 80mph means 0.00007818594
ret.steerMPCReactTime = 0.05 # increase total MPC projected time by 50 ms
ret.steerMPCDampTime = 0.2 # dampen desired angle over 200ms (4 mpc cycles)
ret.steerReactTime = 0.15 # decrease total projected angle by 100 ms
ret.steerDampTime = 0.5 # dampen projected steer angle over 200ms (20 control cycles)
# TODO: Prius seem to have very laggy actuators. Understand if it is lag or hysteresis
ret.steerActuatorDelay = 0.25

Expand Down

0 comments on commit 0845916

Please sign in to comment.