ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

ROS2 IDE integration?

asked 2019-06-16 10:12:52 -0500

Jaymz gravatar image

Hello, with the recent release of ROS2 dashing, I was asking myself if you can integrate ROS2 into an IDE like ROS1 and QRcreator or the ROS vscode plugin. I'm not the most experienced Ubuntu user, but I had a good run with ROS1. Is there a way of integrating ROS2? How should I debug my code instead?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
2

answered 2019-06-18 01:49:10 -0500

dofrey gravatar image

I also use CLion and had a hard time to start with it. But it works perfect like this:

  • Source your workspace
  • Start CLion form the same terminal (usually /home/username/Applications/clion-2019.1/bin/clion.sh)
  • Open CMake File as project
  • Change in File -> Settings -> Build, Execution, Deployment -> CMake:
  1. CMake options: -DCATKIN_DEVEL_PREFIX:PATH=/home/username/workspace/devel (your devel folder of the workspace)
  2. Generation path: /home/username/workspace/build (your build folder of the workspace)
edit flag offensive delete link more

Comments

It is possible to have clion create a command-line launcher for you. If you installed with the Jetbrains toolbox app, it should do that automatically and you can just use clion. If you installed standalone, it should be under tools -> create command-line launcher (or something to that effect.)

ChuiV gravatar image ChuiV  ( 2019-06-18 09:04:08 -0500 )edit

I actually never tried this. I still like to have the terminal open to launch my nodes. I found the option "create command-line launcher" but what is the effect of it and how do I create a launcher? Do you know more about this?

dofrey gravatar image dofrey  ( 2019-06-18 09:38:51 -0500 )edit

When clion creates the command-line launcher it just puts a little script in your ~/.local/bin folder, which lets you start clion from terminal with just a clion <folder_to_open>. When developing, I usually cd to the workspace root, source things that I need to, and run clion . & (open current dir as a clion project) This way I still have a terminal open that has stuff sourced that I need, and now I have clion running that has all the ros stuff in it's PATH..

ChuiV gravatar image ChuiV  ( 2019-06-18 10:22:41 -0500 )edit

It seems CLion requires a paid license beyond a 30 day evaluation period. Is there any other option with free IDEs? I did find this page on the ROS website but it looks to be quite complicated.

Tejas Kumar shastha gravatar image Tejas Kumar shastha  ( 2019-10-16 10:41:17 -0500 )edit
1

answered 2019-06-17 02:06:46 -0500

gvdhoorn gravatar image

It's not a full integration yet, but ros-industrial/ros_qtc_plugin#352 adds initial ROS 2 / colcon support to the ROS-I Qt Creator plugin.

edit flag offensive delete link more
1

answered 2019-06-17 09:41:56 -0500

ChuiV gravatar image

I've been using Clion for nearly all my ros1/2 development. The big thing is to start clion from a terminal that is sourced for your workspace. After that, I can right click on the CMakeLists.txt file for the package I need to work on, and select Load CMakeLists.txt Once that's done, I have access to all the code completion, suggestions, etc. I can build the package, run/debug, etc It works for both python and c++ nodes.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2019-06-16 10:12:52 -0500

Seen: 2,874 times

Last updated: Jun 18 '19