was not found in the share directory

Whenever I compile the localization_server package and try to launch the file , i get the error:
file ‘’ was not found in the share directory of package ‘localization_server’ which is at ‘/home/simulations/ros2_sims_ws/install/localization_server/share/localization_server’

However, I made sure that my already installed the launch file as well as my executable

What is the possible issue I am facing?

Just a quick note being that my other launch file that I launched earlier in this unit: worked perfectly fine for me.

Hello @HusamArdah ,

From the error message, we can see it’s looking for the launch file in the wrong package:

It should look for it in the ros2_ws instead:

So, what I would suggest is that you restart the Shell (by clicking on the red cross icon on the top-right corner of the Shell) or use a new Shell and type:

source ~/ros2_ws/install/setup.bash
ros2 launch localization_server

This should solve the issue.

Thank you very much.