0

I wanted to run ROS in PyCharm, but could not find that .desktop file as mentioned here in which changes should be made. Moreover, I want to use the same environment that is created for PyTorch, do not want to change the interpreter. Can someone help me out with this?

Regards.

Benyamin Jafari
  • 27,880
  • 26
  • 135
  • 150

1 Answers1

2

You could add a virtual environment with the following instructions, then you should add ROS distpackages (roslib) on it with this instruction.

  1. File > Settings (or Ctrl+Alt+s as shortcut)> Project: > Project interpreter.

  2. In the project interpreter dropdown list, you can specify ROS Python interpreter by selecting the appropriate from the list.

ROS distpackages path that you need: /opt/ros/kinetic/lib/python2.7/distpackages

Benyamin Jafari
  • 27,880
  • 26
  • 135
  • 150
  • Thanks for your reply. But by changing the interpretter I will loose my PyTorch environment which I created, Moreover I am using Python 3.6 for PyTorch and ROS is having Python 2.7, Will that be a problem? – abdur rahman Mar 20 '19 at 09:03
  • You should gather all repositories such as `rospkg`, `pytorch` and `python3` on an environment and use this path. – Benyamin Jafari Mar 20 '19 at 15:25
  • Thanks for the answer I will try that if I feel any difficulty I will get back to you. – abdur rahman Mar 22 '19 at 08:10