grid_map icon indicating copy to clipboard operation
grid_map copied to clipboard

Add transitive dependenty for map_msgs

Open esteve opened this issue 10 months ago • 2 comments

Builds for downstream packages fail beacause the map_msgs package is exported as a dependency in CMakeLists.txt, but is not declared as a dependency in package.xml

This is the error we're getting:

2025-03-06T06:29:23.7624064Z CMake Error at /opt/ros/humble/share/grid_map_rviz_plugin/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package):
2025-03-06T06:29:23.7625703Z   By not providing "Findmap_msgs.cmake" in CMAKE_MODULE_PATH this project has
2025-03-06T06:29:23.7626810Z   asked CMake to find a package configuration file provided by "map_msgs",
2025-03-06T06:29:23.7627624Z   but CMake did not find one.
2025-03-06T06:29:23.7628000Z 
2025-03-06T06:29:23.7628423Z   Could not find a package configuration file provided by "map_msgs" with any
2025-03-06T06:29:23.7629229Z   of the following names:
2025-03-06T06:29:23.7629566Z
2025-03-06T06:29:23.7629777Z     map_msgsConfig.cmake
2025-03-06T06:29:23.7630272Z     map_msgs-config.cmake
2025-03-06T06:29:23.7630590Z
2025-03-06T06:29:23.7631004Z   Add the installation prefix of "map_msgs" to CMAKE_PREFIX_PATH or set
2025-03-06T06:29:23.7631977Z   "map_msgs_DIR" to a directory containing one of the above files.  If
2025-03-06T06:29:23.7633034Z   "map_msgs" provides a separate development package or SDK, be sure it has
2025-03-06T06:29:23.7633835Z   been installed.
2025-03-06T06:29:23.7634258Z Call Stack (most recent call first):
2025-03-06T06:29:23.7635240Z   /opt/ros/humble/share/grid_map_rviz_plugin/cmake/grid_map_rviz_pluginConfig.cmake:41 (include)
2025-03-06T06:29:23.7636690Z   /opt/ros/humble/share/ament_cmake_auto/cmake/ament_auto_find_build_dependencies.cmake:67 (find_package)
2025-03-06T06:29:23.7638476Z   /opt/ros/humble/share/autoware_cmake/cmake/autoware_package.cmake:49 (ament_auto_find_build_dependencies)
2025-03-06T06:29:23.7639779Z   CMakeLists.txt:5 (autoware_package)

esteve avatar Mar 12 '25 14:03 esteve

If this is also a runtime dependency, why did you only use build_export_depend?

Ryanf55 avatar May 02 '25 15:05 Ryanf55

@Ryanf55 map_msgs doesn't seem to be a runtime dependency, in fact, it's not used anywhere, so I wonder why it's declared as an export dependency here:

https://github.com/ANYbotics/grid_map/blob/c31384333408870e7a7bf685b268703b856a2770/grid_map_rviz_plugin/CMakeLists.txt#L135-L142

Might as well be removed from the ament_export_dependencies list.

esteve avatar May 08 '25 08:05 esteve

@Ryanf55 map_msgs doesn't seem to be a runtime dependency, in fact, it's not used anywhere, so I wonder why it's declared as an export dependency here:

https://github.com/ANYbotics/grid_map/blob/c31384333408870e7a7bf685b268703b856a2770/grid_map_rviz_plugin/CMakeLists.txt#L135-L142

Might as well be removed from the ament_export_dependencies list.

Can you update the PR to reflect that so I can get this in?

Ryanf55 avatar Jul 26 '25 19:07 Ryanf55

Replaced by #524

Ryanf55 avatar Jul 26 '25 21:07 Ryanf55