mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-06 05:52:12 +08:00
CARLA: fix setting camera EOF (#24034)
* Fix Openpilot in Carla isn't accelerating The scalars of the timestamp are different in real-world and simulation, which will cause an infinite loop in selfdrive/modeld/modeld.cc. * Set eof based on the frame ID Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * remove global Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> old-commit-hash: db93275d870990979acda75d8c8f9d1d502aabfa
This commit is contained in:
+1
-1
@@ -94,7 +94,7 @@ class Camerad:
|
||||
yuv_cl = cl_array.empty_like(rgb_cl)
|
||||
self.krnl(self.queue, (np.int32(self.Wdiv4), np.int32(self.Hdiv4)), None, rgb_cl.data, yuv_cl.data).wait()
|
||||
yuv = np.resize(yuv_cl.get(), np.int32(rgb.size / 2))
|
||||
eof = self.frame_id * 0.05
|
||||
eof = int(self.frame_id * 0.05 * 1e9)
|
||||
|
||||
# TODO: remove RGB send once the last RGB vipc subscriber is removed
|
||||
self.vipc_server.send(VisionStreamType.VISION_STREAM_RGB_ROAD, img.tobytes(), self.frame_id, eof, eof)
|
||||
|
||||
Reference in New Issue
Block a user