Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated CMake config-file package for dedicated ROS interface package produces CMake error in find_package() #16

Closed
asperry opened this issue Sep 9, 2022 · 1 comment

Comments

@asperry
Copy link

asperry commented Sep 9, 2022

Context

I have a dedicated ament_cmake package for interfaces called my_robot_interfaces. I have another ament_cmake package called my_cpp_pkg that uses interfaces from my_robot_interfaces. The full packages can be found in this GitHub repository on the humble branch.

Problem

Compiling my_robot_interfaces succeeds without any stderr output. When I then attempt to compile my_cpp_pkg the build fails with the following CMake error triggered by the find_package(my_robot_interfaces REQUIRED) call:

CMake Error at /home/adam/ros2-sandbox-ws/install/my_robot_interfaces/share/my_robot_interfaces/cmake/ament_cmake_export_targets-extras.cmake:18 (message):
  Failed to find exported target names in
  '/home/adam/ros2-sandbox-ws/install/my_robot_interfaces/share/my_robot_interfaces/cmake/export_my_robot_interfaces__rosidl_generator_cExport.cmake'
Call Stack (most recent call first):
  /home/adam/ros2-sandbox-ws/install/my_robot_interfaces/share/my_robot_interfaces/cmake/my_robot_interfacesConfig.cmake:41 (include)
  CMakeLists.txt:17 (find_package)

Furthermore, upon inspection of the installed my_robot_interfaces package I find that the path to the interface headers has an extra my_robot_interfaces directory:

ros2-sandbox-ws/install/my_robot_interfaces/include/my_robot_interfaces/my_robot_interfaces/msg/
ros2-sandbox-ws/install/my_robot_interfaces/include/my_robot_interfaces/my_robot_interfaces/srv/

I believe this is not supposed to happen.

@asperry asperry changed the title Generated CMake config-file package for dedicated ROS interface package produces CMake error in find_package() Generated CMake config-file package for dedicated ROS interface package produces CMake error in find_package() Sep 9, 2022
@asperry
Copy link
Author

asperry commented Sep 9, 2022

I'm very sorry that I failed to read the active issues before creating this issue. I had intended to do so, but in my focus on producing a complete report I apparently forgot. This issue is already treated by issue #13.

@asperry asperry closed this as completed Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant