Hey Team,
Had a query, was following the instruction to write a launch file in my newly created package. I did but I am getting the error saying- “RLException: [my_package_launch_file.launch] is neither a launch file in package [my_package] nor is [my_package] a launch file name
The traceback for the exception was written to the log file”
I did try to make my launch file executable but it does not seem to fix the issue. I remember building the workspace everytime I make changes to existing package in ROS 1 in local system, is that not needed here in the workspace here in ConstructSim?
Can someone help me with this.
For example if package name is “gmapping” and launch file name is “mapping.launch” It should be roslaunch gmapping mapping.launch. Take care that there is space between package name and launch file and also check the spelling of names of package name and launch file name.
That error usually pops up when the system can’t locate or identify the launch file you’re trying to run. It’s like searching for a file named ‘my_package_launch_file.launch’ inside a package called ‘my_package,’ but the system can’t find it.
To fix this, ensure both the package and launch file names are correct. Sometimes, a simple typo can cause this issue.
dont forget to source your workspace after compiling: source devel/setup.bash
and refresh the package list: rospack profile
This ensures ROS knows about the new packages and their locations.
By the way, It seems like there might be an issue with the naming or structure of your launch file in ROS. Make sure that your launch file is correctly placed in the launch directory within your package, and its name follows the conventions, typically ending with “.launch”. Additionally, ensure that the launch file is not only executable but also has the correct XML format.