I’m having troubles importing my custom interfaces inside my cpp files using #include.
The thing is what I ask to import isn’t found by VsCode so I get errors.
I built my “services_quiz_srv” package as in the examples and I get the good prompt from “ros2 interface show services_quiz_srv/srv/Spin” but still can’t import it with :
So, upon compilation, that is, when you do colcon build ..., the packages get compiled as executables into the ros2_ws/install directory. So during runtime, the executable file knows where to look exactly.
You do not have to worry if the autocomplete does not work for custom interface imports.
I hope this clarifies your doubts. By the way, this is how ROS2 is designed to work. So if you need more info as to why it is designed this way, then you must refer the documentation pages.
[This is my understanding so far, I may not be exactly correct.]