Ask Your Question
0

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 imageChuiV ( 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 imagedofrey ( 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 imageChuiV ( 2019-06-18 10:22:41 -0500 )edit
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
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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

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

Seen: 99 times

Last updated: Jun 18