I’m currently working on the Unit 3 topics quiz and my launch file doesn’t seem to be working. Currently, I’ve tried removing the Build/ and Install/ paths and rebuilding them.
This is not the default setting and it should not be the default.
Let me explain why:
You add the paths to setup.py file only when you make directories like launch, config, params, etc.
By default, when you create a ROS2 package with ament_python, you do not get the package created with the above-mentioned directories.
Hence it is the programmer’s task to add these directories into setup.py file to mark those files as dependencies.
Hence, it SHOULD NOT be the default and cannot be made default.
Most packages do not come with launch directory. One of the many reasons why your code block cannot be made default.
The problem in your case was just the executable name mismatch.
What @ljiang gave you as a solution is not exactly the solution in your case.
Of course, you need to do the modifications to the setup.py file if you want to launch your program from a launch file, but if you want to use ros2 run ..., then the solution is not exactly true.
Just clearing this up so that you do not get confused.