catkin_simple 的使用
Catkin simple 可用于规范catkin package, 并简化CMakeLists
- Dependencies are just listed once as
build-depend
in thepackage.xml
, not also asrun-depend
etc. - Dependencies 无需在 CMakeLists.txt 中列出
- Explicit linking of dependencies is not needed anymore (e.g. no
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES})
needed) - Explicit inclusion of catkin include not needed anymore (e.g. no
include_directories(${catkin_INCLUDES})
needed) - Export and installation commands are both one-liners.
工具安装:
cd $CATKIN_WS/src
git clone git@github.com:catkin/catkin_simple.git
cd $CATKIN_WS
catkin_make
示例代码:
https://github.com/simonlynen/catkin_and_catkin_simple
示例CMakelists 解释:
https://github.com/catkin/catkin_simple/blob/master/README.md
cmake_minimum_required(VERSION 2.8.)
project(foo) find_package(catkin_simple REQUIRED) catkin_simple(ALL_DEPS_REQUIRED) //调用 catkin_simple,call package.xml中的所用build_depend,并do find_package(...)操作
//当所有的package 成功找到,a list of "catkin build dependencies"出现,并传给find_package(catkin REQUIRED COMPONETS...)
//然后增加local include 和 catkin include 目录,并传给include_directories(...)
//最后发现并编译ROS messages,services and actions which in msg/src/action 文件夹,注意当且仅当package.xml中build_depend 包含message_generation才执行该操作
//同样查找并编译dynamic_reconfigure 文件in cfg文件夹,注意当且仅当build_depend 包含dynamic_reconfigure
cs_add_library(my_lib src/my_lib.cpp) //首先call directly through to add_library
//然后call target_link_libraries(my_lib ${catkin_LIBRARIES})去链接新库(注意build_depend需要包含新库)
//最后it does some bookkeeping so that your library target can be implicitly used later??? cs_add_executable(my_exec src/main.cpp)//calls CMake's add_executable(...) instead.
target_link_libraries(my_exec my_lib) //注意这句话需要写出来 there is no way to enforce order of target creation. The executable is still automatically linked against the catkin libraries cs_install() //creates an installation rule for any libraries and executables you created with cs_ prefixed commands cs_install_scripts(scripts/my_script.py) cs_export() //calls catkin_package(...) under the hood, extending that call with any libraries created and catkin_depends found automatically with catkin_simple
存在的限制:
There are several known assumptions and incorrect behaviors in catkin_simple which are a result of the trade-off of correctness for convenience. There is no warning when a catkin package is not found during find_package.
There is over linking, as all libraries of all dependencies are linked against all targets indiscriminately.
Assumes that the include folder is meant to be in the include path.
If new .msg or .srv files are added, they will not be detected until you force CMake to run again
All targets have a target dependency on any downstream message generation, which results in sub-optimal parallelization of targets, as there are unnecessary dependencies created.
catkin_simple 的使用的更多相关文章
- ROS新闻 Towards ROS-native drones 无人机支持方案
PX4/Firmware:https://github.com/PX4/Firmware PXFmini An open autopilot daughter-board for the Raspbe ...
- ROS(indigo)swarm_robot 群机器人示例Gazebo
ROS(indigo)swarm_robot 群机器人示例Gazebo 参考网址:https://github.com/yangliu28/swarm_robot_ros_sim 安装提示:catki ...
- ROS--自定义消息类型
一.msg 用于发布-订阅的通信方式中. 1.在包的src 中创建msg文件夹. 2.在msg文件夹中,创建.msg文件 3.编辑.msg文件 4.编辑package.xml , 添加依赖 <b ...
- ROS基础-基本概念和简单工具(1)
1.什么是ROS? Robot operating System ,简单说机器人操作系统,弱耦合的分布式进程框架,通过进程间的消息传递和管理.实现硬件抽象和设备控制. 2.节点(node) node ...
随机推荐
- iOS 3DES加密 和 java 3DES 解密
首先进入头文件: #import <CommonCrypto/CommonDigest.h> #import <CommonCrypto/CommonCryptor.h> #i ...
- webService 客户端接口调用【java】
最近实际项目中使用到了WebService,简单总结下使用方式: 1.拿到接口:http://*******:8080/osms/services/OrderWebService?wsdl 我们可以将 ...
- 零拷贝概念 -- linux内核
零拷贝(zero-copy) 备快速网络接口的主要技术. 零拷贝技术通过降低或消除关键通信路径影响速率的操作,降低传输数据的操作系统开销和协议处理开销,从而有效提高通信性能,实现快速传输数据. 零拷贝 ...
- Coding.net代码托管空间申请与使用-安装并运行WordPress博客
参考: http://www.freehao123.com/coding-net/ Coding.net这是一个国内新兴的代码托管平台,功能主要包括:代码托管.在线运行环境.监控代码质量,兼有一定的社 ...
- 10. 混淆矩阵、总体分类精度、Kappa系数
一.前言 表征分类精度的指标有很多,其中最常用的就是利用混淆矩阵.总体分类精度以及Kappa系数. 其中混淆矩阵能够很清楚的看到每个地物正确分类的个数以及被错分的类别和个数.但是,混淆矩阵并不能一眼就 ...
- 《JavaScript 闯关记》之事件
JavaScript 程序采用了异步事件驱动编程模型.在这种程序设计风格下,当文档.浏览器.元素或与之相关的对象发生某些有趣的事情时,Web 浏览器就会产生事件(event).例如,当 Web 浏览器 ...
- HTML与CSS入门——第一章 理解Web的工作方式
知识点: 1.万维网的简史 2."网页"的含义,以及该术语不能反映所涉及的所有内容的原因 3.如何从你的个人计算机进入别人的浏览器 4.选择Web托管提供商的方法 5.不同的Web ...
- Android应用去掉标题栏的方法
1.在代码里实现 this.requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉标题栏,this指当前的Activity 这句代码一定要加在setCon ...
- javascript 阻止事件冒泡和阻止默认事件对比
公司项目有像上图中效果的功能需求这也是很常见功能很简单功能,通过一个小例子和大家聊聊js的事件冒泡和默认事件. 先说说一般的实现方式即使用阻止事件冒泡的方式去做,给input绑定一个click事件(并 ...
- JS 混淆加密
http://www.javascriptobfuscator.com/Javascript-Obfuscator.aspx http://www.javascriptobfuscator.com/d ...