From c6acc0698a604e715e960250359b6bf97e4987e3 Mon Sep 17 00:00:00 2001 From: ZwX1616 Date: Mon, 20 Jun 2022 16:24:43 -0700 Subject: [PATCH] driverStateV2 (#317) Revert "Revert driverStateV2 (#316)" This reverts commit ff49c8e126ea04889af13d690ceaf520ce7084d2. --- log.capnp | 36 +++++++++++++++++++++++++++++++++--- services.py | 2 +- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/log.capnp b/log.capnp index e6cf2f0..a246761 100644 --- a/log.capnp +++ b/log.capnp @@ -1632,7 +1632,36 @@ struct Joystick { buttons @1: List(Bool); } -struct DriverState { +struct DriverStateV2 { + frameId @0 :UInt32; + modelExecutionTime @1 :Float32; + dspExecutionTime @2 :Float32; + rawPredictions @3 :Data; + + poorVisionProb @4 :Float32; + wheelOnRightProb @5 :Float32; + + leftDriverData @6 :DriverData; + rightDriverData @7 :DriverData; + + struct DriverData { + faceOrientation @0 :List(Float32); + faceOrientationStd @1 :List(Float32); + facePosition @2 :List(Float32); + facePositionStd @3 :List(Float32); + faceProb @4 :Float32; + leftEyeProb @5 :Float32; + rightEyeProb @6 :Float32; + leftBlinkProb @7 :Float32; + rightBlinkProb @8 :Float32; + sunglassesProb @9 :Float32; + occludedProb @10 :Float32; + readyProb @11 :List(Float32); + notReadyProb @12 :List(Float32); + } +} + +struct DriverStateDEPRECATED @0xb83c6cc593ed0a00 { frameId @0 :UInt32; modelExecutionTime @14 :Float32; dspExecutionTime @16 :Float32; @@ -1680,8 +1709,8 @@ struct DriverMonitoringState @0xb83cda094a1da284 { isLowStd @13 :Bool; hiStdCount @14 :UInt32; isActiveMode @16 :Bool; + isRHD @4 :Bool; - isRHDDEPRECATED @4 :Bool; isPreviewDEPRECATED @15 :Bool; rhdCheckedDEPRECATED @5 :Bool; } @@ -1862,7 +1891,6 @@ struct Event { qcomGnss @31 :QcomGnss; gpsLocationExternal @48 :GpsLocationData; gnssMeasurements @91 :GnssMeasurements; - driverState @59 :DriverState; liveParameters @61 :LiveParametersData; cameraOdometry @63 :CameraOdometry; thumbnail @66: Thumbnail; @@ -1871,6 +1899,7 @@ struct Event { driverMonitoringState @71: DriverMonitoringState; liveLocationKalman @72 :LiveLocationKalman; modelV2 @75 :ModelDataV2; + driverStateV2 @92 :DriverStateV2; # camera stuff, each camera state has a matching encode idx roadCameraState @2 :FrameData; @@ -1940,5 +1969,6 @@ struct Event { gpsLocationDEPRECATED @21 :GpsLocationData; uiLayoutStateDEPRECATED @57 :Legacy.UiLayoutState; pandaStateDEPRECATED @12 :PandaState; + driverStateDEPRECATED @59 :DriverStateDEPRECATED; } } diff --git a/services.py b/services.py index 95060a3..8c50e11 100755 --- a/services.py +++ b/services.py @@ -56,7 +56,7 @@ services = { "roadCameraState": (True, 20., 20), "driverCameraState": (True, 20., 20), "driverEncodeIdx": (False, 20., 1), - "driverState": (True, 20., 10), + "driverStateV2": (True, 20., 10), "driverMonitoringState": (True, 20., 10), "wideRoadEncodeIdx": (False, 20., 1), "wideRoadCameraState": (True, 20., 20),