Honda: resolve controls mismatch due to interceptor thresholds (#24173)

* make panda and openpilot thresholds match

* Revert "make panda and openpilot thresholds match"

This reverts commit dfcbd20587.

* make panda and openpilot thresholds match

* remove interceptor scaling, compare int value

* remove honda exception

* bump panda

* bump opendbc

* add segment to check controls mismatch

* bump submodules
pull/24193/head
Shane Smiskol 3 years ago committed by GitHub
parent 85c714e350
commit e8faf9f985
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      opendbc
  2. 2
      panda
  3. 6
      selfdrive/car/honda/carstate.py
  4. 2
      selfdrive/car/tests/routes.py
  5. 2
      selfdrive/car/tests/test_models.py

@ -1 +1 @@
Subproject commit b928a205138975346a11fede0d3101e948875eee
Subproject commit eb56fff37a4a2738df7add08779db51a0a6f38e2

@ -1 +1 @@
Subproject commit cc0fdffee6eb5251331dc58ebc03057521e45b15
Subproject commit c925407461e46adf3282494af6daa00b2626ebb8

@ -239,10 +239,12 @@ class CarState(CarStateBase):
ret.gearShifter = self.parse_gear_shifter(self.shifter_values.get(gear, None))
if self.CP.enableGasInterceptor:
ret.gas = (cp.vl["GAS_SENSOR"]["INTERCEPTOR_GAS"] + cp.vl["GAS_SENSOR"]["INTERCEPTOR_GAS2"]) / 2.
# Same threshold as panda, equivalent to 1e-5 with previous DBC scaling
ret.gas = (cp.vl["GAS_SENSOR"]["INTERCEPTOR_GAS"] + cp.vl["GAS_SENSOR"]["INTERCEPTOR_GAS2"]) // 2
ret.gasPressed = ret.gas > 492
else:
ret.gas = cp.vl["POWERTRAIN_DATA"]["PEDAL_GAS"]
ret.gasPressed = ret.gas > 1e-5
ret.gasPressed = ret.gas > 1e-5
ret.steeringTorque = cp.vl["STEER_STATUS"]["STEER_TORQUE_SENSOR"]
ret.steeringTorqueEps = cp.vl["STEER_MOTOR_TORQUE"]["MOTOR_TORQUE"]

@ -45,6 +45,8 @@ routes = [
TestRoute("0e7a2ba168465df5|2020-10-18--14-14-22", HONDA.ACURA_RDX_3G),
TestRoute("a74b011b32b51b56|2020-07-26--17-09-36", HONDA.CIVIC),
# Checks there's no controls mismatches due to pedal thresholds
TestRoute("cfb32f0fb91b173b|2022-04-06--14-54-45", HONDA.CIVIC, segment=21),
TestRoute("a859a044a447c2b0|2020-03-03--18-42-45", HONDA.CRV_EU),
TestRoute("68aac44ad69f838e|2021-05-18--20-40-52", HONDA.CRV),
TestRoute("14fed2e5fa0aa1a5|2021-05-25--14-59-42", HONDA.CRV_HYBRID),

@ -215,8 +215,6 @@ class TestCarModel(unittest.TestCase):
# panda intentionally has a higher threshold
if self.CP.carName == "toyota" and 15 < CS.gas < 15*1.5:
gas_pressed = False
if self.CP.carName == "honda":
gas_pressed = False
checks['gasPressed'] += gas_pressed != self.safety.get_gas_pressed_prev()
# TODO: remove this exception once this mismatch is resolved

Loading…
Cancel
Save