indra4837 / yolov4_trt_ros

YOLOv4 object detector using TensorRT engine
MIT License
104 stars 31 forks source link

[ERROR] [1636165170.171413]: bad callback: <bound method yolov4.img_callback of <__main__.yolov4 object at 0x7fa52a9910> #19

Closed XuanjieXiao closed 2 years ago

XuanjieXiao commented 3 years ago

Hello, I ran into a problem as shown below: I need your help, thank you very much

[ERROR] [1636165170.171413]: bad callback: <bound method yolov4.img_callback of <__main__.yolov4 object at 0x7fa52a9910>> Traceback (most recent call last): File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/topics.py", line 750, in _invoke_callback cb(msg) File "/home/nvidia-yolov4/yolo_ros_trt/src/yolov4_trt_ros/trt_yolo_v4.py", line 112, in img_callback self.publisher(boxes, confs, clss) File "/home/nvidia-yolov4/yolo_ros_trt/src/yolov4_trt_ros/trt_yolo_v4.py", line 138, in publisher detection2d.header.stamp = rospy.Time.now() File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/rostime.py", line 155, in now return get_rostime() File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/rostime.py", line 190, in get_rostime raise rospy.exceptions.ROSInitException("time is not initialized. Have you called init_node()?") ROSInitException: time is not initialized. Have you called init_node()?

image

indra4837 commented 2 years ago

It looks like you have cloned this repo outside of your catkin folder and didnt build it. Have you tried rebuilding the catkin folder and sourcing it?

$ cd ~/catkin_src
$ catkin_make && source devel/setup.bash