sort-deepsort-yolov3-ROS icon indicating copy to clipboard operation
sort-deepsort-yolov3-ROS copied to clipboard

NameError: name 'detections' is not defined

Open xiaoleitongxue opened this issue 1 year ago • 2 comments

I got a error NameError: name 'detections' is not defined I checked the track.py line 58, The detections was defined as global variable. I did't kown what cause this issue.

[ERROR] [1662190947.981701]: bad callback: <function callback_image at 0xffff93023310>
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 750, in _invoke_callback
    cb(msg)
  File "/home/nx/portable/catkin_workspace/src/sort-deepsort-yolov3-ROS-ros-noetic/sort_track/src/track.py", line 58, in callback_image
    cv2.rectangle(cv_rgb, (int(detections[0][0]), int(detections[0][1])), (int(detections[0][2]), int(detections[0][3])), (100, 255, 50), 1)
NameError: name 'detections' is not defined

xiaoleitongxue avatar Sep 03 '22 08:09 xiaoleitongxue

maybe you can open video stream and darknet node

losingby avatar Sep 19 '22 00:09 losingby

Running into the same error @xiaoleitongxue. Were you able to figure it out?

GiovanniBenitez avatar Nov 14 '22 22:11 GiovanniBenitez