Checklist
Description
Add a new autoware_ament_auto_package() CMake macro to autoware_cmake that maintains Autoware's include structure (autoware/<module>/) across ROS 2 Humble, Jazzy, and Kilted+, eliminating deprecation warnings while preserving compatibility with Autoware's naming conventions.
Purpose
Starting with ROS 2 Kilted, ament_auto_package() will change its default behavior to install headers to include/${PROJECT_NAME}/ instead of include/. This creates a conflict with Autoware's naming convention:
- Autoware package names:
autoware_<module> (e.g., autoware_interpolation)
- Autoware include paths:
autoware/<module>/ (e.g., #include "autoware/interpolation/...")
With the new ROS 2 Kilted behavior, headers would be installed to:
include/autoware_interpolation/autoware/interpolation/ ❌ (incorrect duplication)
Instead of the intended:
include/autoware/interpolation/ ✅ (correct Autoware structure)
Currently, packages using ament_auto_package() with include directories generate deprecation warnings:
CMake Warning at /opt/ros/humble/share/ament_cmake_auto/cmake/ament_auto_package.cmake:41 (message):
Package 'autoware_interpolation' installs the include directory
'include' but it is not under 'include/autoware_interpolation'.
The purpose of this task is to provide a centralized solution in autoware_cmake that:
- Eliminates these warnings across all Autoware packages
- Ensures future compatibility with ROS 2 Kilted
- Maintains Autoware's established include structure conventions
- Enables gradual adoption across Autoware projects
Possible approaches
Approach A: Add autoware_ament_auto_package() macro to autoware_cmake (Recommended)
Implementation: Create a new autoware_ament_auto_package() macro that replicates ament_auto_package() functionality while explicitly installing headers to include/ destination.
Advantages:
- Centralized solution available to all Autoware packages
- Drop-in replacement for
ament_auto_package()
- Gradual adoption possible (warnings don't break builds in Humble)
- Future-proof for ROS 2 Kilted
Code location: autoware_cmake/cmake/autoware_ament_auto_package.cmake
Usage example:
find_package(autoware_cmake REQUIRED)
autoware_package()
# ... library/executable definitions ...
autoware_ament_auto_package() # Instead of ament_auto_package()
Approach B: Use USE_SCOPED_HEADER_INSTALL_DIR flag
Implementation: Add USE_SCOPED_HEADER_INSTALL_DIR flag to autoware_package() and continue using ament_auto_package().
Disadvantages:
- Would create
include/autoware_interpolation/ structure, breaking #include "autoware/interpolation/..." includes
- Requires changing all include statements across the codebase
- Breaks Autoware's established naming convention
Not recommended.
Definition of done
Checklist
Description
Add a new
autoware_ament_auto_package()CMake macro to autoware_cmake that maintains Autoware's include structure (autoware/<module>/) across ROS 2 Humble, Jazzy, and Kilted+, eliminating deprecation warnings while preserving compatibility with Autoware's naming conventions.Purpose
Starting with ROS 2 Kilted,
ament_auto_package()will change its default behavior to install headers toinclude/${PROJECT_NAME}/instead ofinclude/. This creates a conflict with Autoware's naming convention:autoware_<module>(e.g.,autoware_interpolation)autoware/<module>/(e.g.,#include "autoware/interpolation/...")With the new ROS 2 Kilted behavior, headers would be installed to:
Instead of the intended:
Currently, packages using
ament_auto_package()with include directories generate deprecation warnings:The purpose of this task is to provide a centralized solution in autoware_cmake that:
Possible approaches
Approach A: Add autoware_ament_auto_package() macro to autoware_cmake (Recommended)
Implementation: Create a new
autoware_ament_auto_package()macro that replicatesament_auto_package()functionality while explicitly installing headers toinclude/destination.Advantages:
ament_auto_package()Code location:
autoware_cmake/cmake/autoware_ament_auto_package.cmakeUsage example:
Approach B: Use USE_SCOPED_HEADER_INSTALL_DIR flag
Implementation: Add
USE_SCOPED_HEADER_INSTALL_DIRflag toautoware_package()and continue usingament_auto_package().Disadvantages:
include/autoware_interpolation/structure, breaking#include "autoware/interpolation/..."includesNot recommended.
Definition of done
autoware_ament_auto_package()macro added to autoware_cmakeament_auto_package()functionality:include/(maintaining Autoware structure)INSTALL_TO_PATHandINSTALL_TO_SHAREparametersament_auto_package()toautoware_ament_auto_package()