mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-27 17:42:04 +08:00
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: a5ee1638b8d4f7dde23b9160e26d715cd1420202
This commit is contained in:
@@ -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__":
|
||||
|
||||
Reference in New Issue
Block a user