@
目录
一、Launch CLion in the sourced environment
- 在需要调试的ROS工作空间中运行如下代码
source ./devel/setup.bash
- 启动CLion在相同的shell里面
sh /home/qian/clion-2019.1.4/bin/clion.sh
二、Open a ROS project in CLion
- Click File | Open and select
CMakeLists.txt
in thesrc
directory of your ROS workspace, then chooseOpen as Project
.
加载成功会显示如下信息
三、Set build paths to the catkin workspace
clion默认的build生成路径和终端不同,因此需要设置成同一个
go to File | Settings Ctrl+Alt+S | Build, Execution, Deployment | CMake
and change two fields:
-
In Generation path, set
workspace_folder/build
. -
In CMake options , add
-DCATKIN_DEVEL_PREFIX:PATH=workspace_folder/devel.
打赏
码字不易,如果对您有帮助,就打赏一下吧O(∩_∩)O