roslaunch command producing RLException
I accidently delete ROS from my Ubuntu 18. After reinstalling, Im trying to use roslaunch command and execute a .launch file from a known package - which worked perfectley untill i reinstalled ROS. Can anyone please point out something that might be a problem, or a solution?
user@User:~/catkin_ws$ roslaunch pkg_name launch_name.launch
RLException: [launch_name.launch] is neither a launch file in package [pkg_name] nor is [pkg_name] a launch file name
The traceback for the exception was written to the log file
Asked by oferbar on 2021-12-22 12:41:44 UTC
Answers
A bit more detail is needed to understand but I'd just guess the package pkg_name
is not in ROS_PACKAGE_PATH
so that roslaunch
is unable to reference to the package.
Sourcing setup.*sh
in your workspace would resolve.
This thread may be the duplicate of #q143496
Asked by 130s on 2021-12-22 12:49:06 UTC
Comments
Thank you, that was the problem indeed.
Asked by oferbar on 2021-12-22 13:29:59 UTC
Okay so the problem was indeed ROS_PACKAGE_PATH. This is probably one of the most basic actions to perform, still thouogh, wasted a lot of time on it, so it might help others:
after creating your catkin_ws, Open the terminal and type:
gedit .bashrc
In the text file that opens, add these rows:
source /opt/ros/distro/setup.bash
source /home/user/catkin_ws/devel/setup.bash
Change distro and user as it suites you. save and exit.
Asked by oferbar on 2021-12-22 13:28:57 UTC
Comments