Pycharm + ROS

Problem:
Sometimes Pycharm is not able to import rospy (“No module named rospy“). There are different ways to fix this, but I’m going for the quicker and less technical one.

In Pycharm, open file/settings. Go to the interpreter of the project you are working onto and look in the Project interpreter dropdown menu.

  • Select “Show All”

On the new window look for the last button (“Show paths for the selected interpreter”)

  • Select “Add” (plus sign or Alt+Ins)
  • Enter your ROS packages directory (/opt/ros/kinetic/lib/python2.7/dist-packages)

Apply and wait for Pycharm to load the new packages. Easy as it seems.

Screenshot from 2017-07-30 18-53-35

 

 

One thought on “Pycharm + ROS

Rispondi

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo di WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione /  Modifica )

Google photo

Stai commentando usando il tuo account Google. Chiudi sessione /  Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione /  Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione /  Modifica )

Connessione a %s...