ROS--构建系统

序言

    ROS使用catkin构建系统,可以轻松使用与ROS相关的构建、功能包管理和功能包之间的依赖关系。它实际上是一种CMake(Cross Platform Make),可以跨平台使用,使用CMakeLists.txt描述。

1、创建功能包

命令:

$ catkin_create_pkg [功能包名称][依赖功能包1][依赖功能包n]

会自动生成CMakeList.txt和package.xml文件。相关功能包可以在创建时指定,也可以创建后在package.xml中输入。功能包应包括:

include 	 → include 目录
src 		 → 源代码目录
CMakeLists.txt 	 → 构建配置文件
package.xml      → 功能包配置文件

2、修改功能包配置文件

    package.xml是ROS必要的配置文件,它包含功能包信息,包括功能包名称、作者、许可证和依赖功能包。

    打开package.xml文档,你会看到如下的信息

<?xml version="1.0"?>
<package format="2">
  <name>my_first_ros_pkg</name>
  <version>0.0.0</version>
  <description>The my_first_ros_pkg package</description>

  <!-- One maintainer tag required, multiple allowed, one person per tag -->
  <!-- Example:  -->
  <!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
  <maintainer email="gong@todo.todo">gong</maintainer>


  <!-- One license tag required, multiple allowed, one license per tag -->
  <!-- Commonly used license strings: -->
  <!--   BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
  <license>TODO</license>


  <!-- Url tags are optional, but multiple are allowed, one per tag -->
  <!-- Optional attribute type can be: website, bugtracker, or repository -->
  <!-- Example: -->
  <!-- <url type="website">http://wiki.ros.org/my_first_ros_pkg</
  • 3
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值