ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It seems that PyCharm Community Edition has no built-in way to add external dependencies. However, I found a workaround here.

So I created a symbolic link to the folder /opt/ros/kinetic/lib/python2.7/dist-packages/ (which contains the Python modules associated to the ROS packages installed on my computer) in the root of my ROS package:

ln -s /opt/ros/kinetic/lib/python2.7/dist-packages/ ros_kinetic_python

Then, in PyCharm, in File -> Parameters... -> Projet: <project_name> -> Project Structure, I right-clicked on ros_kinetic_python (my link) and chose Sources. Then, I clicked Apply and closed the window, and now it PyCharm finds the modules!

It seems that PyCharm Community Edition has no built-in way to add external dependencies. However, I found a workaround here.

So I created a symbolic link to the folder /opt/ros/kinetic/lib/python2.7/dist-packages/ (which contains the Python modules associated to the ROS packages installed on my computer) in the root of my ROS package:

ln -s /opt/ros/kinetic/lib/python2.7/dist-packages/ ros_kinetic_python

Then, in PyCharm, in File -> Parameters... -> Projet: <project_name> -> Project Structure, I right-clicked on ros_kinetic_python (my link) and chose Sources. Then, I clicked Apply and closed the window, and now it PyCharm finds the modules!

Note that you can do the same for the Python modules in your catkin workspace, just create a link to <you_catkin_workspace_path>/devel/lib/python2.7/dist-packages/.