diff --git a/cereal/log.capnp b/cereal/log.capnp index ddde5e4d16..75df44edec 100644 --- a/cereal/log.capnp +++ b/cereal/log.capnp @@ -887,6 +887,7 @@ struct DrivingModelData { frameId @0 :UInt32; frameIdExtra @1 :UInt32; frameDropPerc @6 :Float32; + modelExecutionTime @7 :Float32; action @2 :ModelDataV2.Action; diff --git a/selfdrive/modeld/fill_model_msg.py b/selfdrive/modeld/fill_model_msg.py index 1c7ae49580..9cdd7e4c52 100644 --- a/selfdrive/modeld/fill_model_msg.py +++ b/selfdrive/modeld/fill_model_msg.py @@ -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.frameIdExtra = vipc_frame_id_extra driving_model_data.frameDropPerc = frame_drop_perc + driving_model_data.modelExecutionTime = model_execution_time action = driving_model_data.action action.desiredCurvature = float(net_output_data['desired_curvature'][0,0]) diff --git a/selfdrive/test/process_replay/model_replay.py b/selfdrive/test/process_replay/model_replay.py index 4402ca31d6..bb7c0b0a8e 100755 --- a/selfdrive/test/process_replay/model_replay.py +++ b/selfdrive/test/process_replay/model_replay.py @@ -105,6 +105,7 @@ if __name__ == "__main__": ignore = [ 'logMonoTime', 'drivingModelData.frameDropPerc', + 'drivingModelData.modelExecutionTime', 'modelV2.frameDropPerc', 'modelV2.modelExecutionTime', 'driverStateV2.modelExecutionTime', diff --git a/selfdrive/test/process_replay/process_replay.py b/selfdrive/test/process_replay/process_replay.py index d94c1d1f52..59f6c6cc53 100755 --- a/selfdrive/test/process_replay/process_replay.py +++ b/selfdrive/test/process_replay/process_replay.py @@ -571,7 +571,7 @@ CONFIGS = [ proc_name="modeld", pubs=["deviceState", "roadCameraState", "wideRoadCameraState", "liveCalibration", "driverMonitoringState"], subs=["modelV2", "drivingModelData", "cameraOdometry"], - ignore=["logMonoTime", "modelV2.frameDropPerc", "modelV2.modelExecutionTime"], + ignore=["logMonoTime", "modelV2.frameDropPerc", "modelV2.modelExecutionTime", "drivingModelData.frameDropPerc", "drivingModelData.modelExecutionTime"], should_recv_callback=ModeldCameraSyncRcvCallback(), tolerance=NUMPY_TOLERANCE, processing_time=0.020,