ROS packages tend to follow a common structure. Here are some of the directories and files you may notice.
- bin/: compiled binaries
- include/package_name: C++ include headers (make sure to export in the package manifest)
- src/package_name/: Source files, especially Python source that are exported to other packages.
- scripts/: executable scripts
- CMakeLists.txt: CMake build file (see CMakeLists)
- manifest.xml: Package manifest
For C++ and Python developers, we strongly recommend that thepackage_name match namespaces/module names in your code so thatit’s easy to locate what package provides your code.
Packages that are used with the ROS communication system may also have:
- msg/: ROS message (msg) types
- srv/: ROS service (srv) types
本文详细介绍了ROS软件包的常见结构与组成部分,包括bin目录、src目录、scripts目录等,强调了命名规范的重要性,并提供了针对C++与Python开发者的关键建议。
812

被折叠的 条评论
为什么被折叠?



