博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ROS笔记2 构建一个package
阅读量:5293 次
发布时间:2019-06-14

本文共 2598 字,大约阅读时间需要 8 分钟。

构建package

catkin_make 可以理解为一个集成了CMake和make的命令行工具

通常的cmake构建如下

# In a CMake project$ mkdir build$ cd build$ cmake ..$ make$ make install  # (optionally)

catkin_make使用如下

# In a catkin workspace$ catkin_make --source my_src$ catkin_make install --source my_src  # (optionally)

583030-20190314184348658-624826136.png

> The build folder is the default location of the build space and is where cmake and make are called to configure and build your packages. The devel folder is the default location of the devel space, which is where your executables and libraries go before you install your packages.build编译目录,devel是可执行程序和库文件目录.# In a catkin workspace$ catkin_make$ catkin_make install  # (optionally)

这个命令将编译src目录下所有的包.

583030-20190314184619085-1837672710.png
catkin_make要运行在workspace的根目录下.

583030-20190314184739193-710917686.png

正常输出应该是这样,可能因为之前编译过了.这些输出其实就是cmake和make的输出.

```
Base path: /home/user/catkin_ws
Source space: /home/user/catkin_ws/src
Build space: /home/user/catkin_ws/build
Devel space: /home/user/catkin_ws/devel
Install space: /home/user/catkin_ws/install

Running command: "cmake /home/user/catkin_ws/src

-DCATKIN_DEVEL_PREFIX=/home/user/catkin_ws/devel

-DCMAKE_INSTALL_PREFIX=/home/user/catkin_ws/install" in "/home/user/catkin_ws/build"

-- The C compiler identification is GNU 4.2.1

-- The CXX compiler identification is Clang 4.0.0
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Using CATKIN_DEVEL_PREFIX: /tmp/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/kinetic
-- This workspace overlays: /opt/ros/kinetic
-- Found PythonInterp: /usr/bin/python (found version "2.7.1")
-- Found PY_em: /usr/lib/python2.7/dist-packages/em.pyc
-- Found gtest: gtests will be built
-- catkin 0.5.51
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing packages in topological order:
-- ~~ - beginner_tutorials
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ add_subdirectory(beginner_tutorials)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/catkin_ws/build

Running command: "make -j4" in "/home/user/catkin_ws/build"

转载于:https://www.cnblogs.com/sdu20112013/p/10532700.html

你可能感兴趣的文章
线性表可用顺序表或链表存储的优缺点
查看>>
在现有的mysql主从基础上,搭建mycat实现数据的读写分离
查看>>
[Flex] flex手机项目如何限制横竖屏?只允许横屏?
查看>>
tensorflow的graph和session
查看>>
6-1 并行程序模拟 uva210
查看>>
JavaScript动画打开半透明提示层
查看>>
Mybatis生成resulteMap时的注意事项
查看>>
jquery-jqzoom 插件 用例
查看>>
1007. Maximum Subsequence Sum (25)
查看>>
《算法》C++代码 快速排序
查看>>
iframe的父子层跨域 用了百度的postMessage()方法
查看>>
Js apply方法与call方法详解 附ES6新写法
查看>>
linux php全能环境一键安装,小白福利!
查看>>
图片生成缩略图
查看>>
关于Mysql select语句中拼接字符串的记录
查看>>
动态规划 例子与复杂度
查看>>
[BZOJ4567][SCOI2016]背单词(Trie+贪心)
查看>>
查看oracle数据库的连接数以及用户
查看>>
【数据结构】栈结构操作示例
查看>>
中建项目环境迁移说明
查看>>