Use exact string so similar camera names don't interfere

This commit is contained in:
Nicolas Mowen 2025-06-11 11:07:58 -06:00
parent ebd79f123f
commit d6dda7a3df

View File

@ -149,7 +149,8 @@ def run_detector(
create_output_shm(connection_id)
outputs[connection_id]["np"][:] = detections[:]
detector_publisher.publish(connection_id, connection_id)
signal_id = f"{connection_id}/update"
detector_publisher.publish(signal_id, signal_id)
start.value = 0.0
avg_speed.value = (avg_speed.value * 9 + duration) / 10
@ -230,7 +231,7 @@ class RemoteObjectDetector:
)
self.out_shm = UntrackedSharedMemory(name=f"out-{self.name}", create=False)
self.out_np_shm = np.ndarray((20, 6), dtype=np.float32, buffer=self.out_shm.buf)
self.detector_subscriber = ObjectDetectorSubscriber(name)
self.detector_subscriber = ObjectDetectorSubscriber(f"{name}/update")
def detect(self, tensor_input, threshold=0.4):
detections = []