栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

ROS2 设计文档阅读- 编译系统 Ament

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

ROS2 设计文档阅读- 编译系统 Ament

参考:The build system "ament_cmake" and the meta build tool "ament_tools"

2018-06 里面的cmakelists例子有点过时了

原因:

ROS2 设计包含有多个模块(多个package),编译会比较复杂,

确定编译顺序,依赖关联,设置环境变量...

依赖:通用的工具Cmake 和Python setuptools

ament_tools被. Since ros2/ros2#486 ROS 2 uses colcon as the build tool.

to read:colcon - collective construction — colcon documentation

前身: ROS1: Catkin, RO2: Ament

cpp:需要有cmakelists

python: src/目录下的 setup.py

The ament tool will copy the package manifest into the install location. It will also extend the environment variables PYTHONPATH and PATH to include the Python modules and executables provided by the package.

通过 ~/.bashrc查看

Depending on where the packages are being installed it might be necessary to setup the environment in order to find all resources. E.g. the location of installed executables should be on the PATH, installed Python code should be on the PYTHONPATH etc.

colcon bulid后,install 目录下有一个 setup.bash, 还有local_setup.bash

source install/setup.bash

The local_setup.* files will update environment variables as specified by the package. Even when the package is built without the ament tool these setup files are being generated.

更新环境变量,这样,你运行代码时,才能找到对应的包,需要的环境变量。

目前支持: 串行编译,并行编译 在将来会支持

Ament 安装你的package:

涉及到,把文件从/src 拷贝到 安装路径(通常设置 install/下)

还有一种方式: to try:

Optional symlinked install

It is very important to maximize the efficiency of the development cycle of changing code, building, and installing it and then run it to confirm the changes. Commonly the installation steps involve copying some resources from the source space to their final destination in the install location. ament provides an option to use symbolic links instead (if the platform supports that). This enables the developer to change the resources in the source space and skipping the installation step in many situations.

For CMake packages this is achieved by optionally overriding the CMake install() function. For Python packages the development mode is used to install the package. The symlinked install is an optional feature and must be enabled explicitly by the developer using the command line option --symlink-install.

编译错误检测:可以集成:Cppcheck - A tool for static C/C++ code analysis

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/918117.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号