ROS2 Services in Python
Hello,
I have been looking everywhere for documentation on how to add .srv files to a workspace when using the Python build system for ROS2. I assume something needs to go in the setup.py (as well as the package.xml) but don't know what to add.
To be clear, I just want to define a simple service.srv for use in my custom package, and can't figure out how to import my service into my python script (seems like documentation on this is sparse...).
Thanks in advance!
It would perhaps be good to use a separate package to store your service definition. It's a best practice in any version of ROS as it makes it possible to use your service definition (and by that being able to invoke your service) wthout having to build (or even have access to) your Python package.