[RAM 1500 5TH GEN] Update offline torque parameters and enable torqued (#27072)

* make run torque learnable

* update ram offline values

* add ram 1500 to torqued

* update refs
pull/27073/head
Vivek Aithal 3 years ago committed by GitHub
parent 1e9ac45221
commit 7ba8e56e87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      selfdrive/car/torque_data/override.yaml
  2. 1
      selfdrive/car/torque_data/params.yaml
  3. 18
      selfdrive/locationd/torqued.py
  4. 2
      selfdrive/test/process_replay/ref_commit

@ -21,7 +21,6 @@ FORD FOCUS 4TH GEN: [.nan, 1.5, .nan]
COMMA BODY: [.nan, 1000, .nan]
# Totally new cars
RAM 1500 5TH GEN: [2.0, 2.0, 0.0]
RAM HD 5TH GEN: [1.4, 1.4, 0.0]
SUBARU OUTBACK 6TH GEN: [2.3, 2.3, 0.11]
CHEVROLET BOLT EV 2022: [2.0, 2.0, 0.05]

@ -56,6 +56,7 @@ LEXUS RX 2020: [1.5228812994274734, 1.431102486563665, 0.164117]
LEXUS RX HYBRID 2017: [1.6984261557042386, 1.3211501880159107, 0.1820354534928893]
LEXUS RX HYBRID 2020: [1.5522309889823778, 1.255230465866663, 0.2220954003055114]
MAZDA CX-9 2021: [1.7601682915983443, 1.0889677335154337, 0.17713792194297195]
RAM 1500 5TH GEN: [1.550848, 2.0, 0.132261]
SKODA SUPERB 3RD GEN: [1.166437404652981, 1.1686163012668165, 0.12194533036948708]
SUBARU FORESTER 2019: [3.6617001649776793, 2.342197172531713, 0.11075960785398745]
SUBARU IMPREZA LIMITED 2019: [1.0670704910352047, 0.8234374840709592, 0.20986563268614938]

@ -22,7 +22,9 @@ FIT_POINTS_TOTAL_QLOG = 600
MIN_VEL = 15 # m/s
FRICTION_FACTOR = 1.5 # ~85% of data coverage
FACTOR_SANITY = 0.3
FACTOR_SANITY_QLOG = 0.5
FRICTION_SANITY = 0.5
FRICTION_SANITY_QLOG = 0.8
STEER_MIN_THRESHOLD = 0.02
MIN_FILTER_DECAY = 50
MAX_FILTER_DECAY = 250
@ -35,6 +37,7 @@ MIN_ENGAGE_BUFFER = 2 # secs
VERSION = 1 # bump this to invalidate old parameter caches
ALLOWED_CARS = ['toyota', 'hyundai']
ALLOWED_PLATFORMS = ['RAM 1500 5TH GEN'] # for adding individual platforms from a brand without torqued
def slope2rot(slope):
@ -100,15 +103,20 @@ class TorqueEstimator:
self.min_bucket_points = MIN_BUCKET_POINTS / 10
self.min_points_total = MIN_POINTS_TOTAL_QLOG
self.fit_points = FIT_POINTS_TOTAL_QLOG
self.factor_sanity = FACTOR_SANITY_QLOG
self.friction_sanity = FRICTION_SANITY_QLOG
else:
self.min_bucket_points = MIN_BUCKET_POINTS
self.min_points_total = MIN_POINTS_TOTAL
self.fit_points = FIT_POINTS_TOTAL
self.factor_sanity = FACTOR_SANITY
self.friction_sanity = FRICTION_SANITY
self.offline_friction = 0.0
self.offline_latAccelFactor = 0.0
self.resets = 0.0
self.use_params = CP.carName in ALLOWED_CARS
self.use_params = (CP.carName in ALLOWED_CARS) or (CP.carFingerprint in ALLOWED_PLATFORMS)
if CP.lateralTuning.which() == 'torque':
self.offline_friction = CP.lateralTuning.torque.friction
@ -123,10 +131,10 @@ class TorqueEstimator:
'points': []
}
self.decay = MIN_FILTER_DECAY
self.min_lataccel_factor = (1.0 - FACTOR_SANITY) * self.offline_latAccelFactor
self.max_lataccel_factor = (1.0 + FACTOR_SANITY) * self.offline_latAccelFactor
self.min_friction = (1.0 - FRICTION_SANITY) * self.offline_friction
self.max_friction = (1.0 + FRICTION_SANITY) * self.offline_friction
self.min_lataccel_factor = (1.0 - self.factor_sanity) * self.offline_latAccelFactor
self.max_lataccel_factor = (1.0 + self.factor_sanity) * self.offline_latAccelFactor
self.min_friction = (1.0 - self.friction_sanity) * self.offline_friction
self.max_friction = (1.0 + self.friction_sanity) * self.offline_friction
# try to restore cached params
params = Params()

@ -1 +1 @@
acc5655633af6ade096ad41f680fd8a28c2e3790
3639e42ed538ee5d94ec2572cf27af6260633fad
Loading…
Cancel
Save