Clion调试ROS包

1. 安装vim

   从官网下载最新版本的Clionbash

  https://www.jetbrains.com/clion/ide

  并解压到指定的目录,例如:ui

  /home/xkc/software/clion-2017.2.3idea

      默认Clion能够无偿使用30天,学生能够凭借学生证,无偿使用的话能够申请一年.spa

   受权方法:激活时选择License server,填入http://idea.irfen.me/ 点击Active便可。3d

2.环境变量配置调试

a.配置环境变量
     打开 .bashrc文件修改内容
     vim ~/.bashrc
     export PATH=/home/xkc/software/clion-2017.2.3/bin:${PATH}

    修改后退出,使修改生效
    source ~/.bashrc

b.启动
    在终端中输入clion.sh 启动

3.导入项目code

   在ros下进行断点调试server

  1. With your console, go into your ROS workspace and source the respective setup.bash file. for instance: source devel/setup.bash
  2. Go to the src directory of your workspace.
  3. Start CLion from the console from your src directory.   for instance: type the command in the terminator: clion.sh
  4. Close any open projects in CLion and select Import Project from Sources
  5. Select ONLY the src directory in your workspace for the import.
  6. If CLion complains about CMakeList.txt already existing simply click Open Project
  7. CLion will build symbols for several minutes, then you should be ready to go.

   以下图所示:

 

4.调试项目

    在软件IDE的右上角有调试的选项,以下图所示

    Clion会自动的识别可编译的库和执行程序,咱们这里选择test可执行文件,只要点击三角箭头和调试虫子,就能够进行相应的调试开发了.使用起来可谓是至关的人性化,难怪要收费了.

    Clion能够轻松的进行断点调试 ,以下图所示:

相关文章
相关标签/搜索