ament
ament(ROS 2 构建系统)AdvancedROS 2's package build system, with ament_cmake for C++ packages and ament_python for Python packages.
ament is the build system ROS 2 adopted, succeeding catkin from ROS 1. It specifies how a ROS 2 package declares dependencies, gets compiled, gets installed, and gets found by other packages. The two most common build types are ament_cmake (CMake-based, for C++ packages, though it can also install Python scripts) and ament_python (based on Python's setuptools, for pure-Python packages), specified via build_type in package.xml. Day to day, developers don't call ament directly; instead they use the colcon build tool to compile an entire workspace at once, and colcon invokes the matching ament process for each package based on its type. Newcomers creating a package in ROS 2 just pick ament_cmake or ament_python with ros2 pkg create.
ExampleRunning ros2 pkg create my_controller --build-type ament_python generates a Python package with a setup.py, and colcon build then compiles the whole workspace.
- Also called
- ament_cmake, ament_python
- Related
- Robot Operating System 2 · colcon · catkin · Package (ROS) · ROS Workspace · CMake
- Sources
- ROS 2 Docs: About the build system
ROS 2 Design: ament