Skip to content

Commit 183b691

Browse files
jakubsikorskisaratpoluridpitulax
authored
[ITEP-81197] Publish to scene topics when there are no detections (#591)
Co-authored-by: Sarat Poluri <sarat.chandra.poluri@intel.com> Co-authored-by: dpitulax <99968922+dpitulax@users.noreply.github.com>
1 parent 773e40f commit 183b691

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

controller/src/controller/scene_controller.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,14 @@ def handleMovingObjectMessage(self, client, userdata, message):
404404
log.error("UNKNOWN SENDER", sender_id)
405405
return
406406
scene = sender
407+
408+
# If no detection types in the message, add empty arrays for all tracked types
409+
# This must be done BEFORE processCameraData so the tracker processes them
410+
if not detection_types:
411+
detection_types = list(scene.tracker.trackers.keys())
412+
for dtype in detection_types:
413+
jdata['objects'][dtype] = []
414+
407415
success = scene.processCameraData(jdata, when=msg_when)
408416

409417
if not success:

0 commit comments

Comments
 (0)