Skip to content

Commit

Permalink
Added box id type conversion that caused error in object det2d centernet
Browse files Browse the repository at this point in the history
  • Loading branch information
tsampazk committed Aug 18, 2022
1 parent 33dbc04 commit c7df07b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions projects/opendr_ws/src/ros_bridge/src/opendr_bridge/bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit c7df07b

Please sign in to comment.