• ROS笔记2 构建一个package


    构建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)
    

    > 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目录下所有的包.

    catkin_make要运行在workspace的根目录下.

    正常输出应该是这样,可能因为之前编译过了.这些输出其实就是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"
    ####
  • 相关阅读:
    swift MD5 加密方法
    swift 官方获取JSON 数据方法
    LOAD和PigStorage的一些测试例子 (转)
    pig的各种运行模式与运行方式详解
    Hadoop Mapreduce分区、分组、二次排序过程详解[转]
    hdfs 名称节点和数据节点
    MapReduce中的分区方法Partitioner
    hadoop中map和reduce的数量设置问题
    MapReduce工作原理图文详解
    GET请求的请求参数最大长度
  • 原文地址:https://www.cnblogs.com/sdu20112013/p/10532700.html
Copyright © 2020-2023  润新知