Add modelExecutionTime to DrivingModelData (#33606)

* Add model execution time to DrivingModelData

* Update model replay ref commit

* Update ref commit again

* Ignore this field in model replay

* Back to original ref commit

* Bring back

---------

Co-authored-by: Comma Device <device@comma.ai>
This commit is contained in:
Kacper Rączy 2024-09-19 22:09:53 -07:00 committed by GitHub
parent fe61b436b2
commit 48938098e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 1 deletions

View File

@ -887,6 +887,7 @@ struct DrivingModelData {
frameId @0 :UInt32; frameId @0 :UInt32;
frameIdExtra @1 :UInt32; frameIdExtra @1 :UInt32;
frameDropPerc @6 :Float32; frameDropPerc @6 :Float32;
modelExecutionTime @7 :Float32;
action @2 :ModelDataV2.Action; action @2 :ModelDataV2.Action;

View File

@ -62,6 +62,7 @@ def fill_model_msg(base_msg: capnp._DynamicStructBuilder, extended_msg: capnp._D
driving_model_data.frameId = vipc_frame_id driving_model_data.frameId = vipc_frame_id
driving_model_data.frameIdExtra = vipc_frame_id_extra driving_model_data.frameIdExtra = vipc_frame_id_extra
driving_model_data.frameDropPerc = frame_drop_perc driving_model_data.frameDropPerc = frame_drop_perc
driving_model_data.modelExecutionTime = model_execution_time
action = driving_model_data.action action = driving_model_data.action
action.desiredCurvature = float(net_output_data['desired_curvature'][0,0]) action.desiredCurvature = float(net_output_data['desired_curvature'][0,0])

View File

@ -105,6 +105,7 @@ if __name__ == "__main__":
ignore = [ ignore = [
'logMonoTime', 'logMonoTime',
'drivingModelData.frameDropPerc', 'drivingModelData.frameDropPerc',
'drivingModelData.modelExecutionTime',
'modelV2.frameDropPerc', 'modelV2.frameDropPerc',
'modelV2.modelExecutionTime', 'modelV2.modelExecutionTime',
'driverStateV2.modelExecutionTime', 'driverStateV2.modelExecutionTime',

View File

@ -571,7 +571,7 @@ CONFIGS = [
proc_name="modeld", proc_name="modeld",
pubs=["deviceState", "roadCameraState", "wideRoadCameraState", "liveCalibration", "driverMonitoringState"], pubs=["deviceState", "roadCameraState", "wideRoadCameraState", "liveCalibration", "driverMonitoringState"],
subs=["modelV2", "drivingModelData", "cameraOdometry"], subs=["modelV2", "drivingModelData", "cameraOdometry"],
ignore=["logMonoTime", "modelV2.frameDropPerc", "modelV2.modelExecutionTime"], ignore=["logMonoTime", "modelV2.frameDropPerc", "modelV2.modelExecutionTime", "drivingModelData.frameDropPerc", "drivingModelData.modelExecutionTime"],
should_recv_callback=ModeldCameraSyncRcvCallback(), should_recv_callback=ModeldCameraSyncRcvCallback(),
tolerance=NUMPY_TOLERANCE, tolerance=NUMPY_TOLERANCE,
processing_time=0.020, processing_time=0.020,