catkin_simple 的使用
Catkin simple 可用于规范catkin package, 并简化CMakeLists
- Dependencies are just listed once as
build-dependin thepackage.xml, not also asrun-dependetc. - 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 ...
随机推荐
- python学习之路-3 初始python数据类型以及文件操作
本篇涉及内容 set集合 函数 三元运算 文件操作 set集合 set是一个无序的且不重复的元素集合 1.创建set集合的方法 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ...
- Uninstall or Disable Java on a Mac
You can run Java apps in two ways. The first is to run Java applets inside your Web browser with a p ...
- jdbc和数据库的应用
jdbc是Java Data Base Connectivity(java数据库连接): 是一种用于执行SQL语句的Java API,可以为多种关系数据库提供统一访问,它由一组用Java语言编写的类和 ...
- Pure Css 菜单的使用
本人新手,之前偶尔接触Bootstrap,也做过一些响应式开发,但是都是略显皮毛,公司的业务需求也限制了深入学习. 现着手Pure Css学习,尝试了简单的左边菜单自动隐藏的demo.闲话少说,代码贴 ...
- Linux正則表達式-反复出现的字符
星号(*)元字符表示它前面的正則表達式能够出现零次或多次.也就是说,假设它改动了单个字符.那么该字符能够在那里也能够不在那里,而且假设它在那里,那可能会不止出现一个.能够使用星号元字符匹配出如今引號中 ...
- [Cycle.js] Hello World in Cycle.js
Now you should have a good idea what Cycle.run does, and what the DOM Driver is. In this lesson, we ...
- android——ImageLoader添加缓存
//给图片加入到缓存中. DisplayImageOptions options = new DisplayImageOptions.Builder().cacheOnDisc( ...
- css-文本及其他
<!DOCTYPE html>css7-文本和其他 text-align行内元素对齐方式,值为 左/中/右 对齐:left/right/center.test{text-align:cen ...
- overflow:hidden
原来以为overflow:hidden能隐藏所有溢出的子元素,但今天发现我错了. 对于overflow:hidden的最大误解时:当一个具有高度和宽度中至少一项的容器应用了overflow:hidde ...
- C# WinFrom 导入Excel文件,显示进度条
因为WINForm程序是在64位上运行如果使用另外一种快速的读取Excel的方法会报“未在本地计算机上注册“Microsoft.Jet.OLEDB.12.0”提供程序” 所以我就换了现在这种读取有点慢 ...