hb0702 / Didi_Challenge_2017_ROS

Goal of project was to detect vehicles and pedestrians using Lidar points in real time. This uses ROS nodes.
30 stars 10 forks source link

bad callback: <bound method dl_tracker.on_points_received of <__main__.dl_tracker instance at 0x7f4fa8d4a1b8>> #1

Open lykhahaha opened 6 years ago

lykhahaha commented 6 years ago

Hi hb0702, thanks for all your works. However, I have encountered some problems when running your code.

when I run :

object_tracker --car bag_player --file_path /home/jaeil/challenge/Didi-Training-Release-1/approach_1.bag

when the bag play ,the prompt will be printed on the screen:

[ERROR] [WallTime: 1516871795.964646] bad callback: <bound method dl_tracker.on_points_received of <main.dl_tracker instance at 0x7f4fa8d4a1b8>> Traceback (most recent call last): File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/topics.py", line 720, in _invoke_callback cb(msg) File "/home/exbot/auto_driving/src/Didi-Udacity-SelfDrivingCar-master/object_tracker/scripts/dl_tracker.py", line 146, in on_points_received if box != None and len(box) > 0: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

However,when I run object_tracker --ped,it works well. It don't affect "ped" detection.

Thank you again for your work and looking forward to your reply.

gyubeomim commented 6 years ago

Hello,

I got same error and fixed just change code from if box != None and len(box) > 0: to if box.all() != None and len(box) > 0: it worked for me :-)