pgigioli / darknet_ros

YOLO integration with ROS for real-time object detection
50 stars 23 forks source link

Cannot subscribe to a image topic #13

Closed davidsanchezf closed 6 years ago

davidsanchezf commented 6 years ago

Good morning,

I have succesfully compiled the package on my Jetson TX2 working with CUDA 9.0 after commenting compute_20. I am succesfully subscribing to a topic called /frame, coming from a ARDrone Camera. I see the the yolo node propperly subscribed to my /topic frame, but the image never comes to the screen and unfortunately I am not able to make it work, I get the error you can see below. It seems it can't locate node [Image] in package [sensor_msgs], any idea how to fix these?

Thanks so much in advance for your help. Any comment is more than welcome,

nvidia@tegra-ubuntu:~$ roslaunch darknet_ros yolo_ros.launch ... logging to /home/nvidia/.ros/log/fceb28ac-4072-11e8-83b2-00044ba7e029/roslaunch-tegra-ubuntu-3952.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://tegra-ubuntu:33951/

SUMMARY

PARAMETERS

NODES / camara_dron (sensor_msgs/Image) yolo_ros (darknet_ros/yolo_ros)

auto-starting new master process[master]: started with pid [3962] ROS_MASTER_URI=http://tegra-ubuntu:11311

setting /run_id to fceb28ac-4072-11e8-83b2-00044ba7e029 process[rosout-1]: started with pid [3976] started core service [/rosout] ERROR: cannot launch node of type [sensor_msgs/Image]: can't locate node [Image] in package [sensor_msgs] process[yolo_ros-3]: started with pid [3993] layer filters size input output 0 conv 64 7 x 7 / 2 448 x 448 x 3 -> 224 x 224 x 64 1 max 2 x 2 / 2 224 x 224 x 64 -> 112 x 112 x 64 2 conv 192 3 x 3 / 1 112 x 112 x 64 -> 112 x 112 x 192 3 max 2 x 2 / 2 112 x 112 x 192 -> 56 x 56 x 192 4 conv 128 1 x 1 / 1 56 x 56 x 192 -> 56 x 56 x 128 5 conv 256 3 x 3 / 1 56 x 56 x 128 -> 56 x 56 x 256 6 conv 256 1 x 1 / 1 56 x 56 x 256 -> 56 x 56 x 256 7 conv 512 3 x 3 / 1 56 x 56 x 256 -> 56 x 56 x 512 8 max 2 x 2 / 2 56 x 56 x 512 -> 28 x 28 x 512 9 conv 256 1 x 1 / 1 28 x 28 x 512 -> 28 x 28 x 256 10 conv 512 3 x 3 / 1 28 x 28 x 256 -> 28 x 28 x 512 11 conv 256 1 x 1 / 1 28 x 28 x 512 -> 28 x 28 x 256 12 conv 512 3 x 3 / 1 28 x 28 x 256 -> 28 x 28 x 512 13 conv 256 1 x 1 / 1 28 x 28 x 512 -> 28 x 28 x 256 14 conv 512 3 x 3 / 1 28 x 28 x 256 -> 28 x 28 x 512 15 conv 256 1 x 1 / 1 28 x 28 x 512 -> 28 x 28 x 256 16 conv 512 3 x 3 / 1 28 x 28 x 256 -> 28 x 28 x 512 17 conv 512 1 x 1 / 1 28 x 28 x 512 -> 28 x 28 x 512 18 conv 1024 3 x 3 / 1 28 x 28 x 512 -> 28 x 28 x1024 19 max 2 x 2 / 2 28 x 28 x1024 -> 14 x 14 x1024 20 conv 512 1 x 1 / 1 14 x 14 x1024 -> 14 x 14 x 512 21 conv 1024 3 x 3 / 1 14 x 14 x 512 -> 14 x 14 x1024 22 conv 512 1 x 1 / 1 14 x 14 x1024 -> 14 x 14 x 512 23 conv 1024 3 x 3 / 1 14 x 14 x 512 -> 14 x 14 x1024 24 conv 1024 3 x 3 / 1 14 x 14 x1024 -> 14 x 14 x1024 25 conv 1024 3 x 3 / 2 14 x 14 x1024 -> 7 x 7 x1024 26 conv 1024 3 x 3 / 1 7 x 7 x1024 -> 7 x 7 x1024 27 conv 1024 3 x 3 / 1 7 x 7 x1024 -> 7 x 7 x1024 28 connected 50176 -> 4096 29 connected 4096 -> 1470 30 Detection Layer forced: Using default '0' Unused field: 'b_debug = 1' Loading weights from /home/nvidia/Documents/yolo/yolo.weights...Done! [yolo_ros-3] process has died [pid 3993, exit code -11, cmd /home/nvidia/catkin_ws/devel/lib/darknet_ros/yolo_ros __name:=yolo_ros __log:=/home/nvidia/.ros/log/fceb28ac-4072-11e8-83b2-00044ba7e029/yolo_ros-3.log]. log file: /home/nvidia/.ros/log/fceb28ac-4072-11e8-83b2-00044ba7e029/yolo_ros-3*.log

davidsanchezf commented 6 years ago

Hi again,

After modifying usb_cam.launch like this>



I get the error below, (same error for rosrun darknet_ros yolo_ros)

So the error seems to be in void cameraCallback, Could you help me with that? Thanks so much in advance

nvidia@tegra-ubuntu:~/catkin_ws$ roslaunch darknet_ros yolo_ros.launch ... logging to /home/nvidia/.ros/log/df443912-407a-11e8-adc5-00044ba7e029/roslaunch-tegra-ubuntu-6623.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://tegra-ubuntu:46060/

SUMMARY

PARAMETERS

NODES / camara_dron (darknet_ros/yolo_ros) yolo_ros (darknet_ros/yolo_ros)

auto-starting new master process[master]: started with pid [6633] ROS_MASTER_URI=http://tegra-ubuntu:11311

setting /run_id to df443912-407a-11e8-adc5-00044ba7e029 process[rosout-1]: started with pid [6646] started core service [/rosout] process[camara_dron-2]: started with pid [6663] process[yolo_ros-3]: started with pid [6664] Loading network...

layer filters size input output layer filters size input output 0 0 conv 64 7 x 7 / 2 448 x 448 x 3 -> 224 x 224 x 64 1 max 2 x 2 / 2 224 x 224 x 64 -> 112 x 112 x 64 2 conv 64 7 x 7 / 2 448 x 448 x 3 -> 224 x 224 x 64 1 max 2 x 2 / 2 224 x 224 x 64 -> 112 x 112 x 64 2 conv 192 3 x 3 / 1 112 x 112 x 64 -> 112 x 112 x 192 3 max 2 x 2 / 2 112 x 112 x 192 -> 56 x 56 x 192 4 conv 128 1 x 1 / 1 56 x 56 x 192 -> 56 x 56 x 128 5 conv 192 3 x 3 / 1 112 x 112 x 64 -> 112 x 112 x 192 3 max 2 x 2 / 2 112 x 112 x 192 -> 56 x 56 x 192 4 conv 128 1 x 1 / 1 56 x 56 x 192 -> 56 x 56 x 128 5 conv 256 3 x 3 / 1 56 x 56 x 128 -> 56 x 56 x 256 6 conv 256 1 x 1 / 1 56 x 56 x 256 -> 56 x 56 x 256 7 conv 256 3 x 3 / 1 56 x 56 x 128 -> 56 x 56 x 256 6 conv 256 1 x 1 / 1 56 x 56 x 256 -> 56 x 56 x 256 7 conv 512 3 x 3 / 1 56 x 56 x 256 -> 56 x 56 x 512 8 max 2 x 2 / 2 56 x 56 x 512 -> 28 x 28 x 512 9 conv 512 3 x 3 / 1 56 x 56 x 256 -> 56 x 56 x 512 8 conv 256 1 x 1 / 1 28 x 28 x 512 -> 28 x 28 x 256 10 max 2 x 2 / 2 56 x 56 x 512 -> 28 x 28 x 512 9 conv 256 1 x 1 / 1 28 x 28 x 512 -> 28 x 28 x 256 10 conv 512 3 x 3 / 1 28 x 28 x 256 -> 28 x 28 x 512 11 conv 256 1 x 1 / 1 28 x 28 x 512 -> 28 x 28 x 256 12 conv 512 3 x 3 / 1 28 x 28 x 256 -> 28 x 28 x 512 11 conv 256 1 x 1 / 1 28 x 28 x 512 -> 28 x 28 x 256 12 conv 512 3 x 3 / 1 28 x 28 x 256 -> 28 x 28 x 512 13 conv 256 1 x 1 / 1 28 x 28 x 512 -> 28 x 28 x 256 14 conv 512 3 x 3 / 1 28 x 28 x 256 -> 28 x 28 x 512 13 conv 256 1 x 1 / 1 28 x 28 x 512 -> 28 x 28 x 256 14 conv 512 3 x 3 / 1 28 x 28 x 256 -> 28 x 28 x 512 15 conv 256 1 x 1 / 1 28 x 28 x 512 -> 28 x 28 x 256 16 conv 512 3 x 3 / 1 28 x 28 x 256 -> 28 x 28 x 512 15 conv 256 1 x 1 / 1 28 x 28 x 512 -> 28 x 28 x 256 16 conv 512 3 x 3 / 1 28 x 28 x 256 -> 28 x 28 x 512 17 conv 512 3 x 3 / 1 28 x 28 x 256 -> 28 x 28 x 512 17 conv 512 1 x 1 / 1 28 x 28 x 512 -> 28 x 28 x 512 18 conv 512 1 x 1 / 1 28 x 28 x 512 -> 28 x 28 x 512 18 conv 1024 3 x 3 / 1 28 x 28 x 512 -> 28 x 28 x1024 19 max 2 x 2 / 2 28 x 28 x1024 -> 14 x 14 x1024 20 conv 1024 3 x 3 / 1 28 x 28 x 512 -> 28 x 28 x1024 19 max 2 x 2 / 2 28 x 28 x1024 -> 14 x 14 x1024 20 conv 512 1 x 1 / 1 14 x 14 x1024 -> 14 x 14 x 512 21 conv 512 1 x 1 / 1 14 x 14 x1024 -> 14 x 14 x 512 21 conv 1024 3 x 3 / 1 14 x 14 x 512 -> 14 x 14 x1024 22 conv 1024 3 x 3 / 1 14 x 14 x 512 -> 14 x 14 x1024 22 conv 512 1 x 1 / 1 14 x 14 x1024 -> 14 x 14 x 512 23 conv 512 1 x 1 / 1 14 x 14 x1024 -> 14 x 14 x 512 23 conv 1024 3 x 3 / 1 14 x 14 x 512 -> 14 x 14 x1024 24 conv 1024 3 x 3 / 1 14 x 14 x 512 -> 14 x 14 x1024 24 conv 1024 3 x 3 / 1 14 x 14 x1024 -> 14 x 14 x1024 25 conv 1024 3 x 3 / 1 14 x 14 x1024 -> 14 x 14 x1024 25 conv 1024 3 x 3 / 2 14 x 14 x1024 -> 7 x 7 x1024 26 conv 1024 3 x 3 / 2 14 x 14 x1024 -> 7 x 7 x1024 26 conv 1024 3 x 3 / 1 7 x 7 x1024 -> 7 x 7 x1024 27 conv 1024 3 x 3 / 1 7 x 7 x1024 -> 7 x 7 x1024 27 conv 1024 3 x 3 / 1 7 x 7 x1024 -> 7 x 7 x1024 28 conv 1024 3 x 3 / 1 7 x 7 x1024 -> 7 x 7 x1024 28 connected 50176 -> 4096 29 [yolo_ros-3] process has died [pid 6664, exit code -9, cmd /home/nvidia/catkin_ws/devel/lib/darknet_ros/yolo_ros __name:=yolo_ros __log:=/home/nvidia/.ros/log/df443912-407a-11e8-adc5-00044ba7e029/yolo_ros-3.log]. log file: /home/nvidia/.ros/log/df443912-407a-11e8-adc5-00044ba7e029/yolo_ros-3*.log connected 50176 -> 4096 29 connected 4096 -> 1470 30 Detection Layer forced: Using default '0' Unused field: 'b_debug = 1' Loading weights from /home/nvidia/Documents/yolo/yolo.weights...Done! usb image received_test1

FPS:0.0 [camara_dron-2] process has died [pid 6663, exit code -11, cmd /home/nvidia/catkin_ws/devel/lib/darknet_ros/yolo_ros __name:=camara_dron __log:=/home/nvidia/.ros/log/df443912-407a-11e8-adc5-00044ba7e029/camara_dron-2.log]. log file: /home/nvidia/.ros/log/df443912-407a-11e8-adc5-00044ba7e029/camara_dron-2*.log

davidsanchezf commented 6 years ago

I fixed it, it was related to the config file. Consider it as solved. Sorry for the inconvenience

pgigioli commented 6 years ago

Glad you were able to solve it! I was just about to start checking your issue

davidsanchezf commented 6 years ago

Fortunately it has only been a question of hours :)

Do you recommend me any method to train yolo with my own data?

Thanks so much in advance for your help! Great job!

pgigioli commented 6 years ago

Yes, you can just train normally using the original darknet and then transfer the cfg and weights file to this repo. You might have to tweak a few lines of code in order to use your own custom classes.