In the correct compilation folders, you don’t have your package topics_quiz compiled. So, go to the root of your workspace and compile your package there:
cd /home/user/ros2_ws/ colcon build --packages-select topics_quiz
Summary: Compilation is ALWAYS done in the root of your workspace (/home/user/ros2_ws). Not in any other directory.
Thank you for checking this out.
I know about the need to compile in the root workspace directory, however seems this is error-prone, to me at least. Same goes for forgetting to issue a cd src before ros2 pkg create…
Anyway, I tried again after recreating a clean build and workspace structure, but it still fails.
I did the following:
Delete build/, install/ and log/ folders, both in ~/ros2_ws/ as well as in ~/ros2_ws/src/,
Remove all folders from ~/ros2_ws/src/, except the topics_quiz folder,
(I moved the folders to ~/old/),
Compile and test: source /opt/ros/galactic/setup.bash cd ~/ros2_ws/ colcon build source install/setup.bash ros2 launch topics_quiz topics_quiz.launch.py
→ All works correctly as expected.
That is really weird. It seems there’s a problem with your specific session. I will check this today and come back to you once it is solved. I will also restore your Quiz tries, so don’t worry about that.