Then, the text comes, I will introduce the 2 point environment Configuration, 1.launch file association, 2.roslib Import
- Launch file association
Pycharm does not support launch files, but we still want to write them in the IDE, for example:
By opening the filetypes inside the file/settings.
Then add the *.launch file inside the registered patterns, click OK to complete the Launch file association
Import of 2.roslib
This section describes how Pycharm is directly associated with/opt/ros/indigo/setup.bash as configured in the terminal environment BASHRC.
First open the terminal, and then enter:
[HTML]View PlainCopy
- Gedit ~/.local/share/applications/jetbrains-pycharm-ce.desktop #当前用户可用
[HTML]View PlainCopy
- Gedit/usr/share/applications/jetbrains-pycharm-ce.desktop #全部用户可用
A document will then appear with the following content:
[Plain]View PlainCopy
- [Desktop Entry]
- version=1.0
- Type=application
- Name=pycharm Community Edition
- Icon=/home/howe/downloads/pycharm-community-2017.1/bin/pycharm.png
- Exec= "/home/howe/downloads/pycharm-community-2017.1/bin/pycharm.sh"%f
- Comment=the Drive to Develop
- Categories=development;ide;
- Terminal=false
- Startupwmclass=jetbrains-pycharm-ce
If it is a blank document, then the file is opened incorrectly, enter:
[Plain]View PlainCopy
- gedit/usr/share/applications/
then tab automatically complements the following.
Then modify the exec variable in it, add Bash-i-c after ' = ', and change the following:
[Plain]View PlainCopy
- exec= Bash-i-C "/home/ubu/tools/pycharm-professional-2016.2.3/bin/pycharm.sh"%f
Save and exit. Add Bash-i-C to load the ROS environment variable in ~/.BASHRC while starting Pycharm with a shortcut . then restart Pycharm. Finished
(turn) use of Pycharm under Ubuntu for Ros development