ros2 can't access custom python module
i have my own python module, which I'm trying to import in my ros2 project (installed via 'pip install -e my_module/setup.py'). However, I keep getting the following error: "ModuleNotFoundError: No module named 'my_module'".
I can import the module without errors when using python in the terminal, so I assume it's something about the python path or interpreter that I have to consider when working with ros.
The setup.py file of my_module looks like this:
setup(
name="my_module",
version="xx",
author="xx",
author_email="xx",
description="xx.",
long_description=long_description,
long_description_content_type="text/markdown",
url="xx",
packages=find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
],
python_requires=">=3.10",
install_requires=[
"ray<2.0",
"tensorflow==2.9",
"kornia",
"torch==1.12",
"opencv-contrib-python",
"rasterio",
"pyproj",
"numpy",
"attrs",
"loguru",
"psutil",
"numba",
"click",
"click_option_group",
"geopy",
"PyYAML",
"python-dotenv",
"msgpack",
"websockets",
"simplejpeg",
"parse",
"scipy",
],
extras_require={
"dev": [
"invoke",
"mypy",
"pylint",
"isort",
"black",
"pytest",
"pytest-cov",
],
},
entry_points={
"console_scripts": ["my_module = my_module.cli.top_level_cli:top_level_cli"],
},
)