mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-04 15:56:08 +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: db93275d87
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