mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-17 20:33:41 +08:00
@@ -1043,6 +1043,7 @@ struct ModelDataV2 {
|
||||
timestampEof @3 :UInt64;
|
||||
modelExecutionTime @15 :Float32;
|
||||
rawPredictions @16 :Data;
|
||||
big @27 :Bool;
|
||||
|
||||
# predicted future position, orientation, etc..
|
||||
position @4 :XYZTData;
|
||||
|
||||
@@ -128,6 +128,7 @@ class ModelState:
|
||||
self.output_slices = metadata['output_slices']
|
||||
|
||||
self.prev_desire = np.zeros(ModelConstants.DESIRE_LEN, dtype=np.float32)
|
||||
self.usbgpu = usbgpu
|
||||
|
||||
self.frame_skip = ModelConstants.MODEL_RUN_FREQ // ModelConstants.MODEL_CONTEXT_FREQ
|
||||
self.input_queues, self.npy = make_input_queues(self.input_shapes, self.frame_skip, device=self.QUEUE_DEV)
|
||||
@@ -380,6 +381,7 @@ def main(demo=False):
|
||||
fill_model_msg(modelv2_send, model_output, action,
|
||||
publish_state, meta_main.frame_id, meta_extra.frame_id, frame_id,
|
||||
frame_drop_ratio, meta_main.timestamp_eof, model_execution_time, live_calib_seen)
|
||||
modelv2_send.modelV2.big = model.usbgpu
|
||||
|
||||
desire_state = modelv2_send.modelV2.meta.desireState
|
||||
l_lane_change_prob = desire_state[log.Desire.laneChangeLeft]
|
||||
|
||||
Reference in New Issue
Block a user