stereolabs / zed-ros2-wrapper

ROS 2 wrapper for the ZED SDK
https://www.stereolabs.com/docs/ros2/
Apache License 2.0
134 stars 139 forks source link

Failed to find exported target names [zed_interfaces] #213

Closed jprodriguezg closed 3 days ago

jprodriguezg commented 1 month ago

Preliminary Checks

Description

Hello there,

I am trying to compile the zed-ros2-wrapper inside a docker container that already has ROS2, the Zed SDK, and the additional dependencies.

I am following the instructions to install the wrapper, but I am having an issue by compiling zed_components. Each time I try to compile it (colcon build --symlink-install --cmake-args=-DCMAKE_BUILD_TYPE=Release), I get the expected result (BELOW).

The dependency issue regards to zed_interfaces.

Has someone experienced a similar issue? Any suggestion? Thanks!

Steps to Reproduce

colcon build --symlink-install --cmake-args=-DCMAKE_BUILD_TYPE=Release

Expected Result

Package built successfully

Actual Result

--- stderr: zed_components                         
* Found ROS2 foxy
* ROS2 foxy is officially supported by this package.
CMake Error at /home/user/D4A/ras/ros2/sensors_ws/install/zed_interfaces/share/zed_interfaces/cmake/ament_cmake_export_targets-extras.cmake:18 (message):
  Failed to find exported target names in
  '/home/user/D4A/ras/ros2/sensors_ws/install/zed_interfaces/share/zed_interfaces/cmake/zed_interfaces__rosidl_generator_cExport.cmake'
Call Stack (most recent call first):
  /home/user/D4A/ras/ros2/sensors_ws/install/zed_interfaces/share/zed_interfaces/cmake/zed_interfacesConfig.cmake:41 (include)
  CMakeLists.txt:111 (find_package)

make: *** [Makefile:308: cmake_check_build_system] Error 1
---
Failed   <<< zed_components [0.78s, exited with code 2]

ZED Camera model

ZED2i

Environment

ZED SDK Version 3.8.2
zed-ros2-wrapper foxy-humble-v3.8 (I also tried foxy-humble-v3.8.2. without success).
ROS Foxy

Anything else?

zed_interfaces compiles successfully. I have correctly sourced the ROS WS and checked that ROS detects the package. Besides, this is the output of rosdep install --from-paths src --ignore-src -r -y

#All required rosdeps installed successfully

Myzhar commented 1 month ago

@jprodriguezg you cannot use the master branch with ZED SDK v3.8.2. You must use this release tag: https://github.com/stereolabs/zed-ros2-wrapper/releases/tag/foxy-humble-v3.8.2

jprodriguezg commented 1 month ago

@Myzhar I am using the branch foxy-humble-v3.8 and I also tried foxy-humble-v3.8.2

Myzhar commented 1 month ago

The tag does not include the submodules. You can check it, the folder zed-ros2-interfaces is surely empty. You must fill it with this: https://github.com/stereolabs/zed-ros2-interfaces/releases/tag/humble-v4.0.8 it should be compatible

jprodriguezg commented 1 month ago

Thanks @Myzhar I just moved to branch foxy-humble-v3.8.2 of zed-ros2-wrapper, and to branch humble-v4.0.8 of submodule zed-ros2-interfaces. However, I still have the same issue.

--- stderr: zed_components                          
CMake Error at /home/user/D4A/ras/ros2/sensors_ws/install/zed_interfaces/share/zed_interfaces/cmake/ament_cmake_export_targets-extras.cmake:18 (message):
  Failed to find exported target names in
  '/home/user/D4A/ras/ros2/sensors_ws/install/zed_interfaces/share/zed_interfaces/cmake/zed_interfaces__rosidl_generator_cExport.cmake'
Call Stack (most recent call first):
  /home/user/D4A/ras/ros2/sensors_ws/install/zed_interfaces/share/zed_interfaces/cmake/zed_interfacesConfig.cmake:41 (include)
  CMakeLists.txt:110 (find_package)

make: *** [Makefile:308: cmake_check_build_system] Error 1
---
Failed   <<< zed_components [1.53s, exited with code 2]
Myzhar commented 1 month ago

Can you please post the content of the folder zed-ros2-interfaces

jprodriguezg commented 1 month ago

Here is the content:

zed-ros2-interfaces/CMakeLists.txt
zed-ros2-interfaces/.github
zed-ros2-interfaces/.github/workflows
zed-ros2-interfaces/.github/workflows/stale_issues.yml
zed-ros2-interfaces/CONTRIBUTING.md
zed-ros2-interfaces/msg
zed-ros2-interfaces/msg/Keypoint2Df.msg
zed-ros2-interfaces/msg/Object.msg
zed-ros2-interfaces/msg/GnssFusionStatus.msg
zed-ros2-interfaces/msg/BoundingBox2Di.msg
zed-ros2-interfaces/msg/Keypoint2Di.msg
zed-ros2-interfaces/msg/ObjectsStamped.msg
zed-ros2-interfaces/msg/Keypoint3D.msg
zed-ros2-interfaces/msg/PosTrackStatus.msg
zed-ros2-interfaces/msg/DepthInfoStamped.msg
zed-ros2-interfaces/msg/Heartbeat.msg
zed-ros2-interfaces/msg/BoundingBox3D.msg
zed-ros2-interfaces/msg/BoundingBox2Df.msg
zed-ros2-interfaces/msg/PlaneStamped.msg
zed-ros2-interfaces/msg/MagHeadingStatus.msg
zed-ros2-interfaces/msg/Skeleton2D.msg
zed-ros2-interfaces/msg/Skeleton3D.msg
zed-ros2-interfaces/.git
zed-ros2-interfaces/LICENSE
zed-ros2-interfaces/meshes
zed-ros2-interfaces/meshes/zed.stl
zed-ros2-interfaces/meshes/zedxm.stl
zed-ros2-interfaces/meshes/zedx.stl
zed-ros2-interfaces/meshes/zed2i.stl
zed-ros2-interfaces/meshes/zedm.stl
zed-ros2-interfaces/meshes/zed2.stl
zed-ros2-interfaces/srv
zed-ros2-interfaces/srv/SetPose.srv
zed-ros2-interfaces/srv/StartSvoRec.srv
zed-ros2-interfaces/srv/SetROI.srv
zed-ros2-interfaces/package.xml
zed-ros2-interfaces/README.md
zed-ros2-interfaces/images
zed-ros2-interfaces/images/point_cloud.jpg
zed-ros2-interfaces/images/depth.jpg
zed-ros2-interfaces/images/PointCloud_Depth_ROS.jpg
zed-ros2-interfaces/images/.gitkeep
zed-ros2-interfaces/images/rgb.jpg
zed-ros2-interfaces/images/Picto+STEREOLABS_Black.jpg
Myzhar commented 1 month ago

What do you get if you try to build the zed_interfaces package separately? $ colcon build --symlink-install --packages-select zed_interfaces

jprodriguezg commented 1 month ago

Here is the output:

Starting >>> zed_interfaces
Finished <<< zed_interfaces [2.37s]                     

Summary: 1 package finished [2.48s]
Myzhar commented 1 month ago

The package is then correctly built. Can you now build all the other packages?

If that's not the case then check your environment settings.

jprodriguezg commented 1 month ago

I get the same error (above) while trying to compile zed_components.

--- stderr: zed_components                          
CMake Error at /home/user/D4A/ras/ros2/sensors_ws/install/zed_interfaces/share/zed_interfaces/cmake/ament_cmake_export_targets-extras.cmake:18 (message):
  Failed to find exported target names in
  '/home/user/D4A/ras/ros2/sensors_ws/install/zed_interfaces/share/zed_interfaces/cmake/zed_interfaces__rosidl_generator_cExport.cmake'
Call Stack (most recent call first):
  /home/user/D4A/ras/ros2/sensors_ws/install/zed_interfaces/share/zed_interfaces/cmake/zed_interfacesConfig.cmake:41 (include)
  CMakeLists.txt:110 (find_package)

make: *** [Makefile:308: cmake_check_build_system] Error 1
---
Failed   <<< zed_components [1.53s, exited with code 2]

I have sourced my ROS2 workspace and checked $CMAKE_PREFIX_PATH. Everything looks OK.
Are there any other environmental settings that I should take into account?

Myzhar commented 1 month ago

Can you check the content of the folders and subfolders in /home/user/D4A/ras/ros2/sensors_ws/install/zed_interfaces? Are the searched files there?

jprodriguezg commented 1 month ago

@Myzhar thanks for the feedback. All of the files that were reported as having errors are located within the folder. I discovered that some of them are hyperlinks to a file in the build directory which also exists in its respective folder. Here is the content of /home/user/D4A/ras/ros2/sensors_ws/install/zed_interfaces/share/zed_interfaces/cmake/

cmake/zed_interfaces__rosidl_typesupport_cppExport-noconfig.cmake
cmake/zed_interfaces__rosidl_generator_cExport-noconfig.cmake
cmake/zed_interfacesConfig.cmake
cmake/ament_cmake_export_targets-extras.cmake
cmake/zed_interfaces__rosidl_typesupport_cExport.cmake
cmake/rosidl_cmake_export_typesupport_targets-extras.cmake
cmake/zed_interfaces__rosidl_typesupport_introspection_cppExport-noconfig.cmake
cmake/ament_cmake_export_libraries-extras.cmake
cmake/zed_interfaces__rosidl_typesupport_cExport-noconfig.cmake
cmake/ament_cmake_export_dependencies-extras.cmake
cmake/zed_interfaces__rosidl_generator_cppExport.cmake
cmake/zed_interfaces__rosidl_generator_cExport.cmake
cmake/zed_interfaces__rosidl_typesupport_introspection_cExport-noconfig.cmake
cmake/zed_interfaces__rosidl_typesupport_introspection_cExport.cmake
cmake/ament_cmake_export_include_directories-extras.cmake
cmake/zed_interfacesConfig-version.cmake
cmake/zed_interfaces__rosidl_typesupport_cppExport.cmake
cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake
cmake/rosidl_cmake-extras.cmake
cmake/zed_interfaces__rosidl_typesupport_introspection_cppExport.cmake
Mrkofly commented 1 month ago

@Myzhar Hola, ahora estoy usando este paquete de funciones en ROS2-humble en ubuntu22.04 pero aparece un error: Failed <<< zed_components [11.5s, exited with code 2]

Summary: 2 packages finished [19.2s] 1 package failed: zed_components 1 package had stderr output: zed_components 2 packages not processed

Intenté muchas formas de resolver este problema, pero no funcionó. Espero puedan darme una respuesta.Gracias.

github-actions[bot] commented 1 week ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days