mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 08:14:00 +08:00
Simulator: only send camera frames at rate that they are generated (#30802)
only send frames at rate that they are generated old-commit-hash: 8017c25f0b2960db13df22295c077fbbd6aa6a07
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import math
|
||||
import threading
|
||||
import multiprocessing
|
||||
import numpy as np
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
@@ -65,7 +65,7 @@ class World(ABC):
|
||||
def __init__(self, dual_camera):
|
||||
self.dual_camera = dual_camera
|
||||
|
||||
self.image_lock = threading.Lock()
|
||||
self.image_lock = multiprocessing.Semaphore(value=0)
|
||||
self.road_image = np.zeros((H, W, 3), dtype=np.uint8)
|
||||
self.wide_road_image = np.zeros((H, W, 3), dtype=np.uint8)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user