<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # 2.5 package.xml `package.xml`也是一個catkin的package必備文件,它是這個軟件包的描述文件,在較早的ROS版本\(rosbuild編譯系統\)中,這個文件叫做`manifest.xml`,用于描述pacakge的基本信息。如果你在網上看到一些ROS項目里包含著`manifest.xml`,那么它多半是hydro版本之前的項目了。 ## 2.5.1 package.xml作用 `pacakge.xml`包含了package的名稱、版本號、內容描述、維護人員、軟件許可、編譯構建工具、編譯依賴、運行依賴等信息。 實際上`rospack find`、`rosdep`等命令之所以能快速定位和分析出package的依賴項信息,就是直接讀取了每一個pacakge中的`package.xml`文件。它為用戶提供了快速了解一個pacakge的渠道。 ## 2.5.2 package.xml寫法 `pacakge.xml`遵循xml標簽文本的寫法,由于版本更迭原因,現在有兩種格式并存(format1與format2),不過區別不大。老版本(format1)的`pacakge.xml`通常包含以下標簽: ```xml <pacakge> 根標記文件 <name> 包名 <version> 版本號 <description> 內容描述 <maintainer> 維護者 <license> 軟件許可證 <buildtool_depend> 編譯構建工具,通常為catkin <build_depend> 編譯依賴項,與Catkin中的 <run_depend> 運行依賴項 ``` 說明:其中1-6為必備標簽,1是根標簽,嵌套了其余的所有標簽,2-6為包的各種屬性,7-9為編譯相關信息。 在新版本(format2)中,包含的標簽為: ```xml <pacakge> 根標記文件 <name> 包名 <version> 版本號 <description> 內容描述 <maintainer> 維護者 <license> 軟件許可證 <buildtool_depend> 編譯構建工具,通常為catkin <depend> 指定依賴項為編譯、導出、運行需要的依賴,最常用 <build_depend> 編譯依賴項 <build_export_depend> 導出依賴項 <exec_depend> 運行依賴項 <test_depend> 測試用例依賴項 <doc_depend> 文檔依賴項 ``` 由此看見新版本的`pacakge.xml`格式上增加了<depend> 、<build_export_depend>、<exec_depend>、<doc_depend> ,相當于將之前的build和run依賴項描述進行了細分。 目前Indigo、Kinetic、Lunar等版本的ROS都同時支持兩種版本的`package.xml`,所以無論選哪種格式都可以。 ## 2.5.3 pacakge.xml例子 為了說明pacakge.xml寫法,還是以turtlesim軟件包為例,其`pacakge.xml`文件內容如下,我們添加了相關的注釋: ```xml <?xml version="1.0"?> <!--本示例為老版本的pacakge.xml--> <package> <!--pacakge為根標簽,寫在最外面--> <name>turtlesim</name> <version>0.8.1</version> <description> turtlesim is a tool made for teaching ROS and ROS packages. </description> <maintainer email="dthomas@osrfoundation.org">Dirk Thomas</maintainer> <license>BSD</license> <url type="website">http://www.ros.org/wiki/turtlesim</url> <url type="bugtracker">https://github.com/ros/ros_tutorials/issues</url> <url type="repository">https://github.com/ros/ros_tutorials</url> <author>Josh Faust</author> <!--編譯工具為catkin--> <buildtool_depend>catkin</buildtool_depend> <!--編譯時需要依賴以下包--> <build_depend>geometry_msgs</build_depend> <build_depend>qtbase5-dev</build_depend> <build_depend>message_generation</build_depend> <build_depend>qt5-qmake</build_depend> <build_depend>rosconsole</build_depend> <build_depend>roscpp</build_depend> <build_depend>roscpp_serialization</build_depend> <build_depend>roslib</build_depend> <build_depend>rostime</build_depend> <build_depend>std_msgs</build_depend> <build_depend>std_srvs</build_depend> <!--運行時需要依賴以下包--> <run_depend>geometry_msgs</run_depend> <run_depend>libqt5-core</run_depend> <run_depend>libqt5-gui</run_depend> <run_depend>message_runtime</run_depend> <run_depend>rosconsole</run_depend> <run_depend>roscpp</run_depend> <run_depend>roscpp_serialization</run_depend> <run_depend>roslib</run_depend> <run_depend>rostime</run_depend> <run_depend>std_msgs</run_depend> <run_depend>std_srvs</run_depend> </package> ``` 以上內容是老版本(format1)的寫法,如果要寫成新版本(format2)則可以改為: ```xml <?xml version="1.0"?> <package format="2"> <!--在聲明pacakge時指定format2,為新版格式--> <name>turtlesim</name> <version>0.8.1</version> <description> turtlesim is a tool made for teaching ROS and ROS packages. </description> <maintainer email="dthomas@osrfoundation.org">Dirk Thomas</maintainer> <license>BSD</license> <url type="website">http://www.ros.org/wiki/turtlesim</url> <url type="bugtracker">https://github.com/ros/ros_tutorials/issues</url> <url type="repository">https://github.com/ros/ros_tutorials</url> <author>Josh Faust</author> <!--編譯工具為catkin--> <buildtool_depend>catkin</buildtool_depend> <!--用depend來整合build_depend和run_depend--> <depend>geometry_msgs</depend> <depend>rosconsole</depend> <depend>roscpp</depend> <depend>roscpp_serialization</depend> <depend>roslib</depend> <depend>rostime</depend> <depend>std_msgs</depend> <depend>std_srvs</depend> <!--build_depend標簽未變--> <build_depend>qtbase5-dev</build_depend> <build_depend>message_generation</build_depend> <build_depend>qt5-qmake</build_depend> <!--run_depend要改為exec_depend--> <exec_depend>libqt5-core</exec_depend> <exec_depend>libqt5-gui</exec_depend> <exec_depend>message_runtime</exec_depend> </package> ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看