From 29b30dc015ab2f6610f046310e32d03080a31601 Mon Sep 17 00:00:00 2001
From: Mathieu Beligon <mathieu@feedly.com>
Date: Tue, 17 Mar 2020 23:36:08 -0400
Subject: [PATCH] [robots] (demo) Add send target through fds

---
 robots-at-robots/research/demos/demo_pipeline_camera.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/robots-at-robots/research/demos/demo_pipeline_camera.py b/robots-at-robots/research/demos/demo_pipeline_camera.py
index 10485ff..8088138 100644
--- a/robots-at-robots/research/demos/demo_pipeline_camera.py
+++ b/robots-at-robots/research/demos/demo_pipeline_camera.py
@@ -1,7 +1,9 @@
+import sys
 from time import time
 
 import pycuda.autoinit  # This is needed for initializing CUDA driver
 
+from polystar.common.communication.file_descriptor_target_sender import FileDescriptorTargetSender
 from polystar.common.constants import MODELS_DIR
 from polystar.common.frame_generators.camera_frame_generator import CameraFrameGenerator
 from polystar.common.models.camera import Camera
@@ -34,6 +36,7 @@ if __name__ == "__main__":
         objects_validators=[ConfidenceObjectValidator(0.6), TypeObjectValidator(ObjectType.Armor)],
         object_selector=ClosestObjectSelector(),
         target_factory=RatioSimpleTargetFactory(injector.get(Camera), 300, 100),
+        target_sender=FileDescriptorTargetSender(int(sys.argv[1])),
     )
 
     fps = 0
-- 
GitLab