http://catkin-tools.readthedocs.io/en/latest/cheat_sheet.html

一.Initializing Workspaces初始化工作空间

初始化具有默认布局的工作区(src/build/devel)在当前目录中:

        catkin initcatkin init --workspace .catkin config --initmkdir src && catkin build

在不同目录中具有默认布局:

        catkin init --workspace /tmp/path/to/my_catkin_ws

显式扩展另一个工作区:

        catkin config --init --extend /opt/ros/indigo

初始化具有源空间other_src的工作空间:

        catkin config --init --source-space other_src

or a workspace with build, devel, and install space ending with the suffix _alternate:

        catkin config --init --space-suffix _alternate

二.Configuring Workspaces配置工作空间

查看当前配置:

        catkin config

设置和复位CMake选项:

        catkin config --cmake-args -DENABLE_CORBA=ON -DCORBA_IMPLEMENTATION=OMNIORBcatkin config --no-cmake-args

将安装切换到指定的安装空间:

        catkin config --install

三.Building Packages编译包

[1]Build all the packages:

        catkin build

...one at a time, with additional debug output[一次一个,额外的调试输出]:

        catkin build -p 1

...迫使CMake重新配置每一个:

        catkin build --force-cmake

[2]Build a specific package and its dependencies:

        catkin build my_package

... or ignore its dependencies:

        catkin build my_package --no-deps

[3]Build packages包含当前的工作目录:

        catkin build --this

... but don’t rebuild its dependencies:

        catkin build --this --no-deps

[4]Build packages有额外的CMake参数:

        catkin build --cmake-args -DCMAKE_BUILD_TYPE=Debug

... and save them to be used for the next build:

        catkin build --save-config --cmake-args -DCMAKE_BUILD_TYPE=Debug

Build all packages 在给定目录中:

        catkin build $(catkin list -u /path/to/folder)

... or in the current folder:

        catkin build $(catkin list -u .)

四.Cleaning Build Products

清理 the build, devel, and install spaces (if they exist):

        catkin clean

... or just the build space:

        catkin clean --build

... or just clean a single package:

        catkin clean PKGNAME

... or just delete the build directories(生成目录) for packages which have been disabled or removed:

        catkin clean --orphans

五.Create Packages

快速创建workspace中的catkin packages:

Creates catkin workspace resources like packages:

        catkin create pkg

六.Environment Utility

It can be used to both print the current environment variables and run a command in a modified (修改的)environment.It is primarily used in the build stage command reproduction.

Run an arbitrary command in a modified environment:

catkin env [-h] [-i] [-s][NAME=VALUE [NAME=VALUE ...]] [COMMAND] [ARG [ARG ...]]

七.List Package Info

It is used to find and list information about catkin packages. By default(默认情况下), it will list the packages in the workspace containing the current working directory. It can also be used to list the packages in any other arbitrary directory.

Lists catkin packages in the workspace or other arbitray folders:
catkin list [-h] [--workspace WORKSPACE] [--profile PROFILE][--deps | --rdeps] [--depends-on [PKG [PKG ...]]][--rdepends-on [PKG [PKG ...]]] [--this] [--quiet][--unformatted]

八.Locate Directories定位路径

It can be used to locate important locations in the workspace such as the active source, build, devel, and install spaces, and package directories in the workspace.

Get the paths to various locations in a workspace:
catkin locate [-h] [--workspace WORKSPACE] [--profile PROFILE] [-e][-r] [-q] [-s | -b | -d | -i] [--shell-verbs][--examples][PACKAGE]

九.Manage Profiles

创建所有应用程序服务器运行时环境。该命令创建概要文件,即定义 Deployment Manager、定制概要文件或独立应用程序服务器的运行时环境的文件集合。

It has several sub-commands for profile management.有多个子命令用于配置文件管理

Manage config profiles for a catkin workspace:

catkin profile [-h] [--workspace WORKSPACE]{list,set,add,rename,remove} ...sub-command help:list                List the available profiles.set                 Set the active profile by name.add                 Add a new profile by name.rename              Rename a given profile.remove              Remove a profile by name.

十.Controlling Color Display控制彩色显示

Disable colors when building in a shell that doesn’t support it (like IDEs):

        catkin --no-color build

... or enable it for shells that don’t know they support it:

        catkin --force-color build

十一.Profile Cookbook

Create “Debug” and “Release” profiles and then build them in independent build and devel spaces:

catkin config --profile debug -x _debug --cmake-args -DCMAKE_BUILD_TYPE=Debug
catkin config --profile release -x _release --cmake-args -DCMAKE_BUILD_TYPE=Release
catkin build --profile debug
catkin build --profile release

快速从头开始建立一个包Quickly build a package from scratch to make sure all of its dependencies are satisfied, then clean it:
catkin config --profile my_pkg -x _my_pkg_test
catkin build --profile my_pkg my_pkg
catkin clean --profile my_pkg --all

十二.Manipulating Workspace Chaining操纵空间链接

Change from implicit to explicit chaining[从隐性到显性链接:]:

catkin clean
catkin config --extend /opt/ros/indigo

Change from explicit to implicit chaining:

catkin clean
catkin config --no-extend

十三.Building With Other Job Servers

Build with distcc:

CC="distcc gcc" CXX="distcc g++" catkin build -p$(distcc -j) -j$(distcc -j) --no-jobserver

 总结:

catkin init – Initialize a Workspace初始化

catkin config – Configure a Workspace配置

catkin build – Build Packages编译

catkin clean – Clean Build Products

catkin create – Create Packages

catkin env – Environment Utility

catkin list – List Package Info

catkin locate – Locate Directories

catkin profile – Manage Profiles

转载于:https://www.cnblogs.com/Jessica-jie/p/6707372.html

catkin-tools相关推荐

  1. catkin tools/make 编译小结

    一.catkin tools 安装  sudo apt-get install python-catkin-tools catkin build    -BuildPackages catkin cl ...

  2. catkin tools安装

    参考如下官网链接,按步骤做即可 https://catkin-tools.readthedocs.io/en/latest/installing.html 分四步 $ sudo sh \-c 'ech ...

  3. 【SVO2.0 安装编译】Ubuntu 20.04 + Noetic

    ways one 链接: https://pan.baidu.com/s/1ZAkeD64wjFsDHfpCm1CB1w 提取码: kxx2 (downloads and use idirectly) ...

  4. RSHELIOS速腾32线激光配置记录

    1. 使用环境: Ubuntu 18.04 ros-melodic-desktop-full 2.需要的软件包及下载方式:rslidar_sdk 和 rs_driver https://github. ...

  5. CoppeliaSim添加ROS自定义消息类型

    CoppeliaSim学习互助群:1084817794 CoppeliaSim CoppeliaSim作为具有高扩展性的仿真平台,提供了许多接口,可谓万物皆插件,只要编译生成插件即可.github提供 ...

  6. 【EHub_tx1_tx2_E100】Ubuntu18.04 + ROS_ Melodic + RS-LiDAR-16 激光雷达测试

    简介:介绍  RS-LiDAR-16 16线激光雷达 在EHub_tx1_tx2_E100载板,TX1核心模块环境(Ubuntu18.04)下测试ROS驱动,如何打开使用RVIZ 查看点云数据,本文的 ...

  7. EUFS_SIM 仿真

    用于无人驾驶FSAE车辆的ROS / Gazebo仿真软件包. 内容 安装先决条件 编译 运行 启动选项 感测器 已知的问题 1.安装先决条件 安装Ubuntu 18.04 LTS 完整安装ros-m ...

  8. ROS on Windows10 上的安装

    ROS on Windows10 上的安装 ROS,如今的melodic版可以装在win10上运行. 大格局,接地气,不再那么的高冷,使用ros的门槛又少了一道,同学们也不必再为系统而烦恼.揪心.抓狂 ...

  9. 【EHub_tx1_A200】Ubuntu18.04 + ROS-Melodic/ROS2-Elequent + 速腾 RS-Helios_16P雷达 评测

             大家好,我是虎哥,之前使用了很多单线激光雷达,这几年,3D激光雷达国产化后,逐步已经降价很多,3D激光雷达对于大环境导航,无人驾驶辅助导航,都有很多优势.经过逐步的筛选,目前对于低速 ...

  10. Ubuntu16.04安装catkin

    Ubuntu16.04安装catkin zhangman@zhangman-G3-3579:~$ sudo apt-get install git [sudo] zhangman 的密码: 正在读取软 ...

最新文章

  1. 【SLAM】卡尔曼滤波:究竟滤了谁?
  2. Linux k8s 启动 停止 查询状态 脚本
  3. Windows下用Mingw编译Boost.Regex库
  4. 搭建一个互联网公司后台服务架构及运维架构需要的技术
  5. 感应联动不是梦,穿透屏幕“闻”见花香你敢信?
  6. 百度人脸识别文档冲突,facetype应是face_type
  7. 趋势科技防毒墙—控管中心
  8. iOS中 断点下载详解
  9. Python办公系列--Python创建Excel工作簿
  10. android 手写笔,微软 Surface Duo 安卓机手写笔功能曝光:自然体验,手势操作
  11. 【REST系列】详解REST架构风格 —— 带你阅读Web发展史上的一个重要技术文献
  12. metaball公式_parametric.是什么意思
  13. 制造业回流遇上物联网浪潮,中国工厂的生与死?
  14. linux桌面无法启动,Ubuntu18.04启动后无法进入桌面修复方法(图文)
  15. 或许微软真的错了,全端 App 的时代要到来了
  16. WebSocket快速入门及基本使用
  17. 我的世界观(爱因斯坦)
  18. 实验吧——安全杂项(四)
  19. 【opencv】(9) 图像识别实战:银行卡数字识别,附python完整代码和数据集
  20. 虾扯蓝牙(一)获取蓝牙当前状态,监听蓝牙手动开关,代码开关蓝牙

热门文章

  1. GCSE英语语言考试-叙述视角
  2. 神经网络和深度学习简史
  3. java arp 攻击_网络安全基础之ARP攻击和防御
  4. 湖波荡漾、烟雾蒸腾……这些动态场景竟都是AI「脑补」出的
  5. 众昂矿业:新能源新材料产业链对萤石需求大增
  6. 存储过程与触发器作用
  7. Placeholder 传入值
  8. 实战案例|聚焦攻击面管理,腾讯安全威胁情报守护头部券商资产安全
  9. Spring循环依赖原理
  10. 硅谷狂人:我从来都不理解为什么需要睡觉