This is an error report.
Screenshot of the error
Error details
Hello. Even if I followed all necessary steps, I got an error which says Ros2 can not find the launch file
This is an error report.
Screenshot of the error
Error details
Hello. Even if I followed all necessary steps, I got an error which says Ros2 can not find the launch file
Hi @koray
Have you run the colcon build
successfully in the ros2_ws?
Your CMakeList.txt file should have these lines to execute and launch file, for example:
# Install the executable
install(TARGETS
cartesian_path
DESTINATION lib/${PROJECT_NAME}
)
# Install the launch file
install(DIRECTORY
launch
DESTINATION share/${PROJECT_NAME}
)
Please give me more information about this, so I can help you take a look.
Best regard,
Eric
@skynguyen1402 I believe OP is working in a Python package so there is no CMakeList.txt
.
@koray I agree this issue seems like it could be due to not running colcon build
successfully, or not including the path
(os.path.join('share', package_name), glob('launch/*.launch.py'))
in the data_files
list in the setup.py
file.
Kind Regards,
Ernest
Thank you very much. That was the problem.
@koray I’m glad we were able to help and welcome to the community. (For future reference, you can select an answer as the solution so people who face the same issue can look back at your posts to see what worked!)
Kind Regards,
A fellow learner
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.