driverStateV2 (#315)

* add rh

* use sub strut

* use isrhd again

* abandon old

* Update log.capnp

* prob

* left/right

* driverStateV2

* services.py

Co-authored-by: ZwX1616 <zwx1616@gmail.com>
This commit is contained in:
Adeeb Shihadeh
2022-06-08 20:12:27 -07:00
committed by GitHub
parent 7cbb4f1c8c
commit 96cbed052a
2 changed files with 34 additions and 4 deletions

View File

@@ -1614,7 +1614,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;
@@ -1662,8 +1691,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;
}
@@ -1844,7 +1873,6 @@ struct Event {
qcomGnss @31 :QcomGnss;
gpsLocationExternal @48 :GpsLocationData;
gnssMeasurements @91 :GnssMeasurements;
driverState @59 :DriverState;
liveParameters @61 :LiveParametersData;
cameraOdometry @63 :CameraOdometry;
thumbnail @66: Thumbnail;
@@ -1853,6 +1881,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;
@@ -1922,5 +1951,6 @@ struct Event {
gpsLocationDEPRECATED @21 :GpsLocationData;
uiLayoutStateDEPRECATED @57 :Legacy.UiLayoutState;
pandaStateDEPRECATED @12 :PandaState;
driverStateDEPRECATED @59 :DriverStateDEPRECATED;
}
}

View File

@@ -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),