ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Expected include directory with Humble

asked 2022-08-17 07:59:17 -0500

Hi,

When porting some packages from Foxy/Galactic to Humble I have noticed one additional level in the expected include directory, for example the one that is generated from messages:

Foxy / Galactic: <ros2_ws>/install/<pkg>/include/<pkg>/msg/headers.hpp
Humble:          <ros2_ws>/install/<pkg>/include/<pkg>/<pkg>/msg/headers.hpp

The ament_target_dependencies CMake line includes the right directory, depending on the ROS 2 distro.

However, when installing header files manually (to export some library), this is not automagic. Is is necessary to consider the ROS 2 distro to install the include directory or is there a better way? For now I can only do like:

if(Foxy or Galactic)  install(DIRECTORY include/ DESTINATION include)
else                  install(DIRECTORY include/ DESTINATION include/${PROJECT_NAME})
edit retag flag offensive close merge delete

Comments

IMO the change mentioned should be included in the migration note. Ticketed https://github.com/ros2/ros2_document...

130s gravatar image 130s  ( 2023-06-04 17:06:46 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-08-17 19:47:31 -0500

tfoote gravatar image

This was adjusted to make sure that overlays work properly. Without this change you can get headers from the wrong level of overlays.

You can find more info in this issue: https://github.com/ros2/ros2/issues/1150

edit flag offensive delete link more

Comments

1

Thanks, so to summarize if one wants to have a Foxy->Humble compatible package we have to install the include directory with a if/then condition depending on the current ROS distro as in my original post?

Olivier Kermorgant gravatar image Olivier Kermorgant  ( 2022-08-18 04:33:43 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2022-08-17 07:59:17 -0500

Seen: 427 times

Last updated: Aug 18 '22