ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
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!
2 | No.2 Revision |
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/
.