leggedrobotics / darknet_ros

YOLO ROS: Real-Time Object Detection for ROS
BSD 3-Clause "New" or "Revised" License
2.23k stars 1.18k forks source link

Error in ' roslaunch darknet_ros darknet_ros.launch, ERROR: cannot launch node of type [darknet_ros/darknet_ros]: Cannot locate node of type [darknet_ros] in package [darknet_ros]. Make sure file exists in package path and permission is set to executable (chmod +x) #366

Open mf093087 opened 2 years ago

mf093087 commented 2 years ago

After I set up the environment, I run this command

roslaunch darknet_ros darknet_ros.launch

However, I met errors. image

Below is the full info of my code

mf093087@ubuntu:~/catkin_workspace$ roslaunch darknet_ros darknet_ros.launch ... logging to /home/mf093087/.ros/log/8562a1ca-57a2-11ec-8717-000c29fad970/roslaunch-ubuntu-10197.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://ubuntu:35581/

SUMMARY

PARAMETERS

NODES / darknet_ros (darknet_ros/darknet_ros)

auto-starting new master process[master]: started with pid [10207] ROS_MASTER_URI=http://localhost:11311

setting /run_id to 8562a1ca-57a2-11ec-8717-000c29fad970 process[rosout-1]: started with pid [10218] started core service [/rosout] ERROR: cannot launch node of type [darknet_ros/darknet_ros]: Cannot locate node of type [darknet_ros] in package [darknet_ros]. Make sure file exists in package path and permission is set to executable (chmod +x) ^C[rosout-1] killing on exit [master] killing on exit shutting down processing monitor... ... shutting down processing monitor complete done

Ishank-srivastava commented 2 years ago

Did you find the solution? @mf093087

Roswellii commented 2 years ago

I tried to run YOLO on ROS melodic too and I met the same problem. Does it have something to do with ROS version?

mf093087 commented 2 years ago

Yes, just try to use chmod +x +python file to give permission

AZ-Ismail commented 2 years ago

Yes, just try to use chmod +x +python file to give permission

I can't find the python file in the package. Can you post the directory?

Roswellii commented 2 years ago

Hi! I just solved this problem. I forgot to source the /devel/setup.bash again after compile the workspace. Maybe you can try to source it again?

asibarr2 commented 2 years ago

I found a solution (3/31/22).

Setup: Ubuntu 18.04 ROS Version: Melodic

So after you setup your keys, you are instructed to use the following command to build your package:

git clone --recursive git@github.com:leggedrobotics/darknet_ros.git

^^ This command will not work for ROS Melodic users. You will get as far as the "cannot launch node of type" error with this build. So how I fixed this was downloading the feature/ci-melodic-and-noetic branch. As soon as I built this version in my catkin_ws/src directory, I sourced my workspace and launched a ros command and boom, it worked. So type this command to build the package for Ubuntu 18.04:

git clone --recursive git@github.com:leggedrobotics/darknet_ros.git --branch feature/ci-melodic-and-noetic

I hope this helps! From a fellow stressed out graduate student tired of all these damn bugs on this damn platform lol

SujayNiranjan commented 2 years ago

@asibarr2 This did not solve the problem!!, the error is persistent..... I tried all the methods available on the internet but unable to solve this error, @asibarr2 if you find any other alternative ... Please do let me know

lhakim85 commented 2 years ago

@asibarr2 This did not solve the problem!!, the error is persistent..... I tried all the methods available on the internet but unable to solve this error, @asibarr2 if you find any other alternative ... Please do let me know

In my case, after catkin_make, i do rosdep install --from-paths src/ --ignore-src, and success

hello50505 commented 2 years ago

i face the same issue,have you fix it?

Roswellii commented 2 years ago

i face the same issue,have you fix it? @hello50505

Hi! My problem was simply due to I forgot to source setup.py in /dev folder of this project... I‘m not sure if we have the some problem. Could you provide more details?

SujayNiranjan commented 2 years ago

I found a solution

I created another directory and then installed the necessary libraries, later when I built the file...it worked out!!

kiranabbili commented 1 year ago

ERROR: cannot launch node of type [darknet_ros/darknet_ros]: Cannot locate node of type [darknet_ros] in package [darknet_ros]. Make sure the file exists in the package path and permission is set to executable (chmod +x).

kiranabbili commented 1 year ago

I tried many ways but I am unable to find the solution. can anyone help me.

SujayNiranjan commented 1 year ago

This issue can only be solved by creating a new directory and then deleting the previous libraries installed. now, start all over again by installing the libraries into this new directory! this is how I solved the problem

ps: make sure that you've installed the correct version of libraries compactable with your version of python. and then you will not have any trouble building it!

AbbiliKiran commented 1 year ago

@ni-r1 ,thank your reply. I just cloned the darknet_ros package and then I used this catkin_make -DCMAKE_BUILD_TYPE=Release. I have no idea about libraries. Do I need to anything else after cloning it.

yasibot8 commented 1 year ago

Hello, Can you help me how you fixed this issue?

kiranabbili commented 1 year ago

I am unable to find the solution. I don't know what is wrong.

yasibot8 commented 1 year ago

setup.py

Hello, I didn't understand what you said exactly. Please help me out.

kiranabbili commented 1 year ago

Can any one help me how to fix the error. ERROR: cannot launch node of type [darknet_ros/darknet_ros]: Cannot locate node of type [darknet_ros] in package [darknet_ros]. Make sure the file exists in the package path and permission is set to executable (chmod +x). I am using ROS-noetic. Thanks in advance.

NimishKashyap commented 1 year ago

Is this issue still active?

kiranabbili commented 1 year ago

I got the issue solved. The problem is due to failure of catkin_make due to error in some other packages. After deleting those packages, it worked.

kiranabbili commented 1 year ago

I got the issue solved. The problem is due to failure of catkin_make due to error in some other packages. After deleting those packages, it worked.

NimishKashyap commented 1 year ago

Can you elaborate on that? I'm still facing error even after creating a separate workspace

NimishKashyap commented 1 year ago

Can you elaborate on that? I'm still facing error even after creating a separate workspace

NimishKashyap commented 1 year ago

And my catkin build is working fine without any failure

ParasIntern-SwapnilMathur commented 1 year ago

@NimishKashyap Sir, How to solve this error in ubuntu 20.04?