drivingModelData: frameDropPerc (#32871)

* Smokes! lets go!

* Ignore it in model replay
old-commit-hash: 417f1e2139ba6037c9fd6494f68194e36e243540
This commit is contained in:
Kacper Rączy
2024-06-29 02:31:55 -07:00
committed by GitHub
parent 102188c245
commit 02a35949dc
3 changed files with 5 additions and 1 deletions
+1
View File
@@ -871,6 +871,7 @@ struct ControlsState @0x97ff69c53601abf1 {
struct DrivingModelData {
frameId @0 :UInt32;
frameIdExtra @1 :UInt32;
frameDropPerc @6 :Float32;
action @2 :ModelDataV2.Action;
+3 -1
View File
@@ -53,6 +53,7 @@ def fill_model_msg(base_msg: capnp._DynamicStructBuilder, extended_msg: capnp._D
vipc_frame_id: int, vipc_frame_id_extra: int, frame_id: int, frame_drop: float,
timestamp_eof: int, model_execution_time: float, valid: bool) -> None:
frame_age = frame_id - vipc_frame_id if frame_id > vipc_frame_id else 0
frame_drop_perc = frame_drop * 100
extended_msg.valid = valid
base_msg.valid = valid
@@ -60,6 +61,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
action = driving_model_data.action
action.desiredCurvature = float(net_output_data['desired_curvature'][0,0])
@@ -68,7 +70,7 @@ def fill_model_msg(base_msg: capnp._DynamicStructBuilder, extended_msg: capnp._D
modelV2.frameId = vipc_frame_id
modelV2.frameIdExtra = vipc_frame_id_extra
modelV2.frameAge = frame_age
modelV2.frameDropPerc = frame_drop * 100
modelV2.frameDropPerc = frame_drop_perc
modelV2.timestampEof = timestamp_eof
modelV2.modelExecutionTime = model_execution_time
@@ -105,6 +105,7 @@ if __name__ == "__main__":
ignore = [
'logMonoTime',
'drivingModelData.frameDropPerc',
'modelV2.frameDropPerc',
'modelV2.modelExecutionTime',
'driverStateV2.modelExecutionTime',