|
|
@ -165,11 +165,12 @@ DMonitoringResult dmonitoring_eval_frame(DMonitoringModelState* s, void* stream_ |
|
|
|
return ret; |
|
|
|
return ret; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void dmonitoring_publish(PubMaster &pm, uint32_t frame_id, const DMonitoringResult &res){ |
|
|
|
void dmonitoring_publish(PubMaster &pm, uint32_t frame_id, const DMonitoringResult &res, float execution_time){ |
|
|
|
// make msg
|
|
|
|
// make msg
|
|
|
|
MessageBuilder msg; |
|
|
|
MessageBuilder msg; |
|
|
|
auto framed = msg.initEvent().initDriverState(); |
|
|
|
auto framed = msg.initEvent().initDriverState(); |
|
|
|
framed.setFrameId(frame_id); |
|
|
|
framed.setFrameId(frame_id); |
|
|
|
|
|
|
|
framed.setModelExecutionTime(execution_time); |
|
|
|
|
|
|
|
|
|
|
|
kj::ArrayPtr<const float> face_orientation(&res.face_orientation[0], ARRAYSIZE(res.face_orientation)); |
|
|
|
kj::ArrayPtr<const float> face_orientation(&res.face_orientation[0], ARRAYSIZE(res.face_orientation)); |
|
|
|
kj::ArrayPtr<const float> face_orientation_std(&res.face_orientation_meta[0], ARRAYSIZE(res.face_orientation_meta)); |
|
|
|
kj::ArrayPtr<const float> face_orientation_std(&res.face_orientation_meta[0], ARRAYSIZE(res.face_orientation_meta)); |
|
|
|