RL exception error neither a launch file package nor launch file name

i am getting this error when i am trying to launch a github clone file
RLException: [_catch] is neither a launch file in package [catch_and] nor is [catch_and] a launch file name
The traceback for the exception was written to the log file

can anyone please help me
thankyou in advance

Hi, you can try this command on the workspace of ros project “source devel/setup.bash”, and after you try to relaunch the file

i tried that too but still getting the same error

Hello @1nh19cs242.dheerajreddy, welcome to the community!

There are a few reasons that can cause this error. One of them as @val1212.pass mentioned is that you have to build your workspace and then source it. So if you are working with ROS1 (I am assuming that you are working with ROS1, otherwise please correct me) you go inside your workspace:
cd ~/catkin_ws
And then build:
catkin_make
And then source the workspace:
source devel/setup.bash
You have to source in every new terminal that you open.

If this does not solve the problem you can check that the name of the package is correct. To do so open the file package.xml and verify what’s inside the <name> </name> tags.
Additionally you can also that the name of the executable is correct. To do so you must open the CMakeLists.txt file and verify what the line that starts with add_executable( .. ) contains (assuming the package is written in C++).

Hope this helps,

Roberto

thanks for the reply @rzegers yes there is no add executable line in that
can you help me with how to add it and make that executable
after following the above mentioned steps i got the following error
ERROR: cannot launch node of type [catch_and_catch/main.py]: Cannot locate node of type [main.py] in package [catch_and_catch]. Make sure file exists in package path and permission is set to executable (chmod +x)
so can you help me with this

Hi @1nh19cs242.dheerajreddy,

from your last answer it seems to me that your code is written in Python, not C++. If that is the case you don’t need the line add_executable( .. ) inside the CMakeLists.txt file.
In order to be able to run a Python file you normally must change the permissions — or access mode — of the file using the chmod command in a terminal.
In order to do so navigate to where the python file is located and type:
chmod +x <name_of_the_python_file>
In the command above replace with the proper name of the file.

In closing I can highly recommend taking a course on ROS basics:

When working with ROS there are a lot of tips and tricks and of course, practice, practice. I think you would highly benefit from this.

Cheers,

Roberto

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.