[Documentation] [TitleIndex] [WordIndex

This page collects experience and advice on using integrated development environments (IDEs) with ROS. Please contribute.


On ROS Answers there is a thread about Which IDE(s) do ROS developers use? that might have further hints not yet entered here.

Reusing your shell's environment

For building and running ROS programs from inside IDEs, the ROS enviroment has to be set up. All IDEs might have a config for that, but running your IDE from your ROS-sourced shell should be the easiest way, avoiding inconsistency.

Likewise, you can enhance your IDE's launcher icon to load your shells environment. E.g., replace its command eclipse with bash -i -c "eclipse". This will make bash source ~/.bashrc, in which ROS has to be sourced and parameterized, and start that IDE . For convenience, you can also launch it by default like this by changing the Exec= line in your eclipse.desktop launcher (which you need to create manually if you install Eclipse from the Eclipse website directly).


When Anaconda installs, it will create a path in your .bashrc file. (press ctrl + h in home directory to view file)


# added by Anaconda x.x.x installer
export PATH="/home/"user"/"anaconda version"/bin:$PATH"

Having an active Anaconda path in your .bashrc will cause errors when you try to use ROS.

The solution to the problem is to comment out the path:

#export PATH="/home/"user"/"anaconda version"/bin:$PATH"

In order to use Anaconda, simply paste in the Anaconda path when you start a new terminal; and hit enter. Then use as normal. This will allow you to use ROS and Anaconda on the same system.


Eclipse's built in C++ indexing capabilities have gotten quite good in recent versions.

Installing Eclipse

To use this tutorial, users should not "sudo apt-get install eclipse". Instead:

Creating the Eclipse project files

For a rosbuild package

CMake can produce Eclipse project files automatically. These project files then set up all include paths correctly, so that auto completion and code browsing will work out of the box.

However, currently, a small hack is required for generating these project files in the right folder. The problem is that ROS creates the Makefiles and all other build artifacts in the build/ folder, but Eclipse expects the source files to be located within (or below) the folder where its project files are stored.

Fortunately, there is now a make target using a small script that circumvents this problem, by forcing CMake to create the project files in the directory of your package (and not the build/ folder). Proceed as follows:

Open a terminal, roscd into the folder of your package, and execute:

make eclipse-project

You will now find two Eclipse files in your package. It is not recommended to add them to the repository, as they contain absolute links and will be different for different users checking out your software.

Note that if you change anything to your manifest.xml, you will have to run this script again, which will overwrite your Eclipse project file and thereby reverting all manual changes to the project settings.

Note: Simply running the cmake Eclipse generator like

cmake -G"Eclipse CDT4 - Unix Makefiles"

will overwrite the Makefile. This can also happen if make eclipse-project does not complete successfully. If you already did this, you will want to restore the original Makefile, which should contain the following line:

include $(shell rospack find mk)/cmake.mk

Creating eclipse files for multiple packages/stacks

Go to the directory where your packages reside (which may be a stack-folder or just a simple folder) and run:

rosmake --target=eclipse-project --specified-only *

If you need to convert deeper nested packages or multiple stacks at once be encouraged to use this eclipse projects bash script for subdirectories.

Catkin-y approach

If you are using catkin, you do not have the possibility to use make eclipse-project. You need to execute:

catkin_make --force-cmake -G"Eclipse CDT4 - Unix Makefiles"

to generate the .project file and then run:

awk -f $(rospack find mk)/eclipse.awk build/.project > build/.project_with_env && mv build/.project_with_env build/.project

to pass the current shell environment into the make process in Eclipse.

After executing this command you will find the project files in the build/ folder. Now you can import your project as existing project into workspace.

Maybe you will need to execute the following if you would like to debug your program. To execute this command cd to the build/ folder. You should do so if you e.g. get an error like "No source available for main()".

cmake ../src -DCMAKE_BUILD_TYPE=Debug

For information on the proper approach using catkin, start here

Catkin and Python

For me, the above procedure didn't generate a .pydevproject file, like make eclipse-project ever did. Clicking Set as PyDev Project would create a config but without any Paths, so coding would be a hassle.

Workaround: From within the package you want to program run:

python $(rospack find mk)/make_pydev_project.py

Now copy the created file .pydevproject (which has all dependency package paths included) to <catkin_ws>/build and import your catkin-project into eclipse or Set it as PyDev Project if already imported.

catkin tools

With the new catkin_tools, there are few changed from the Catkin-y method described above. To generate eclipse-project you need to execute:

catkin build  --force-cmake -G"Eclipse CDT4 - Unix Makefiles"

to generate the .project files for each package and then run: the following script

cd build
for PROJECT in `find $PWD -name .project`; do
    DIR=`dirname $PROJECT`
    echo $DIR
    cd $DIR
    awk -f $(rospack find mk)/eclipse.awk .project > .project_with_env && mv .project_with_env .project
cd $ROOT

To debug use the following command and you can mention the name of the package to configure that specific project for debug instead of the entire workspace. Remember to run the script to modify .project to pass the current shell environment into the make process in Eclipse.

catkin build  --force-cmake -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug

Importing the project into Eclipse

Now start Eclipse, select File --> Import --> Existing projects into workspace, hit next, then browse for your package's directory (select root directory). Do NOT select Copy projects into workspace. Then finish.

You should now be able to browse through the code (hold down CTRL while clicking on a function/class name), get auto completion (automatically appears, or press CTRL-SPACE) et cetera.

Fixing unresolved includes

There are many possible reasons why indexing cannot resolve all includes, functions, methods, variables, etc. Often, fixing the resolving of includes solves these errors. If you have any problems, these might be fixed by:

Building the project inside Eclipse

The eclipse-project make target automatically tries to set the environment variables correctly such that building within Eclipse should work out-of-the-box. Especially if you follow Reusing your shell's environment from above.

If not, this is where you need to start looking: Right click on the project, select Properties --> C/C++ Make Project --> Environment, and check whether the following environment variables are assigned to the correct values:

The easiest way to obtain the correct values for your installation is to open a terminal, and run

echo $ROS_ROOT
echo $PATH

You should now be able to compile your package properly, for example by hitting CTRL-B (or selecting Project --> Build project in the menu).

Note: When working with multiple projects, Eclipse won't be able to determine the correct build order or when dependent projects have to be rebuilt. You have to set the project interdependencies manually for each project in your workspace (see http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_ref.htm).

Running and debugging your executables within Eclipse

As for building within Eclipse, the crucial step here is to set the required environment variables correctly in the launch configuration. As the same for building, this should work out-of-the-box, especially if you follow Reusing your shell's environment from above.

Create a new launch configuration, right click on the project, select Run --> Run configurations... --> C/C++ Application (double click or click on New). Select the correct binary on the main tab (Search project should work when your binary was already built). Then in the environment tab, add (at least)

again with the values of your installation. If you are unsure about them, open a terminal and run

echo $ROS_ROOT

Finally, if you cannot save the configuration, remove the @ character in the name of the new run configuration.

This should now allow you to run and debug your programs within Eclipse. The output directly goes into the Console of Eclipse. Note that the ROS_INFO macros use ANSI escape sequences, which are not parsed by Eclipse; therefore, the output might look similar to this one (from Writing a Publisher/Subscriber (C++)):

[ INFO] [1276011369.925053237]: I published [Hello there! This is message [0]]
[ INFO] [1276011370.125082573]: I published [Hello there! This is message [1]]
[ INFO] [1276011370.325025148]: I published [Hello there! This is message [2]]
[ INFO] [1276011370.525034947]: I published [Hello there! This is message [3]]

You could use an ANSI console plugin (e.g. http://www.mihai-nita.net/eclipse/) to get rid of the "[0m" characters in the output.

More eclipse goodies

Auto Formatting

Eclipse also has extensive formatting configuration capabilities. To add the ROS formatting profile to Eclipse, perform the following steps:

As you edit a file, Eclipse should use this new profile to format your code following the ROS conventions. To reformat an entire file, select Edit->Format.


Here's how to create a ROS package using CodeBlocks:

Here's how to use the sample code: . Create a package called wxWidgetsNodeTemplate, using the attached manifest.xml file. Also create a msg directory and a srv directory.


Support through the rosemacs package. Navigate and tab complete the ros package file system, live tracking and tab completion of topics, tracking and notifications when nodes startup/die, etc.

For helm integration a package called helm-ros is available. It's integration with helm makes it easy to find files in a fuzzy way. It is available through melpa.


The most feature-rich Vim plugin for ROS development is vim-ros. It provides :Roscd, :Rosed, and :TabRosed commands with <Tab> completion, manages your &makeprg setting (to allow building with :make), brings syntax highlighting and omni-completion for ROS filetypes (e.g. message descriptions, launch files), facilitates integration with Ultisnips and Syntastic plugins, and whatnot. The plugin is written in Python and, as such, is contribution-friendly.

Alternative support is through the rosvim plugin, from Michael Styer. Drop the file in ~/.vim/plugin.

Extended version of rosvim.vim is here (sorted and implemented <Tab> completion feature), and ctrlp.vim interface of ros.vim is here. You can install these plugins easily by using vimscript installation plugins such as https://github.com/gmarik/vundle and https://github.com/Shougo/neobundle.vim.

A useful complement to these plugins is the YouCompleteMe plugin for code completion. Thanks to a configuration file from Gaël Ecorchard (.ycm_extra_conf.py), the include paths are automatically added to the YouCompleteMe configuration for ROS packages.


The NetBeans IDE is written in Java and supports development in Java and many other programming languages. Here, C/C++ development support will be of interest.

Installing NetBeans

Although NetBeans is included in Ubuntu repositories, everything described here was tested with NetBeans 6.9.1.

$ sudo sh netbeans-6.9.1-ml-cpp-linux.sh

Getting ROS environment variables in NetBeans

NetBeans can "import" project from existing sources. It can use Makefiles, and even run configure script or CMake to generate one. But, that kind of automatic project configuration and build would overwrite stub makefile that every ROS package has. That makefile in essence runs ROS build system for a package, and that is what we want NetBeans to do.

In order to use rosmake from NetBeans, we need to set ROS environment variables in NetBeans. Since NetBeans is started with a shell script on Linux, we can include the variables in the script.

In recent ROS (where rosinstall generates setup files for multiple types of shell)

Since from recent versions rosinstall generates setup.sh, setup.bash and setup.zsh (as oposed to just setup.sh which was actually a bash script), there is no need for all the steps that are described in the next section.

The following will suffice to get ROS environment variables to NetBeans:

$ roscd
$ cd ..
$ echo ". $(pwd)/setup.sh" > ~/.netbeans/6.9/etc/netbeans.conf

We don't actually need perks specific to bash.

The exact path of netbeans.conf for the various OS can be found here: http://wiki.netbeans.org/FaqNetbeansConf

In previous ROS

If rosinstall doesn't generate setup files for multiple types of shell, you need to do the following. Since ROS shell tools are for bash, we'll convert NetBeans startup script from sh to bash. Simply edit the first line of NetBeans startup script (located at /usr/bin/netbeans if you installed from the Ubuntu package, or possibly /usr/local/netbeans-6.9.1/bin/netbeans if you installed manually) from




Further down the startup script it can be seen that the file ~/.netbeans/6.9/etc/netbeans.conf is included if it exists. We'll create that file like this

$ roscd
$ cd ..
$ echo "source $(pwd)/setup.sh" > ~/.netbeans/6.9/etc/netbeans.conf

Now, it just takes to modify NetBeans .desktop launcher (/usr/share/applications/netbeans-6.9.1.desktop). Change the line

Exec=/bin/sh "/usr/local/netbeans-6.9.1/bin/netbeans"


Exec=/bin/bash "/usr/local/netbeans-6.9.1/bin/netbeans"

And that is it. Next time you start NetBeans it will have ROS environment variables, and you'll be able to use e.g. rosmake.

Making NetBeans project

We'll try to setup project for Microstrain 3DM-GX2 IMU driver package, so note it's path:

$ roscd microstrain_3dmgx2_imu
$ pwd

You should get a NetBeans project for microstrain_3dmgx2_imu package with automatically configured Code Assistance (and almost working for all dependencies). E.g. you can see that the bullet library headers weren't parsed.

We will configure Code Assistance manually. That means entering paths to all header files the package uses and all preprocessor definitions.

To get the paths to include files for the package we will use rospack. Further, we'll use sed to format them for easier input to NetBeans.

$ rospack cflags-only-I microstrain_3dmgx2_imu | sed 's/ /:/g' -

Open the project properties. Go to Code Assistance -> C++ Compiler and paste the output of the above command to Include Directories field.

Use rospack to find the preprocessor definitions and enter them manually.

$ rospack cflags-only-other microstrain_3dmgx2_imu

Code auto formatting in NetBeans

Following file netbeans-ros-code_style.zip is prepared to enable auto formatting of C++ code in NetBeans as defined in CppStyleGuide. In order to use it, you should import it to Netbeans (Tools -> Options -> Import).

With this, example given in CppStyleGuide#Formatting will be identically formated, except of extra blank lines before function or class definitions. For a discussion see Google C++ style guide Vertical Whitespace.


As QtCreator supports opening CMake projects out of the box, it does not require a setup procedure if started from a terminal. Note that this is absolutely crucial, because otherwise the environment will not be set correctly and functionality related to rosbuild or catkin will fail when running cmake.

Note that instead of starting QtCreator from a terminal, you can use the following modification to the desktop file which normally in Ubuntu resides in /usr/share/applications if you did a system wide installation or in ~/.local/share/applications if you installed it only for your user:

$ cat qtcreator.desktop
[Desktop Entry]
Exec=bash -i -c qtcreator %F
Name=Qt Creator
GenericName=Integrated Development Environment

In Ubuntu 13.04 and later, the third line must read:


You should not try to generate this file yourself, but rather modify the file that was created when you installed QtCreator. Add bash -i -c in the Exec line and use it in your launcher. This will run your QtCreator in a shell which should source all required setup.bash files of your ros installation and workspace. More about desktop files and their locations for Ubuntu can be found here. Note also that the same trick can be used with eclipse.

If you are experiencing issues with the qtcreator package shipped by Ubuntu (or want to use a more up to date version of QtCreator) when opening the CMakeLists, then try installing QtCreator from Nokia's installer.


To open a rosbuild ROS package code as a project, use "Open File or Project" and select the CMakeLists.txt of your ROS package. Take care to select the "[package_name]/build" directory as the build directory, which is the ROS default. On the next screen click 'Run Cmake' and then Finish. This may not show all the folders such as launch and include in the project tree. If you want to choose the files manually, goto File->New File or Project->Import Project->Import Existing Project and selected to choose all files/folders included in the project.


To open a catkin code as a project, use "Open File or Project" and select the top level CMakeLists.txt of the catkin workspace (e.g. "catkin_ws/src/CMakeLists.txt"). Select the catkin build folder (e.g. "catkin_ws/build") as the build directory and 'Run CMake' (in order to enable debugging add following line into arguments edit box: -DCMAKE_BUILD_TYPE=Debug).

Recently this has started to fail with errors like "CMake Error: The source directory "/opt/ros/lunar/share/catkin/cmake" does not appear to contain CMakeLists.txt.", because the main CMakeLists is a symlink to a non-writable location. The workaround is to make a copy of toplevel.cmake instead of using a symlink:

mv CMakeLists.txt CMakeLists.txt.old
cp /opt/ros/lunar/share/catkin/cmake/toplevel.cmake CMakeLists.txt

To be able to modify all the files in the workspace add those lines in "src/CMakeLists.txt" :

#Add custom (non compiling) targets so launch scripts and python files show up in QT Creator's project view.

If you want the project to be named something else than "Project" then add a line at the top with project(!MyProjectName).

You may specify the correct catkin devel and install spaces at Projects->Build Settings by providing the following CMake arguments: -DCATKIN_DEVEL_PREFIX=../devel -DCMAKE_INSTALL_PREFIX=../install

catkin tools

With the new catkin_tools, there is no longer a top level make file for the whole workspace. Instead, open each package as an individual project in QtCreator. Make sure, that the build folder is set to ws/build/your_package instead of ws/build.

Before opening a package with QtCreator, though, make sure to build the package once with catkin build. If your build artifacts (binaries, libraries, ...) end up in the wrong directory, you built the package first with QtCreator. You can check, whether you have this problem by simple doing a rosrun of your package's node, change code, recompile with QtCreator and do a rosrun again -- if you don't see your changes in the executable's behavior, it is probably installed into the wrong directory. To resolve this issue, just clean the package (catkin clean <pkg> for linked layout, for newer catkins, remove the build/<pkg> folder) and rebuild it with catkin build.

With QtCreator of version 4 and higher, you can (and actually have to) configure your compiler etc. in a Kit. Go to Tools -- Options -- Build & Run -- Kits. In the Default kit (or create a new kit for ros)

In your workspace, execute

catkin config --cmake-args -DCMAKE_CXX_COMPILER:STRING=/usr/bin/g++ --

where you substitute /usr/bin/g++ with the compiler you actually want to use (and which is the same that you selected in the kit above). See this discussion about this issue.

You can configure some default paths in QtCreator:

Enable Clang Code Model

Install recent clang (version >= 3.6) and this plugin. See the link for how to enable it. Although this may slow down your computer it is a very valuable tool to give you compiler warnings on-line.


When running cmake in QtCreator (when you open the package), check the output for error messages -- they provide a clue on what is going wrong.

To remove cached/stored information for a project, remove the CMakeLists.txt.user (possibly with some trailing numbers) in your project and re-open the project. If that does not solve your problem, repeat (remove CMakeLists.txt.user) and additionally remove (or rather rename) the QtCreator configuration in ~/.config/QtProject and ~/.local/share/data/QtProject/qtcreator and try again.

Qt Creator Plugin for ROS

Please refer to instructions here.

PyCharm (community edition)

PyCharm is an IDE for Python. In order to run and debug ROS functionality you need to modify the desktop file for PyCharm (the same procedure as for other IDE's). In Ubuntu 16.04 (and possibly earlier versions), you can edit the launcher file in either /usr/share/applications or ~/.local/share/applications (depending on whether or not you installed PyCharm for all users). The launcher file may be called pycharm-community.desktop or jetbrains-pycharm-ce.desktop. Change the line that reads

Exec="/usr/lib/pycharm-community/bin/pycharm.sh" %f

by adding bash -i -c  at the beginning:

Exec=bash -i -c "/usr/lib/pycharm-community/bin/pycharm.sh" %f


In order to work with packages just create new project in parent folder for all your packages or in particular package. Please note that folder .idea with project files will be created. You can add it to .gitignore file in case if you are using Git and do not want to commit this file to repository. PyCharm will parse all files in the packages and allow you quick navigation, fast code completions, run and debug Python code, unitest run and debug.



Code can be run using roslaunch or rosrun command from command line. Simple Python files can be run using run context menu.


In order to debug Python node do the following changes



Unittest can be simple run using content menu on the file in the project tree or on particular method in the code. Results would be shown in UI.


Unittest can be normally debug using start debug menu.

In case of integration test (rostest)

Custom Messages/Services

Define and build your messages/services as usual. In order Pycharm to recognize them (for autocompletion, etc.):


kDevelop has excellent C++ support, GDB integration and does semantic syntax highlighting with individual colors for different variables. Such as QtCreator, kDevelop supports opening CMake projects out of the box.

kDevelop must know the ROS environment variables, therefore start kDevelop from a terminal that has sourced your catkin workspace already. Alternatively, create the following desktop file according to the remarks in the general section and mark it as exectuable:

cd ~/Desktop
touch kDevelop.desktop
# Now edit the file using the editor of your choice and insert the text from the box below
chmod +x kDevelop.desktop

[Desktop Entry]
Exec=bash -i -c "kdevelop"

Building catkin packages

In order to build your packages in your catkin workspace, you can choose between two different approaches. The particular choice depends on your utilized build system and your personal preference, whether to build the complete catkin workspace at once or to build each package separately with kDevelop.

Import catkin top-level workspace

The following steps describe how to import the complete catkin workspace into kDevelop. This approach relies on the default catkin build system in ROS.

Build individual packages with catkin_tools

This approach uses the custom catkin_tools environment for building your packages. Make sure to configure your catkin-tools workspace properly before you proceed with the kDevelop setup.

Perform the steps as mentioned in the section before, but with the following differences:

Running and debugging your executables

Configure executable:

Run executable:

Debug executable:


If something went wrong, delete the "*.kdev4" file and the ".kdev4" folder inside your source space and try to repeat the procedure.

The "Build Type" selected during project import (e.g. "Debug", "Release", "RelWithDebInfo") can be changed by right-clicking on the project -> "Open Configuration...". Select CMake in the left menu and change the CMake variable "CMAKE_BUILD_TYPE" appropriately.

Note, if a package inside the catkin workspace specifies its own "Build Type", e.g. by adding set(CMAKE_BUILD_TYPE Release) to the underlying package "CMakeLists.txt", it will be used for that package instead of the global one defined in the top-level CMake project.

You may set up a project filter since kDevelop displays a lot of files and (ros) binaries in the source tree that are not really interesting for the developer and finding individual files could be really confusing. Right click on the project and select "Open Configuration...". Choose "Project Filter" in the left menu. The cleanest solution is to first exclude all files and then include only desired file types:

  1. Click Add. Type in the pattern: "*" (just the star character) and select as "Target" only Files. Choose "Action" Exclude.

  2. Now add all files you want include into the project tree:

    Click "Add" and type in your desired file pattern. Choose "Action" Include. Suggested file patterns are: ".h" ".cpp" ".hpp ".c" ".ipp" ".c" ".txt" ".launch" ".xml" ".md" ".cmake" ".cfg" ".py" ".yaml" ".urdf" ".sdf" ".xacro"

RoboWare Studio

RoboWare Studio is an IDE based on VSCode and is specially designed for ROS (indigo/jade/kinetic). With a double-click installation, RoboWare Studio can automatically detect and load ROS environment without additional configuration. The “out-of-the-box” feature helps developers pick it up and figure it out quickly. It provides an intuitive graphical interface for developers to create ROS workspace/package, add source files, create messages/services/actions, list generated packages/nodes, etc. Meanwhile, The CMakeLists.txt file can be updated automatically. It supports release-build and debug-build. Developers can debug C++ and Python codes right from the editor, with break points, call stacks, and an interactive console. It also displays ROS packages and nodes in the interface.


Go to http://www.roboware.me/, download the latest version of RoboWare Studio and install it easily by double click the deb file or by the following commands in a terminal:

$ cd /path/to/deb/file/
$ sudo dpkg -i roboware-studio_[version]_[architecture].deb

After installation, RoboWare Studio automatically detect and load ROS environment without additional configuration.


Use the following commands to uninstall RoboWare Studio:

$ sudo apt-get remove roboware-studio


Click the Ubuntu logo in the upper-left corner of the screen to activate Dash, search for “roboware-studio” and launch. You can also start the application from terminal by executing:

$ roboware-studio

For more details of software features and usage please refer to http://www.roboware.me/.

Visual Studio Code (VSCode)

There is an open-source VSCode extension available for ROS development which you can install using he command ext install ros. The extension does not require additional configuration and will enable ROS functionality when a folder in a catkin workspace is opened. See the README for more details about the extension.

RDS: ROS Development Studio

ROS Development Studio (RDS) is an online IDE which allows you program and test any robot using only a web browser.

With RDS, you will be able to:

2018-03-17 12:17