mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-06 14:16:39 +08:00
Publish navEnabled from modeld (#28647)
* Publish navEnabled from modeld * Bump cereal old-commit-hash: 4c2c73b15282f405900b64b0fb67d461f3058b5c
This commit is contained in:
+1
-1
Submodule cereal updated: 1de4176d3e...cacfda17fd
@@ -179,7 +179,7 @@ void run_model(ModelState &model, VisionIpcClient &vipc_client_main, VisionIpcCl
|
||||
|
||||
if (model_output != nullptr) {
|
||||
model_publish(pm, meta_main.frame_id, meta_extra.frame_id, frame_id, frame_drop_ratio, *model_output, meta_main.timestamp_eof, model_execution_time,
|
||||
kj::ArrayPtr<const float>(model.output.data(), model.output.size()), live_calib_seen);
|
||||
kj::ArrayPtr<const float>(model.output.data(), model.output.size()), nav_enabled, live_calib_seen);
|
||||
posenet_publish(pm, meta_main.frame_id, vipc_dropped_frames, *model_output, meta_main.timestamp_eof, live_calib_seen);
|
||||
}
|
||||
|
||||
|
||||
@@ -364,7 +364,7 @@ void fill_model(cereal::ModelDataV2::Builder &framed, const ModelOutput &net_out
|
||||
|
||||
void model_publish(PubMaster &pm, uint32_t vipc_frame_id, uint32_t vipc_frame_id_extra, uint32_t frame_id, float frame_drop,
|
||||
const ModelOutput &net_outputs, uint64_t timestamp_eof,
|
||||
float model_execution_time, kj::ArrayPtr<const float> raw_pred, const bool valid) {
|
||||
float model_execution_time, kj::ArrayPtr<const float> raw_pred, const bool nav_enabled, const bool valid) {
|
||||
const uint32_t frame_age = (frame_id > vipc_frame_id) ? (frame_id - vipc_frame_id) : 0;
|
||||
MessageBuilder msg;
|
||||
auto framed = msg.initEvent(valid).initModelV2();
|
||||
@@ -374,6 +374,7 @@ void model_publish(PubMaster &pm, uint32_t vipc_frame_id, uint32_t vipc_frame_id
|
||||
framed.setFrameDropPerc(frame_drop * 100);
|
||||
framed.setTimestampEof(timestamp_eof);
|
||||
framed.setModelExecutionTime(model_execution_time);
|
||||
framed.setNavEnabled(nav_enabled);
|
||||
if (send_raw_pred) {
|
||||
framed.setRawPredictions(raw_pred.asBytes());
|
||||
}
|
||||
|
||||
@@ -285,6 +285,6 @@ ModelOutput *model_eval_frame(ModelState* s, VisionBuf* buf, VisionBuf* buf_wide
|
||||
void model_free(ModelState* s);
|
||||
void model_publish(PubMaster &pm, uint32_t vipc_frame_id, uint32_t vipc_frame_id_extra, uint32_t frame_id, float frame_drop,
|
||||
const ModelOutput &net_outputs, uint64_t timestamp_eof,
|
||||
float model_execution_time, kj::ArrayPtr<const float> raw_pred, const bool valid);
|
||||
float model_execution_time, kj::ArrayPtr<const float> raw_pred, const bool nav_enabled, const bool valid);
|
||||
void posenet_publish(PubMaster &pm, uint32_t vipc_frame_id, uint32_t vipc_dropped_frames,
|
||||
const ModelOutput &net_outputs, uint64_t timestamp_eof, const bool valid);
|
||||
|
||||
Reference in New Issue
Block a user