From c7df07bba71b40b8701e73eaa4b66995f9cb0e31 Mon Sep 17 00:00:00 2001 From: tsampazk Date: Wed, 17 Aug 2022 17:43:29 +0300 Subject: [PATCH] Added box id type conversion that caused error in object det2d centernet --- .../opendr_ws/src/ros_bridge/src/opendr_bridge/bridge.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/opendr_ws/src/ros_bridge/src/opendr_bridge/bridge.py b/projects/opendr_ws/src/ros_bridge/src/opendr_bridge/bridge.py index fe7e4171f2..ee205f5fad 100755 --- a/projects/opendr_ws/src/ros_bridge/src/opendr_bridge/bridge.py +++ b/projects/opendr_ws/src/ros_bridge/src/opendr_bridge/bridge.py @@ -213,7 +213,7 @@ def to_ros_boxes(self, box_list): ros_box.bbox.center.y = box.top + box.height / 2. ros_box.bbox.size_x = box.width ros_box.bbox.size_y = box.height - ros_box.results[0].id = box.name + ros_box.results[0].id = id(box.name) if box.confidence: ros_box.results[0].score = box.confidence ros_boxes.detections.append(ros_box) @@ -235,8 +235,8 @@ def from_ros_boxes(self, ros_detections): height = box.bbox.size_y left = box.bbox.center.x - width / 2. top = box.bbox.center.y - height / 2. - id = box.results[0].id - bbox = BoundingBox(top=top, left=left, width=width, height=height, name=id) + _id = int(box.results[0].id) + bbox = BoundingBox(top=top, left=left, width=width, height=height, name=_id) bboxes.data.append(bbox) return bboxes