From 5383d9eddabec9f9a4d3bcded227dcd375174162 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Thu, 8 Jul 2021 14:06:31 -0700 Subject: [PATCH] make qlogs small again (#178) * make qlogs small again * long plan * long plan --- log.capnp | 4 ++-- services.py | 31 ++++++++++++------------------- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/log.capnp b/log.capnp index 962875a..4d15e8b 100644 --- a/log.capnp +++ b/log.capnp @@ -1375,8 +1375,6 @@ struct Event { longitudinalPlan @24 :LongitudinalPlan; lateralPlan @64 :LateralPlan; ubloxGnss @34 :UbloxGnss; - liveMpc @36 :LiveMpcData; - liveLongitudinalMpc @37 :LiveLongitudinalMpcData; ubloxRaw @39 :Data; gpsLocationExternal @48 :GpsLocationData; driverState @59 :DriverState; @@ -1411,6 +1409,8 @@ struct Event { # *********** legacy + deprecated *********** model @9 :Legacy.ModelData; # TODO: rename modelV2 and mark this as deprecated + liveMpcDEPRECATED @36 :LiveMpcData; + liveLongitudinalMpcDEPRECATED @37 :LiveLongitudinalMpcData; liveLocationKalmanDEPRECATED @51 :Legacy.LiveLocationData; orbslamCorrectionDEPRECATED @45 :Legacy.OrbslamCorrection; liveUIDEPRECATED @14 :Legacy.LiveUI; diff --git a/services.py b/services.py index bd89cfa..86e4ed0 100755 --- a/services.py +++ b/services.py @@ -19,9 +19,10 @@ class Service: self.frequency = frequency self.decimation = decimation +DCAM_FREQ = 10. if not TICI else 20. services = { - "roadCameraState": (True, 20., 1), # should_log, frequency, decimation (optional) + # service: (should_log, frequency, qlog decimation (optional)) "sensorEvents": (True, 100., 100), "gpsNMEA": (True, 9.), "deviceState": (True, 2., 1), @@ -35,39 +36,31 @@ services = { "sendcan": (True, 100.), "logMessage": (True, 0.), "liveCalibration": (True, 4., 4), - "androidLog": (True, 0., 1), + "androidLog": (True, 0.), "carState": (True, 100., 10), "carControl": (True, 100., 10), - "longitudinalPlan": (True, 20., 2), - "liveLocation": (True, 0., 1), + "longitudinalPlan": (True, 20., 5), "procLog": (True, 0.5), "gpsLocationExternal": (True, 10., 1), "ubloxGnss": (True, 10.), "clocks": (True, 1., 1), - "liveMpc": (False, 20.), - "liveLongitudinalMpc": (False, 20.), "ubloxRaw": (True, 20.), "liveLocationKalman": (True, 20., 2), - "uiLayoutState": (True, 0.), "liveParameters": (True, 20., 2), "cameraOdometry": (True, 20., 5), - "lateralPlan": (True, 20., 2), + "lateralPlan": (True, 20., 5), "thumbnail": (True, 0.2, 1), "carEvents": (True, 1., 1), "carParams": (True, 0.02, 1), - "driverCameraState": (True, 10. if not TICI else 20., 1), - "driverEncodeIdx": (True, 10. if not TICI else 20., 1), - "driverState": (True, 10. if not TICI else 20., 1), - "driverMonitoringState": (True, 10. if not TICI else 20., 1), - "offroadLayout": (False, 0.), + "roadCameraState": (True, 20., 20), + "driverCameraState": (True, DCAM_FREQ, DCAM_FREQ), + "driverEncodeIdx": (True, DCAM_FREQ, 1), + "driverState": (True, DCAM_FREQ, DCAM_FREQ / 2), + "driverMonitoringState": (True, DCAM_FREQ, DCAM_FREQ / 2), "wideRoadEncodeIdx": (True, 20., 1), - "wideRoadCameraState": (True, 20., 1), - "modelV2": (True, 20., 20), + "wideRoadCameraState": (True, 20., 20), + "modelV2": (True, 20., 40), "managerState": (True, 2., 1), - - "testModel": (False, 0.), - "testLiveLocation": (False, 0.), - "testJoystick": (False, 0.), } service_list = {name: Service(new_port(idx), *vals) for # type: ignore idx, (name, vals) in enumerate(services.items())}