mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-19 08:53:54 +08:00
Add driverStateV2 plots to model replay (#33967)
This commit is contained in:
@@ -139,7 +139,6 @@ def main():
|
||||
pm = PubMaster(["driverStateV2"])
|
||||
|
||||
calib = np.zeros(CALIB_LEN, dtype=np.float32)
|
||||
# last = 0
|
||||
|
||||
while True:
|
||||
buf = vipc_client.recv()
|
||||
@@ -155,8 +154,6 @@ def main():
|
||||
t2 = time.perf_counter()
|
||||
|
||||
pm.send("driverStateV2", get_driverstate_packet(model_output, vipc_client.frame_id, vipc_client.timestamp_sof, t2 - t1, gpu_execution_time))
|
||||
# print("dmonitoring process: %.2fms, from last %.2fms\n" % (t2 - t1, t1 - last))
|
||||
# last = t1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -58,10 +58,18 @@ def generate_report(proposed, master, tmp, commit):
|
||||
(lambda x: x.laneLines[1].y[0], "laneLines.y"),
|
||||
(lambda x: x.meta.disengagePredictions.gasPressProbs[1], "gasPressProbs")
|
||||
], "modelV2")
|
||||
DriverStateV2_Plots = zl([
|
||||
(lambda x: x.wheelOnRightProb, "wheelOnRightProb"),
|
||||
(lambda x: x.leftDriverData.faceProb, "leftDriverData.faceProb"),
|
||||
(lambda x: x.leftDriverData.faceOrientation[0], "leftDriverData.faceOrientation0"),
|
||||
(lambda x: x.leftDriverData.leftBlinkProb, "leftDriverData.leftBlinkProb"),
|
||||
(lambda x: x.leftDriverData.notReadyProb[0], "leftDriverData.notReadyProb0"),
|
||||
(lambda x: x.rightDriverData.faceProb, "rightDriverData.faceProb"),
|
||||
], "driverStateV2")
|
||||
|
||||
return [plot(map(v[0], get_event(proposed, event)), \
|
||||
map(v[0], get_event(master, event)), f"{v[1]}_{commit[:7]}", tmp) \
|
||||
for v,event in [*ModelV2_Plots]]
|
||||
for v,event in ([*ModelV2_Plots] + [*DriverStateV2_Plots])]
|
||||
|
||||
def create_table(title, files, link, open_table=False):
|
||||
if not files:
|
||||
|
||||
Reference in New Issue
Block a user