Body: move to car specs (#31666)

* specs

* override

* fixes 1

* fix 3

* fixes 4

* fixes

* fixes

* fixc

* fix number 723124

* that too

* fixes

* aa

* do body real quick too

* body too
old-commit-hash: a5ee1638b8
pull/32199/head
Justin Newberry 2 years ago committed by GitHub
parent 9b6963a00d
commit 3ec004d482
  1. 4
      selfdrive/car/body/interface.py
  2. 3
      selfdrive/car/body/values.py
  3. 3
      selfdrive/car/tests/test_platform_configs.py

@ -14,14 +14,10 @@ class CarInterface(CarInterfaceBase):
ret.minSteerSpeed = -math.inf
ret.maxLateralAccel = math.inf # TODO: set to a reasonable value
ret.steerRatio = 0.5
ret.steerLimitTimer = 1.0
ret.steerActuatorDelay = 0.
ret.mass = 9
ret.wheelbase = 0.406
ret.wheelSpeedFactor = SPEED_FROM_RPM
ret.centerToFront = ret.wheelbase * 0.44
ret.radarUnavailable = True
ret.openpilotLongitudinalControl = True

@ -1,5 +1,5 @@
from cereal import car
from openpilot.selfdrive.car import PlatformConfig, Platforms, dbc_dict
from openpilot.selfdrive.car import CarSpecs, PlatformConfig, Platforms, dbc_dict
from openpilot.selfdrive.car.docs_definitions import CarInfo
from openpilot.selfdrive.car.fw_query_definitions import FwQueryConfig, Request, StdQueries
@ -24,6 +24,7 @@ class CAR(Platforms):
"COMMA BODY",
CarInfo("comma body", package="All"),
dbc_dict('comma_body', None),
specs=CarSpecs(mass=9, wheelbase=0.406, steerRatio=0.5, centerToFrontRatio=0.44)
)

@ -16,8 +16,7 @@ class TestPlatformConfigs(unittest.TestCase):
self.assertIn("pt", platform.config.dbc_dict)
self.assertTrue(len(platform.config.platform_str) > 0)
# enable when all cars have specs
#self.assertIsNotNone(platform.config.specs)
self.assertIsNotNone(platform.config.specs)
if __name__ == "__main__":

Loading…
Cancel
Save