Whenever I compile the localization_server package and try to launch the init_robot.launch.py file , i get the error:
file ‘init_robot.launch.py’ 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 setup.py already installed the launch file as well as my executable initial_pose_pub.py
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: localization.launch.py 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:
ros2 launch localization_server init_robot.launch.py
This should solve the issue.