Skip to content

NameError: name 'detections' is not defined #12

@xiaoleitongxue

Description

@xiaoleitongxue

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions