How can I use custom python functions in other ROS packages?
Hi everybody,
I'm quite new to python programming in ROS (mainly used roscpp before). I generated a ROS package (let's call it "useful_python_functions
") not providing any ROS node but several python functions. I wrote a python file (let's call it "utils.py
") and saved it in useful_python_functions/src/utils.py
.
Now I want to use the functions in other ROS packages. I added useful_python_functions
as a dependency to the manifest.xml
and then tried in my ROS node:
from useful_python_functions import utils
Running the node I get:
ImportError: cannot import name utils
As I saw here the src
folder of useful_python_functions
should be part of my PYTHONPATH by default.
How can I import the functions of utils.py
in a ROS node from a different ROS package?