ROS - C++ Development IDE Choice

What is the best development IDE choice for ROS C++ development? I see here Eclipse IDE being recommended - http://wiki.ros.org/IDEs. However, some of the developers in our organization want to use QTCreator for ROS C++ development.

How they both compared for primarily ROS centric development works?

Please share your experience and thoughts.
Thanks.

I’ve used both Eclipse CDT and QtCreator for ROS C++ development. Both work without problems. I personally prefer QtCreator now because it feels a bit snappier.

Note that the IDEs page you’ve linked to also has instructions on how to use QtCreator with ROS. It also doesn’t specifically recommend Eclipse over QtCreator.

1 Like

At our lab most people tend to use the two mentioned by Martin (QtCreator and Eclipse CDT), but recently I’ve tried and also heard good things about CLion: https://www.jetbrains.com/clion/

The thing that I like about CLion is the clean and clever integration with CMake, and that it ‘just works’ with ROS packages without having to do special configuration (as long as you are running it from a console that has the ROS environmental variables).

2 Likes

I’ve been using Eclipse for C++ and not through CMake. Going to look at CLion mentioned by Alexis in another message since it integrates with CMake. I don’t like having to add files to the CMake system that Eclipse already knows about. The trade off hassle is finding the libraries needed for linking. But so far it’s worked well for me. I’ve avoided having to go back and retrofit my builds into CMake.

One semi snide comment is that the best IDE is the one you know.

1 Like

Yes, exactly the same is true for QtCreator. Since all Catkin packages are just plain CMake projects (catkin is just a set of CMake macros), it all just works without any extra steps required when the ROS environment variables are set.

1 Like

+1 for Clion. For me much better than eclipse/qtcreator in terms of debugging and responsivness. Downside: license fee.

2 Likes

QtCreator is a good choice. But I don’t think that is the best one.
I kind of like Clion…but it takes ages to open. I tend to close the IDE by mistake once in a while and is fully annoying to wait until it opens again. Also I have the feeling that drains your computer resources…Sometimes is only open it and start hearing the fun of the computer spinning. And of course, you have to pay for it.
RoboWare had a nice idea behind, but I cannot edit .launch or .xml as freely as it should. Feels like that it requires time to grow up.
Right now I am playing with Visual Studio…I am happier. Free, fast to open, smooth…I am using it since only 3 weeks but I feel that it deserves at least a try.

1 Like

I started using KDevelop recently and I am surprised how good it is. You should give it a try, supports CMake projects as well.

2 Likes

“best IDE is the one you know” - Good point. Thanks.

Martin - thanks for pointing that out.

My 2 cents:

I used to use Eclipse, which works fine, but in recent years I’ve started to like QtCreator better. In particular the CMake integration is getting some love with recent releases (see http://blog.qt.io/blog/2017/05/24/qt-creator-4-3-0-released/ and http://blog.qt.io/blog/2016/11/15/cmake-support-in-qt-creator-and-elsewhere/). Make sure you get a recent version from the qt website, instead of the often very old version that comes packaged with your OS.

I found that QtCreator’s build-in cmake integration works great with ROS projects (both catkin_make and catkin tools), but make sure you check out the ROS IDS’s wiki linked above for how to set things up.

Also, there is a plugin for QtCreator that gives you even better ROS workspace integration. It has been available for catkin_make-based development for quite a while, but it is under active development and catkin_tools support has recently been added (see https://github.com/ros-industrial/ros_qtc_plugin/wiki and https://github.com/ros-industrial/ros_qtc_plugin/issues/28#issuecomment-272768474).

1 Like

Thansk NikolausDemmel - very good information.

I haven’t had a great solution for a while, but I do use Eclipse w/ ‘eclipsify’ to help get a lot of the references working (still build with catkin tools though).

For anyone using Eclipse (who hasn’t already battled to set it up), I highly recommend ‘eclipsify’ from ethz-asl, to give you a jump-start in creating configured Eclipse projects for your catkin pkgs:

I just checkout eclipsify (and their other dependency catkin_simple) into my ws, build, and run the tool over a catkin list of the projects I have checked out, and it will generate eclipse projects for you to Import, which start with some good settings they have discovered. You probably want to make a separate ‘/projects/’ dir to output the projects into, rather than the default ‘/devel/’, so a clean doesn’t blow away your projects.

I still tweak it a bit, but it resolves a lot of the dependencies, which I find one of the most useful IDE features for me personally: I make sure to setup ‘Share settings/resources between projects’, make sure the C++11 flag is set, and include the /opt/ros/ include+lib dirs for my main projects, to help the resolution along.

2 Likes

Are you using Visual Studio on Windows or Visual Studio Code (https://code.visualstudio.com/) on a Linux machine? I tried Visual Studio Code a while back (6 months ago?) and was unimpressed, but maybe it’s improved since then.

On a Linux machine. Works perfectly with my ros workspaces, and you can activate a console where you can perform your catkin_make and compile directly. As I said, still trying, but I am happy right now.

If anyone is interested, I built a tuto on how to use Kdevelop + catkin : http://rtt-lwr.readthedocs.io/en/latest/tutos/kdev-tuto.html

This IDE is the best I’ve experience so far, alongside with atom for the crazy multi cursor support.

2 Likes

I also use Eclipse in combination with catkin tools (http://catkin-tools.readthedocs.io/en/latest/installing.html), the config is set to create eclipse projects:
catkin config --cmake-args -G"Eclipse CDT4 - Unix Makefiles" -D_ECLIPSE_VERSION=4.6 -DCMAKE_BUILD_TYPE=Debug

This then creates a single project from each ROS package in the build folder of the workspace. In Eclipse you just need to import those you want to have in your workspace.

For me this is the best and easiest way to use Eclipse with ROS I discovered so far.

Using the normal catkin_make with the arguments above, you will always import all the packages in the workspace as one huge Eclipse project, which is not so nice in my opinion.

Nice, you might want to link the tutorial from the ROS wiki IDE’s page.

Just a small nitpick:

Cliking on build is equivalent to calling :

cd /path/to/catkin_ws
catkin build my_super_project

I would assume that this is not correct, since catkin build my_super_project also builds dependent projects. Maybe it is similar to running catkin build my_super_project --no-deps.

Wasn’t aware of eclipsify yet, nice! Could you maybe add this reference to the Eclipse section of the IDEs page in the ROS wiki.

If you try CLion as mentioned above (at least with a good workstation) it’s hard to go back to your previous IDE. It worths the money if you have enough RAM on your PC.

If you are skeptical, just try it’s debugging and refactoring features.