Can't find python script of different ros package in Pycharm
Hello,
I was following this guide to be able to access a python script from one ros package in another one. I am trying to execute the following script in Pycharm:
#!/usr/bin/env python
import rospy
from robot_control.moveclass import MoveClass
if __name__ == '__main__':
rospy.init_node("test")
mc = MoveClass()
mc.move_cart_rel((0.0, 0.0, -0.1, 0, 0, 0))
Executing the script works fine and pycharm is able to resolve the rospy import, but can Not resolve from robot_control.moveclass import MoveClass
.
I also followed this guide to get Pycharm running for ROS.
I really dont know, what I did wrong. This is the content of my setup.py
file:
## ! DO NOT MANUALLY INVOKE THIS setup.py, USE CATKIN INSTEAD
from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
# fetch values from package.xml
setup_args = generate_distutils_setup(
packages=['robot_control'],
package_dir={'': 'src'},
)
setup(**setup_args)
The setup.py
file is located in the catkin package robot_control
and the __init__.py
and moveclass.py
files are located relative to that catkin package in src/robot_control
.
How am I able to get Pycharm to resolve my script, which I wanna use in multiple other packages?