[ERROR] [1645192563.522846]: bad callback: <bound method detectManager.imageCb of <main.detectManager object at 0x7f065f7710>>
Traceback (most recent call last):
File "/workspace/pytorch_yolov5_catkin_ws/devel/lib/python3/dist-packages/ros_pytorch_yolov5/msg/_BoundingBoxes.py", line 165, in serialize
buff.write(_get_struct_d4q().pack(_x.probability, _x.xmin, _x.ymin, _x.xmax, _x.ymax))
TypeError: only integer tensors of a single element can be converted to an index
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 882, in publish
self.impl.publish(data)
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 1066, in publish
serialize_message(b, self.seq, message)
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/msg.py", line 152, in serialize_message
msg.serialize(b)
File "/workspace/pytorch_yolov5_catkin_ws/devel/lib/python3/dist-packages/ros_pytorch_yolov5/msg/_BoundingBoxes.py", line 167, in serialize
except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))
File "/opt/ros/noetic/lib/python3/dist-packages/genpy/message.py", line 393, in _check_types
check_type(n, t, getattr(self, n))
File "/opt/ros/noetic/lib/python3/dist-packages/genpy/message.py", line 314, in check_type
check_type(field_name + '[]', base_type, v)
File "/opt/ros/noetic/lib/python3/dist-packages/genpy/message.py", line 324, in check_type
check_type('%s.%s' % (field_name, n), t, getattr(field_val, n))
File "/opt/ros/noetic/lib/python3/dist-packages/genpy/message.py", line 273, in check_type
raise SerializationError('field %s must be float type' % field_name)
genpy.message.SerializationError: field bounding_boxes[].probability must be float type
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 750, in invoke_callback
cb(msg)
File "/workspace/pytorch_yolov5_catkin_ws/src/ros_pytorch_yolov5/yolov5/detect.py", line 120, in imageCb
detections = self.detect(self.cv_image, data)
File "/workspace/pytorch_yolov5_catkin_ws/src/ros_pytorch_yolov5/yolov5/detect.py", line 365, in detect
self.pub.publish(detection_results)
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 886, in publish
raise ROSSerializationException(str(e))
rospy.exceptions.ROSSerializationException: field bounding_boxes[].probability must be float type