Error when trying to install zed-ros2-wrapper (spdlog)

Hello,
I am fairly new to working with zed cameras and ROS2. Recently I was trying to install zed-ros2-wrapper on Ubuntu 22.04 with Nvidia GeForce RTX 4060 GPU which later I will use it on Isaac SIM for my research work on university. When I was installing it, the zed_wrapper package failed with the following error:

Starting >>> zed_interfaces
Finished <<< zed_interfaces [2.07s]                     
Starting >>> zed_components
Finished <<< zed_components [1.79s]                  
Starting >>> zed_wrapper
--- stderr: zed_wrapper                             
/usr/bin/ld: /opt/ros/humble/lib/librcl_logging_spdlog.so: undefined reference to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v8::basic_string_view<char>, spdlog::level::level_enum, fmt::v8::basic_string_view<char>)'
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/zed_wrapper.dir/build.make:446: zed_wrapper] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:164: CMakeFiles/zed_wrapper.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< zed_wrapper [2.16s, exited with code 2]

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

I haven’t found a solution online. To install and build the package I am following this tutorial Getting Started with ROS 2 and ZED - Stereolabs. I tried to edit CMakeLists.txt and package.xml of the zed_wrapper by adding lines which target spdlog but nothing works. I also checked my system and I see that spdlog is installed. What can the problem be and how can I solve it?

Hi @Mateo
Welcome to the Stereolabs community.

It seems that your installation of ROS 2 is broken.
I recommend you reinstall ROS 2 Humble, then you delete the folders build and install in the ROS 2 workspace and build the ZED ROS 2 Wrapper again.

1 Like