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

pose_graph_manager: undefined symbol #30

Closed
ResearcherYan opened this issue Mar 11, 2024 · 4 comments
Closed

pose_graph_manager: undefined symbol #30

ResearcherYan opened this issue Mar 11, 2024 · 4 comments

Comments

@ResearcherYan
Copy link

Hello, I've been carefully preparing the prerequisite steps of Swarm-SLAM following the Start-up Instructions.

GTSAM installation

One thing different from the standard installation procedure is the GTSAM installing location. Since I used the following command to install GTSAM through ppa when I deployed LIO-SAM code,

sudo add-apt-repository ppa:borglab/gtsam-release-4.0
sudo apt install libgtsam-dev libgtsam-unstable-dev

I chose to install GTSAM 4.1.1 locally in the folder /home/yan/cmake_ws/gtsam/install when deploying Swarm-SLAM. So I used cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/yan/cmake_ws/gtsam/install .. to set GTSAM install path. In the meantime, I did the following modification to my cslam/CMakeList.txt to make sure it found the right version of GTSAM.

# add the following line
set(CMAKE_PREFIX_PATH "/home/yan/cmake_ws/gtsam/install" ${CMAKE_PREFIX_PATH})
# specify the GTSAM version
find_package(GTSAM 4.1.1 CONFIG REQUIRED)

colcon build

Then the colcon build output comes with some warning and a summary like 1 package had stderr output: cslam. The full output is shown below:

yan@focal-fossa:~$ source_ros2_ws
ROS_DISTRO was set to 'noetic' before. Please make sure that the environment does not mix paths from different distributions.
yan@focal-fossa:~$ source_swarm-slam
(swarm-slam) yan@focal-fossa:~$ cd ros2_ws/
(swarm-slam) yan@focal-fossa:~/ros2_ws$ colcon build --packages-select cslam
[7.138s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in one or more underlay workspaces:
	'cslam' is in: /home/yan/ros2_ws/install/cslam
If a package in a merged underlay workspace is overridden and it installs headers, then all packages in the overlay must sort their include directories by workspace order. Failure to do so may result in build failures or undefined behavior at run time.
If the overridden package is used by another package in any underlay, then the overriding package in the overlay must be API and ABI compatible or undefined behavior at run time may occur.

If you understand the risks and want to override a package anyways, add the following to the command line:
	--allow-overriding cslam

This may be promoted to an error in a future release of colcon-override-check.
Starting >>> cslam   
--- stderr: cslam                           
CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (USB_10)
  does not match the name of the calling package (OpenNI).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/Modules/FindOpenNI.cmake:28 (find_package_handle_standard_args)
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:179 (find_package)
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:322 (find_openni)
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:548 (find_external_library)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (USB_10)
  does not match the name of the calling package (OpenNI2).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/Modules/FindOpenNI2.cmake:28 (find_package_handle_standard_args)
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:193 (find_package)
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:324 (find_openni2)
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:548 (find_external_library)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (libusb-1.0)
  does not match the name of the calling package (PCL).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:291 (find_package_handle_standard_args)
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:338 (find_libusb)
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:548 (find_external_library)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (USB_10)
  does not match the name of the calling package (OpenNI).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/Modules/FindOpenNI.cmake:28 (find_package_handle_standard_args)
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:179 (find_package)
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:322 (find_openni)
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:548 (find_external_library)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (USB_10)
  does not match the name of the calling package (OpenNI2).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/Modules/FindOpenNI2.cmake:28 (find_package_handle_standard_args)
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:193 (find_package)
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:324 (find_openni2)
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:548 (find_external_library)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (USB_10)
  does not match the name of the calling package (OpenNI).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/Modules/FindOpenNI.cmake:28 (find_package_handle_standard_args)
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:179 (find_package)
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:322 (find_openni)
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:548 (find_external_library)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (PCL_COMMON)
  does not match the name of the calling package (PCL).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:616 (find_package_handle_standard_args)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (PCL_KDTREE)
  does not match the name of the calling package (PCL).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:616 (find_package_handle_standard_args)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (PCL_OCTREE)
  does not match the name of the calling package (PCL).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:616 (find_package_handle_standard_args)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (PCL_SEARCH)
  does not match the name of the calling package (PCL).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:616 (find_package_handle_standard_args)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_SAMPLE_CONSENSUS) does not match the name of the calling package
  (PCL).  This can lead to problems in calling code that expects
  `find_package` result variables (e.g., `_FOUND`) to follow a certain
  pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:616 (find_package_handle_standard_args)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_FILTERS) does not match the name of the calling package (PCL).  This
  can lead to problems in calling code that expects `find_package` result
  variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:616 (find_package_handle_standard_args)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (PCL_2D)
  does not match the name of the calling package (PCL).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:619 (find_package_handle_standard_args)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_GEOMETRY) does not match the name of the calling package (PCL).  This
  can lead to problems in calling code that expects `find_package` result
  variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:619 (find_package_handle_standard_args)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (PCL_IO)
  does not match the name of the calling package (PCL).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:616 (find_package_handle_standard_args)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_FEATURES) does not match the name of the calling package (PCL).  This
  can lead to problems in calling code that expects `find_package` result
  variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:616 (find_package_handle_standard_args)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (PCL_ML)
  does not match the name of the calling package (PCL).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:616 (find_package_handle_standard_args)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_SEGMENTATION) does not match the name of the calling package (PCL).
  This can lead to problems in calling code that expects `find_package`
  result variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:616 (find_package_handle_standard_args)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_VISUALIZATION) does not match the name of the calling package (PCL).
  This can lead to problems in calling code that expects `find_package`
  result variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:616 (find_package_handle_standard_args)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_SURFACE) does not match the name of the calling package (PCL).  This
  can lead to problems in calling code that expects `find_package` result
  variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:616 (find_package_handle_standard_args)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_REGISTRATION) does not match the name of the calling package (PCL).
  This can lead to problems in calling code that expects `find_package`
  result variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:616 (find_package_handle_standard_args)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_KEYPOINTS) does not match the name of the calling package (PCL).  This
  can lead to problems in calling code that expects `find_package` result
  variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:616 (find_package_handle_standard_args)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_TRACKING) does not match the name of the calling package (PCL).  This
  can lead to problems in calling code that expects `find_package` result
  variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:616 (find_package_handle_standard_args)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_RECOGNITION) does not match the name of the calling package (PCL).
  This can lead to problems in calling code that expects `find_package`
  result variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:616 (find_package_handle_standard_args)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (PCL_STEREO)
  does not match the name of the calling package (PCL).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:616 (find_package_handle_standard_args)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (PCL_APPS)
  does not match the name of the calling package (PCL).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:616 (find_package_handle_standard_args)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_IN_HAND_SCANNER) does not match the name of the calling package (PCL).
  This can lead to problems in calling code that expects `find_package`
  result variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:619 (find_package_handle_standard_args)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_POINT_CLOUD_EDITOR) does not match the name of the calling package
  (PCL).  This can lead to problems in calling code that expects
  `find_package` result variables (e.g., `_FOUND`) to follow a certain
  pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:619 (find_package_handle_standard_args)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args`
  (PCL_OUTOFCORE) does not match the name of the calling package (PCL).  This
  can lead to problems in calling code that expects `find_package` result
  variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:616 (find_package_handle_standard_args)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (PCL_PEOPLE)
  does not match the name of the calling package (PCL).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:616 (find_package_handle_standard_args)
  /opt/ros/foxy/share/pcl_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/pcl_ros/cmake/pcl_rosConfig.cmake:41 (include)
  CMakeLists.txt:41 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/share/cmake-3.25/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
  Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
  Run "cmake --help-policy CMP0074" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  CMake variable PCL_ROOT is set to:

    /usr

  For compatibility, CMake is ignoring the variable.
Call Stack (most recent call first):
  /opt/ros/foxy/lib/x86_64-linux-gnu/rtabmap-0.21/RTABMapConfig.cmake:7 (find_dependency)
  /opt/ros/foxy/share/rtabmap_conversions/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /opt/ros/foxy/share/rtabmap_conversions/cmake/rtabmap_conversionsConfig.cmake:41 (include)
  CMakeLists.txt:56 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning at /opt/ros/foxy/share/ament_cmake_pytest/cmake/ament_add_pytest_test.cmake:77 (message):
  The Python module 'pytest' was not found, pytests can not be run (e.g.  on
  Ubuntu/Debian install the package 'python3-pytest')
Call Stack (most recent call first):
  CMakeLists.txt:213 (ament_add_pytest_test)


CMake Warning at /opt/ros/foxy/share/ament_cmake_pytest/cmake/ament_add_pytest_test.cmake:77 (message):
  The Python module 'pytest' was not found, pytests can not be run (e.g.  on
  Ubuntu/Debian install the package 'python3-pytest')
Call Stack (most recent call first):
  CMakeLists.txt:213 (ament_add_pytest_test)


CMake Warning at /opt/ros/foxy/share/ament_cmake_pytest/cmake/ament_add_pytest_test.cmake:77 (message):
  The Python module 'pytest' was not found, pytests can not be run (e.g.  on
  Ubuntu/Debian install the package 'python3-pytest')
Call Stack (most recent call first):
  CMakeLists.txt:213 (ament_add_pytest_test)


---
Finished <<< cslam [4.03s]

Summary: 1 package finished [9.69s]
  1 package had stderr output: cslam

Later I confirmed that these warnings and stderr emerged in the summary was caused by the line find_package(pcl_ros REQUIRED) in the CMakeLists.txt. While find_package(GTSAM CONFIG REQUIRED) itself didn't produce stderr output.

Runtime error

Under this circumstance, I tried to launch the graco_lidar.launch.py but yield [ERROR] [pose_graph_manager-5]: process has died. The log is shown below.

(swarm-slam) yan@focal-fossa:~$ ros2 launch cslam_experiments graco_lidar.launch.py 
[INFO] [launch]: All log files can be found below /home/yan/.ros/log/2024-03-11-09-56-06-252690-focal-fossa-18421
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [static_transform_publisher-1]: process started with pid [18423]
[INFO] [static_transform_publisher-2]: process started with pid [18425]
[INFO] [loop_closure_detection_node.py-3]: process started with pid [18427]
[INFO] [lidar_handler_node.py-4]: process started with pid [18429]
[INFO] [pose_graph_manager-5]: process started with pid [18431]
[ERROR] [pose_graph_manager-5]: process has died [pid 18431, exit code 127, cmd '/home/yan/ros2_ws/install/cslam/lib/cslam/pose_graph_manager --ros-args -r __node:=cslam_pose_graph_manager -r __ns:=/r0 --params-file /home/yan/ros2_ws/install/cslam_experiments/share/cslam_experiments/config/graco_lidar.yaml --params-file /tmp/launch_params_im9t8v2e'].
[INFO] [icp_odometry-6]: process started with pid [18433]
[pose_graph_manager-5] /home/yan/ros2_ws/install/cslam/lib/cslam/pose_graph_manager: symbol lookup error: /home/yan/ros2_ws/install/cslam/lib/cslam/pose_graph_manager: undefined symbol: _ZNK5gtsam6Factor9printKeysERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8functionIFS6_mEE
[static_transform_publisher-2] [INFO] [1710122166.391901096] [static_transform_publisher_wX3OA2Am6TvjRP5e]: Spinning until killed publishing transform from 'velodyne' to 'gnss'
[static_transform_publisher-1] [INFO] [1710122166.391901096] [static_transform_publisher_ShBfW1vyMzBdTnmS]: Spinning until killed publishing transform from 'velodyne' to 'base_link'
[icp_odometry-6] [INFO] [1710122167.218334715] [r0.icp_odometry]: Odometry: frame_id               = velodyne
[icp_odometry-6] [INFO] [1710122167.218474658] [r0.icp_odometry]: Odometry: odom_frame_id          = odom
[icp_odometry-6] [INFO] [1710122167.218483414] [r0.icp_odometry]: Odometry: publish_tf             = true
[icp_odometry-6] [INFO] [1710122167.218489646] [r0.icp_odometry]: Odometry: wait_for_transform     = 0.200000
[icp_odometry-6] [INFO] [1710122167.218671889] [r0.icp_odometry]: Odometry: log_to_rosout_level    = 4
[icp_odometry-6] [INFO] [1710122167.218693970] [r0.icp_odometry]: Odometry: initial_pose           = xyz=0.000000,0.000000,0.000000 rpy=0.000000,-0.000000,0.000000
[icp_odometry-6] [INFO] [1710122167.218700583] [r0.icp_odometry]: Odometry: ground_truth_frame_id  = 
[icp_odometry-6] [INFO] [1710122167.218706794] [r0.icp_odometry]: Odometry: ground_truth_base_frame_id = 
[icp_odometry-6] [INFO] [1710122167.218712435] [r0.icp_odometry]: Odometry: config_path            = 
[icp_odometry-6] [INFO] [1710122167.218718206] [r0.icp_odometry]: Odometry: publish_null_when_lost = true
[icp_odometry-6] [INFO] [1710122167.218724027] [r0.icp_odometry]: Odometry: guess_frame_id         = 
[icp_odometry-6] [INFO] [1710122167.218729577] [r0.icp_odometry]: Odometry: guess_min_translation  = 0.000000
[icp_odometry-6] [INFO] [1710122167.218736150] [r0.icp_odometry]: Odometry: guess_min_rotation     = 0.000000
[icp_odometry-6] [INFO] [1710122167.218742331] [r0.icp_odometry]: Odometry: guess_min_time         = 0.000000
[icp_odometry-6] [INFO] [1710122167.218748483] [r0.icp_odometry]: Odometry: expected_update_rate   = 0.000000 Hz
[icp_odometry-6] [INFO] [1710122167.218755766] [r0.icp_odometry]: Odometry: max_update_rate        = 0.000000 Hz
[icp_odometry-6] [INFO] [1710122167.218762439] [r0.icp_odometry]: Odometry: min_update_rate        = 0.000000 Hz
[icp_odometry-6] [INFO] [1710122167.218769101] [r0.icp_odometry]: Odometry: wait_imu_to_init       = true
[icp_odometry-6] [INFO] [1710122167.218785182] [r0.icp_odometry]: Odometry: stereoParams_=0 visParams_=0 icpParams_=1
[icp_odometry-6] [INFO] [1710122167.219564497] [r0.icp_odometry]: Setting odometry parameter "Icp/MaxCorrespondenceDistance"="4.0"
[icp_odometry-6] [INFO] [1710122167.219589965] [r0.icp_odometry]: Setting odometry parameter "Icp/MaxTranslation"="5"
[icp_odometry-6] [INFO] [1710122167.219753753] [r0.icp_odometry]: Setting odometry parameter "Icp/PointToPlaneK"="20"
[icp_odometry-6] [INFO] [1710122167.219914164] [r0.icp_odometry]: Setting odometry parameter "Icp/VoxelSize"="0.4"
[icp_odometry-6] [INFO] [1710122167.220511026] [r0.icp_odometry]: Setting odometry parameter "OdomF2M/ScanSubtractRadius"="0.4"
[icp_odometry-6] [INFO] [1710122167.221217164] [r0.icp_odometry]: Setting odometry parameter "OdomLOAM/Resolution"="0.4"
[icp_odometry-6] [INFO] [1710122167.221266757] [r0.icp_odometry]: Setting odometry parameter "OdomLOAM/Sensor"="0"
[icp_odometry-6] [WARN] [1710122167.223748713] [r0.icp_odometry]: IcpOdometry: Transferring value 0.4 of "Icp/VoxelSize" to ros parameter "scan_voxel_size" for convenience. "Icp/VoxelSize" is set to 0.
[icp_odometry-6] [WARN] [1710122167.223768801] [r0.icp_odometry]: IcpOdometry: Transferring value 20 of "Icp/PointToPlaneK" to ros parameter "scan_normal_k" for convenience.
[icp_odometry-6] [INFO] [1710122167.227719569] [r0.icp_odometry]: odometry: Subscribing to IMU topic /r0/imu/data
[icp_odometry-6] [INFO] [1710122167.227736190] [r0.icp_odometry]: odometry: qos_imu = 1
[icp_odometry-6] [INFO] [1710122167.228190524] [r0.icp_odometry]: IcpOdometry: qos                    = 1
[icp_odometry-6] [INFO] [1710122167.228205823] [r0.icp_odometry]: IcpOdometry: scan_cloud_max_points  = -1
[icp_odometry-6] [INFO] [1710122167.228210853] [r0.icp_odometry]: IcpOdometry: scan_cloud_is_2d       = false
[icp_odometry-6] [INFO] [1710122167.228214840] [r0.icp_odometry]: IcpOdometry: scan_downsampling_step = 1
[icp_odometry-6] [INFO] [1710122167.228221452] [r0.icp_odometry]: IcpOdometry: scan_range_min         = 0.000000 m
[icp_odometry-6] [INFO] [1710122167.228230139] [r0.icp_odometry]: IcpOdometry: scan_range_max         = 0.000000 m
[icp_odometry-6] [INFO] [1710122167.228234297] [r0.icp_odometry]: IcpOdometry: scan_voxel_size        = 0.400000 m
[icp_odometry-6] [INFO] [1710122167.228238655] [r0.icp_odometry]: IcpOdometry: scan_normal_k          = 20
[icp_odometry-6] [INFO] [1710122167.228242582] [r0.icp_odometry]: IcpOdometry: scan_normal_radius     = 0.000000 m
[icp_odometry-6] [INFO] [1710122167.228246700] [r0.icp_odometry]: IcpOdometry: scan_normal_ground_up  = 0.000000
[icp_odometry-6] [INFO] [1710122167.228250647] [r0.icp_odometry]: IcpOdometry: deskewing              = false
[icp_odometry-6] [INFO] [1710122167.228254074] [r0.icp_odometry]: IcpOdometry: deskewing_slerp        = false
[loop_closure_detection_node.py-3] [INFO] [1710122168.114597954] [r0.cslam_loop_closure_detection]: Using ScanContext.
[lidar_handler_node.py-4] [INFO] [1710122168.143611609] [r0.cslam_map_manager]: Initialization done.
[loop_closure_detection_node.py-3] [INFO] [1710122168.205113061] [r0.cslam_loop_closure_detection]: Initialization done.
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[static_transform_publisher-2] [INFO] [1710122170.470499742] [rclcpp]: signal_handler(signal_value=2)
[icp_odometry-6] [INFO] [1710122170.470499091] [rclcpp]: signal_handler(signal_value=2)
[static_transform_publisher-1] [INFO] [1710122170.470524930] [rclcpp]: signal_handler(signal_value=2)
[loop_closure_detection_node.py-3] Traceback (most recent call last):
[loop_closure_detection_node.py-3]   File "/home/yan/ros2_ws/install/cslam/lib/cslam/loop_closure_detection_node.py", line 109, in <module>
[loop_closure_detection_node.py-3]     rclpy.spin(lcd)
[loop_closure_detection_node.py-3]   File "/opt/ros/foxy/lib/python3.8/site-packages/rclpy/__init__.py", line 191, in spin
[loop_closure_detection_node.py-3]     executor.spin_once()
[loop_closure_detection_node.py-3]   File "/opt/ros/foxy/lib/python3.8/site-packages/rclpy/executors.py", line 711, in spin_once
[loop_closure_detection_node.py-3]     handler, entity, node = self.wait_for_ready_callbacks(timeout_sec=timeout_sec)
[loop_closure_detection_node.py-3]   File "/opt/ros/foxy/lib/python3.8/site-packages/rclpy/executors.py", line 697, in wait_for_ready_callbacks
[loop_closure_detection_node.py-3]     return next(self._cb_iter)
[loop_closure_detection_node.py-3]   File "/opt/ros/foxy/lib/python3.8/site-packages/rclpy/executors.py", line 593, in _wait_for_ready_callbacks
[loop_closure_detection_node.py-3]     _rclpy.rclpy_wait(wait_set, timeout_nsec)
[loop_closure_detection_node.py-3] KeyboardInterrupt
[lidar_handler_node.py-4] Traceback (most recent call last):
[lidar_handler_node.py-4]   File "/home/yan/ros2_ws/install/cslam/lib/cslam/lidar_handler_node.py", line 245, in <module>
[lidar_handler_node.py-4]     rclpy.spin(node)
[lidar_handler_node.py-4]   File "/opt/ros/foxy/lib/python3.8/site-packages/rclpy/__init__.py", line 191, in spin
[lidar_handler_node.py-4]     executor.spin_once()
[lidar_handler_node.py-4]   File "/opt/ros/foxy/lib/python3.8/site-packages/rclpy/executors.py", line 711, in spin_once
[lidar_handler_node.py-4]     handler, entity, node = self.wait_for_ready_callbacks(timeout_sec=timeout_sec)
[lidar_handler_node.py-4]   File "/opt/ros/foxy/lib/python3.8/site-packages/rclpy/executors.py", line 697, in wait_for_ready_callbacks
[lidar_handler_node.py-4]     return next(self._cb_iter)
[lidar_handler_node.py-4]   File "/opt/ros/foxy/lib/python3.8/site-packages/rclpy/executors.py", line 593, in _wait_for_ready_callbacks
[lidar_handler_node.py-4]     _rclpy.rclpy_wait(wait_set, timeout_nsec)
[lidar_handler_node.py-4] KeyboardInterrupt
[INFO] [static_transform_publisher-2]: process has finished cleanly [pid 18425]
[INFO] [static_transform_publisher-1]: process has finished cleanly [pid 18423]
[icp_odometry-6] [ WARN] (2024-03-11 09:56:07.225) OdometryF2M.cpp:159::OdometryF2M() OdomF2M/BundleAdjustment=1 cannot be used with registration not done only with images (Reg/Strategy=1), disabling bundle adjustment.
[INFO] [icp_odometry-6]: process has finished cleanly [pid 18433]
[ERROR] [lidar_handler_node.py-4]: process has died [pid 18429, exit code -2, cmd '/home/yan/ros2_ws/install/cslam/lib/cslam/lidar_handler_node.py --ros-args -r __node:=cslam_map_manager -r __ns:=/r0 --params-file /home/yan/ros2_ws/install/cslam_experiments/share/cslam_experiments/config/graco_lidar.yaml --params-file /tmp/launch_params_4758nq38'].
[ERROR] [loop_closure_detection_node.py-3]: process has died [pid 18427, exit code -2, cmd '/home/yan/ros2_ws/install/cslam/lib/cslam/loop_closure_detection_node.py --ros-args -r __node:=cslam_loop_closure_detection -r __ns:=/r0 --params-file /home/yan/ros2_ws/install/cslam_experiments/share/cslam_experiments/config/graco_lidar.yaml --params-file /tmp/launch_params_dpcyw1ei'].

The error/home/yan/ros2_ws/install/cslam/lib/cslam/pose_graph_manager: undefined symbol: _ZNK5gtsam6Factor9printKeysERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8functionIFS6_mEE showed that there is something wrong with GTSAM. After that, I used ldd -r to check the dynamic link library of node pose_graph_manager.

yan@focal-fossa:~$ cd /home/yan/ros2_ws/install/cslam/lib/cslam/
yan@focal-fossa:~/ros2_ws/install/cslam/lib/cslam$ ldd -r pose_graph_manager
	linux-vdso.so.1 (0x00007fff199f0000)
	libdiagnostic_msgs__rosidl_typesupport_cpp.so => not found
	libcslam_common_interfaces__rosidl_typesupport_cpp.so => not found
	librclcpp.so => not found
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb072f4e000)
	librcutils.so => not found
	libstd_msgs__rosidl_typesupport_cpp.so => not found
	libgeometry_msgs__rosidl_typesupport_cpp.so => not found
	libtf2_msgs__rosidl_typesupport_cpp.so => not found
	libtf2_ros.so => not found
	libgtsam.so.4 => /usr/local/lib/libgtsam.so.4 (0x00007fb072b2d000)
	liblibstatistics_collector.so => not found
	libstatistics_msgs__rosidl_typesupport_cpp.so => not found
	librcl.so => not found
	libtracetools.so => not found
	libtbb.so.2 => /lib/x86_64-linux-gnu/libtbb.so.2 (0x00007fb072ae5000)
	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fb072903000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb0727b2000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fb072797000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb0725a5000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fb073359000)
	libboost_serialization.so.1.71.0 => /lib/x86_64-linux-gnu/libboost_serialization.so.1.71.0 (0x00007fb072561000)
	libboost_filesystem.so.1.71.0 => /lib/x86_64-linux-gnu/libboost_filesystem.so.1.71.0 (0x00007fb072543000)
	libboost_timer.so.1.71.0 => /lib/x86_64-linux-gnu/libboost_timer.so.1.71.0 (0x00007fb072539000)
	libtbbmalloc.so.2 => /lib/x86_64-linux-gnu/libtbbmalloc.so.2 (0x00007fb0724f5000)
	libmetis.so => /usr/local/lib/libmetis.so (0x00007fb072484000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb07247e000)
	libboost_chrono.so.1.71.0 => /lib/x86_64-linux-gnu/libboost_chrono.so.1.71.0 (0x00007fb072470000)
undefined symbol: _ZN6rclcpp8Waitable33get_number_of_ready_subscriptionsEv	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp8Waitable26get_number_of_ready_timersEv	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp8Waitable27get_number_of_ready_clientsEv	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp19QOSEventHandlerBase26get_number_of_ready_eventsEv	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp8Waitable28get_number_of_ready_servicesEv	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp8Waitable36get_number_of_ready_guard_conditionsEv	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp19QOSEventHandlerBase15add_to_wait_setEP14rcl_wait_set_t	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp19QOSEventHandlerBase8is_readyEP14rcl_wait_set_t	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp8Waitable26get_number_of_ready_eventsEv	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp12experimental28SubscriptionIntraProcessBase15add_to_wait_setEP14rcl_wait_set_t	(./pose_graph_manager)
undefined symbol: _ZNK23libstatistics_collector9collector9Collector20GetStatisticsResultsEv	(./pose_graph_manager)
undefined symbol: _ZN23libstatistics_collector9collector9Collector24ClearCurrentMeasurementsEv	(./pose_graph_manager)
undefined symbol: _ZNK23libstatistics_collector9collector9Collector15GetStatusStringB5cxx11Ev	(./pose_graph_manager)
undefined symbol: _ZN23libstatistics_collector9collector9Collector5StartEv	(./pose_graph_manager)
undefined symbol: _ZN23libstatistics_collector9collector9Collector4StopEv	(./pose_graph_manager)
undefined symbol: _ZNK5gtsam6Factor9printKeysERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8functionIFS6_mEE	(./pose_graph_manager)
undefined symbol: _ZNK5gtsam15NonlinearFactor5rekeyERKSt6vectorImN3tbb13tbb_allocatorImEEE	(./pose_graph_manager)
undefined symbol: _ZNK5gtsam16NoiseModelFactor5printERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8functionIFS6_mEE	(./pose_graph_manager)
undefined symbol: _ZTIN6rclcpp19QOSEventHandlerBaseE	(./pose_graph_manager)
undefined symbol: _ZTIN6rclcpp12experimental28SubscriptionIntraProcessBaseE	(./pose_graph_manager)
undefined symbol: _ZTIN6rclcpp12experimental28SubscriptionIntraProcessBaseE	(./pose_graph_manager)
undefined symbol: _ZTIN23libstatistics_collector9collector9CollectorE	(./pose_graph_manager)
undefined symbol: _ZTIN6rclcpp9TimerBaseE	(./pose_graph_manager)
undefined symbol: _ZTIN6rclcpp13PublisherBaseE	(./pose_graph_manager)
undefined symbol: _ZTIN6rclcpp13PublisherBaseE	(./pose_graph_manager)
undefined symbol: _ZTIN6rclcpp16SubscriptionBaseE	(./pose_graph_manager)
undefined symbol: _ZTIN6rclcpp16SubscriptionBaseE	(./pose_graph_manager)
undefined symbol: rcl_subscription_event_init	(./pose_graph_manager)
undefined symbol: _ZTVN23libstatistics_collector25moving_average_statistics23MovingAverageStatisticsE	(./pose_graph_manager)
undefined symbol: rcutils_reset_error	(./pose_graph_manager)
undefined symbol: _ZTVN6rclcpp19QOSEventHandlerBaseE	(./pose_graph_manager)
undefined symbol: _ZTIN6rclcpp12experimental19IntraProcessManagerE	(./pose_graph_manager)
undefined symbol: _ZTVN23libstatistics_collector9collector9CollectorE	(./pose_graph_manager)
undefined symbol: rcl_publisher_event_init	(./pose_graph_manager)
undefined symbol: _ZTVN6rclcpp8WaitableE	(./pose_graph_manager)
undefined symbol: _ZTVN5gtsam6FactorE	(./pose_graph_manager)
undefined symbol: _ZTVN5gtsam20NonlinearFactorGraphE	(./pose_graph_manager)
undefined symbol: g_rcutils_logging_initialized	(./pose_graph_manager)
undefined symbol: _ZTVN6rclcpp12experimental28SubscriptionIntraProcessBaseE	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp3QoS19get_rmw_qos_profileEv	(./pose_graph_manager)
undefined symbol: _ZNK6rclcpp9Parameter19get_parameter_valueEv	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp8shutdownESt10shared_ptrINS_7ContextEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE	(./pose_graph_manager)
undefined symbol: rcl_timer_call	(./pose_graph_manager)
undefined symbol: _ZN22rosidl_typesupport_cpp31get_message_type_support_handleIN8std_msgs3msg7String_ISaIvEEEEEPK29rosidl_message_type_support_tv	(./pose_graph_manager)
undefined symbol: _ZN22rosidl_typesupport_cpp31get_message_type_support_handleIN23cslam_common_interfaces3msg15OptimizerState_ISaIvEEEEEPK29rosidl_message_type_support_tv	(./pose_graph_manager)
undefined symbol: _ZNK6rclcpp11MessageInfo20get_rmw_message_infoEv	(./pose_graph_manager)
undefined symbol: _ZNK6rclcpp13PublisherBase33default_incompatible_qos_callbackER35rmw_qos_incompatible_event_status_t	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp9TimerBaseC2ESt10shared_ptrINS_5ClockEENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEES1_INS_7ContextEE	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp13PublisherBaseD2Ev	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp11InitOptionsC1E19rcutils_allocator_t	(./pose_graph_manager)
undefined symbol: _ZN22rosidl_typesupport_cpp31get_message_type_support_handleIN23cslam_common_interfaces3msg13KeyframeOdom_ISaIvEEEEEPK29rosidl_message_type_support_tv	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp10get_loggerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE	(./pose_graph_manager)
undefined symbol: _ZN22rosidl_typesupport_cpp31get_message_type_support_handleIN8tf2_msgs3msg10TFMessage_ISaIvEEEEEPK29rosidl_message_type_support_tv	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp9TimerBaseD2Ev	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp13PublisherBaseC2EPNS_15node_interfaces17NodeBaseInterfaceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK29rosidl_message_type_support_tRK23rcl_publisher_options_t	(./pose_graph_manager)
undefined symbol: _ZNK5gtsam4Rot3mlERKN5Eigen6MatrixIdLi3ELi1ELi0ELi3ELi1EEE	(./pose_graph_manager)
undefined symbol: _ZN22rosidl_typesupport_cpp31get_message_type_support_handleIN15statistics_msgs3msg15MetricsMessage_ISaIvEEEEEPK29rosidl_message_type_support_tv	(./pose_graph_manager)
undefined symbol: _ZNK5gtsam6Values5printERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8functionIFS6_mEE	(./pose_graph_manager)
undefined symbol: _ZN22rosidl_typesupport_cpp31get_message_type_support_handleIN23cslam_common_interfaces3msg18InterRobotMatches_ISaIvEEEEEPK29rosidl_message_type_support_tv	(./pose_graph_manager)
undefined symbol: _ZN22rosidl_typesupport_cpp31get_message_type_support_handleIN8std_msgs3msg7UInt32_ISaIvEEEEEPK29rosidl_message_type_support_tv	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp12experimental19IntraProcessManagerC1Ev	(./pose_graph_manager)
undefined symbol: rcl_get_zero_initialized_guard_condition	(./pose_graph_manager)
undefined symbol: rcl_subscription_get_default_options	(./pose_graph_manager)
undefined symbol: _ZN22rosidl_typesupport_cpp31get_message_type_support_handleIN13geometry_msgs3msg12PoseStamped_ISaIvEEEEEPK29rosidl_message_type_support_tv	(./pose_graph_manager)
undefined symbol: rcl_guard_condition_get_default_options	(./pose_graph_manager)
undefined symbol: rcutils_log	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp19QOSEventHandlerBaseD2Ev	(./pose_graph_manager)
undefined symbol: _ZNK6rclcpp16SubscriptionBase14get_topic_nameEv	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp4Node25get_node_topics_interfaceEv	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp8DurationaSERKS0_	(./pose_graph_manager)
undefined symbol: _ZNK6rclcpp4Node17get_sub_namespaceB5cxx11Ev	(./pose_graph_manager)
undefined symbol: _ZN22rosidl_typesupport_cpp31get_message_type_support_handleIN23cslam_common_interfaces3msg18RobotIdsAndOrigin_ISaIvEEEEEPK29rosidl_message_type_support_tv	(./pose_graph_manager)
undefined symbol: rcl_publisher_is_valid_except_context	(./pose_graph_manager)
undefined symbol: _ZN22rosidl_typesupport_cpp31get_message_type_support_handleIN23cslam_common_interfaces3msg10PoseGraph_ISaIvEEEEEPK29rosidl_message_type_support_tv	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp4initEiPKPKcRKNS_11InitOptionsE	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp11NodeOptionsC1E19rcutils_allocator_t	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp16SubscriptionBaseD2Ev	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp11MessageInfoD1Ev	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp4TimeC1El16rcl_clock_type_t	(./pose_graph_manager)
undefined symbol: ros_trace_callback_end	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp29UnsupportedEventTypeExceptionC1EiPK21rcutils_error_state_tRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp4Node9get_clockEv	(./pose_graph_manager)
undefined symbol: ros_trace_rclcpp_subscription_init	(./pose_graph_manager)
undefined symbol: ros_trace_rclcpp_callback_register	(./pose_graph_manager)
undefined symbol: rcl_take_event	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp4TimeD1Ev	(./pose_graph_manager)
undefined symbol: rcl_trigger_guard_condition	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp4TimeC1ERKS0_	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp11InitOptionsD1Ev	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp8DurationC1Eij	(./pose_graph_manager)
undefined symbol: _ZNK6rclcpp13PublisherBase36get_intra_process_subscription_countEv	(./pose_graph_manager)
undefined symbol: _ZN23libstatistics_collector9collector24GenerateStatisticMessageERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_N18builtin_interfaces3msg5Time_ISaIvEEESD_RKNS_25moving_average_statistics13StatisticDataE	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp16SubscriptionBase19setup_intra_processEmSt8weak_ptrINS_12experimental19IntraProcessManagerEE	(./pose_graph_manager)
undefined symbol: _ZN22rosidl_typesupport_cpp31get_message_type_support_handleIN23cslam_common_interfaces3msg9RobotIds_ISaIvEEEEEPK29rosidl_message_type_support_tv	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp4TimeaSERKS0_	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp14ParameterValueC1Ed	(./pose_graph_manager)
undefined symbol: _ZN23libstatistics_collector9collector9Collector10AcceptDataEd	(./pose_graph_manager)
undefined symbol: _ZNK6rclcpp14ParameterValue8get_typeEv	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp3QoSC2Em	(./pose_graph_manager)
undefined symbol: rcutils_get_default_allocator	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp16SubscriptionBaseC2EPNS_15node_interfaces17NodeBaseInterfaceERK29rosidl_message_type_support_tRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK26rcl_subscription_options_tb	(./pose_graph_manager)
undefined symbol: rcl_get_zero_initialized_event	(./pose_graph_manager)
undefined symbol: _ZNK6rclcpp16SubscriptionBase36matches_any_intra_process_publishersEPK9rmw_gid_t	(./pose_graph_manager)
undefined symbol: _ZN22rosidl_typesupport_cpp31get_message_type_support_handleIN23cslam_common_interfaces3msg16ReferenceFrames_ISaIvEEEEEPK29rosidl_message_type_support_tv	(./pose_graph_manager)
undefined symbol: _ZN7tf2_ros20TransformBroadcaster13sendTransformERKN13geometry_msgs3msg17TransformStamped_ISaIvEEE	(./pose_graph_manager)
undefined symbol: _ZNK6rclcpp6detail32RMWImplementationSpecificPayload19has_been_customizedEv	(./pose_graph_manager)
undefined symbol: ros_trace_rclcpp_timer_callback_added	(./pose_graph_manager)
undefined symbol: _ZNK6rclcpp4Node13get_parameterERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_9ParameterE	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp4NodeC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_11NodeOptionsE	(./pose_graph_manager)
undefined symbol: rcl_guard_condition_init	(./pose_graph_manager)
undefined symbol: _ZN22rosidl_typesupport_cpp31get_message_type_support_handleIN23cslam_common_interfaces3msg22InterRobotLoopClosure_ISaIvEEEEEPK29rosidl_message_type_support_tv	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp11MessageInfoC1ERK18rmw_message_info_t	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp12experimental19IntraProcessManager16add_subscriptionESt10shared_ptrINS0_28SubscriptionIntraProcessBaseEE	(./pose_graph_manager)
undefined symbol: _ZN22rosidl_typesupport_cpp31get_message_type_support_handleIN23cslam_common_interfaces3msg22IntraRobotLoopClosure_ISaIvEEEEEPK29rosidl_message_type_support_tv	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp9ParameterC1Ev	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp14ParameterValueC1Eb	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp9TimerBase6cancelEv	(./pose_graph_manager)
undefined symbol: rcutils_get_error_state	(./pose_graph_manager)
undefined symbol: rcl_publisher_get_default_options	(./pose_graph_manager)
undefined symbol: rcl_publish	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp3QoSC1Em	(./pose_graph_manager)
undefined symbol: _ZNK6rclcpp16SubscriptionBase33default_incompatible_qos_callbackER35rmw_qos_incompatible_event_status_t	(./pose_graph_manager)
undefined symbol: _ZNK5gtsam16NoiseModelFactor22cloneWithNewNoiseModelEN5boost10shared_ptrINS_10noiseModel4BaseEEE(./pose_graph_manager)
undefined symbol: rcl_context_is_valid	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp12get_c_stringEPKc	(./pose_graph_manager)
undefined symbol: _ZN22rosidl_typesupport_cpp31get_message_type_support_handleIN23cslam_common_interfaces3msg19OptimizationResult_ISaIvEEEEEPK29rosidl_message_type_support_tv	(./pose_graph_manager)
undefined symbol: _ZNK6rclcpp16SubscriptionBase14get_actual_qosEv	(./pose_graph_manager)
undefined symbol: _ZN22rosidl_typesupport_cpp31get_message_type_support_handleIN15diagnostic_msgs3msg9KeyValue_ISaIvEEEEEPK29rosidl_message_type_support_tv	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp13PublisherBase19setup_intra_processEmSt10shared_ptrINS_12experimental19IntraProcessManagerEE	(./pose_graph_manager)
undefined symbol: ros_trace_callback_start	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp4spinESt10shared_ptrINS_4NodeEE	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp9to_stringB5cxx11ENS_13ParameterTypeE	(./pose_graph_manager)
undefined symbol: _ZNK6rclcpp4TimecvN18builtin_interfaces3msg5Time_ISaIvEEEEv	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp3QoS15transient_localEv	(./pose_graph_manager)
undefined symbol: _ZNK6rclcpp3QoS19get_rmw_qos_profileEv	(./pose_graph_manager)
undefined symbol: rcutils_logging_initialize	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp14ParameterValueC1Ei	(./pose_graph_manager)
undefined symbol: _ZNK6rclcpp8DurationgtERKS0_	(./pose_graph_manager)
undefined symbol: _ZNK6rclcpp4TimemiERKS0_	(./pose_graph_manager)
undefined symbol: _ZNK6rclcpp13PublisherBase22get_subscription_countEv	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp14ParameterValueC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp4Node17declare_parameterERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_14ParameterValueERKN14rcl_interfaces3msg20ParameterDescriptor_ISaIvEEEb	(./pose_graph_manager)
undefined symbol: _ZNK6rclcpp4Node3nowEv	(./pose_graph_manager)
undefined symbol: _ZNK6rclcpp4Node10get_loggerEv	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp9TimerBase16get_timer_handleEv	(./pose_graph_manager)
undefined symbol: _ZNK6rclcpp4Time11nanosecondsEv	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp12experimental19IntraProcessManager13add_publisherESt10shared_ptrINS_13PublisherBaseEE(./pose_graph_manager)
undefined symbol: _ZN6rclcpp7Context15get_rcl_contextEv	(./pose_graph_manager)
undefined symbol: ros_trace_rclcpp_subscription_callback_added	(./pose_graph_manager)
undefined symbol: rcl_publisher_get_context	(./pose_graph_manager)
undefined symbol: _Z16_demangle_symbolPKc	(./pose_graph_manager)
undefined symbol: _ZNK6rclcpp5Clock14get_clock_typeEv	(./pose_graph_manager)
undefined symbol: _Z19_get_symbol_funcptrPv	(./pose_graph_manager)
undefined symbol: rcutils_logging_logger_is_enabled_for	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp16SubscriptionBase23get_subscription_handleEv	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp17SerializedMessageC1EmRK19rcutils_allocator_t	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp5ClockD1Ev	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp10exceptions20throw_from_rcl_errorEiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPK21rcutils_error_state_tPFvvE	(./pose_graph_manager)
undefined symbol: _ZN5gtsam8demangleB5cxx11EPKc	(./pose_graph_manager)
undefined symbol: rcutils_get_error_string	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp5Clock3nowEv	(./pose_graph_manager)
undefined symbol: _ZN6rclcpp5ClockC1E16rcl_clock_type_t	(./pose_graph_manager)

The above errors show that pose_graph_manager has so many libraries unlinked.

Until then, I had no idea how to debug. So I'm here seeking your generous help. I'll appreciate any possible hint.

@mjforan
Copy link

mjforan commented Mar 11, 2024

Similar problem for me:
/colcon_ws/install/cslam/lib/cslam/pose_graph_manager: symbol lookup error: /colcon_ws/install/cslam/lib/cslam/pose_graph_manager: undefined symbol: _ZNK5gtsam15NonlinearFactor5errorERKNS_12HybridValuesE

@lajoiepy
Copy link
Member

Hi! The GTSAM version is the problem. As you figured out, it needs to be 4.1 or higher, otherwise the robust solver GNC is not available. So you need to make sure that the pose_grapg_manager uses GTSAM 4.1 when building. One solution could be to build/install everything, including LIO-SAM, with 4.1.

Fortunately, I might have an even better solution for you! I recently added a Dockerfile to isolate Swarm-SLAM in a container and avoid conflicts with your base system. See here for the dockerfile as well as build and run instructions in the makefile https://github.com/lajoiepy/cslam_experiments/tree/main/docker

@ResearcherYan
Copy link
Author

@lajoiepy Thanks a lot for your generous help! In the beginning, I tried your first solution to install GTSAM 4.1.1 to /usr/local and rebuild LIO-SAM, which confirmed that LIO-SAM can't work with GTSAM 4.1.1. Then, I transferred to the docker solution. I'll show my successful deployment procedure to help someone who has similar problems.

@mjforan Hey my friend, maybe you could try out my solution to see whether it suits you.

Docker solution

Container preparation

Download Dockerfile.lidar and makefile in cslam_experiments/docker to local folder ~/ros2_ws/src/Swarm-SLAM/src/cslam_experiments/docker. Directly building based on the source dockerfile will produce error File has unexpected size (1347063 != 1459378). Mirror sync in progress? [IP: 192.168.111.241 8081]. So I modify the dockerfile and keep only the first line as follows:

FROM ros:humble-perception

Then build the docker image.

cd ~/ros2_ws/src/Swarm-SLAM/src/cslam_experiments/docker
make build

Based on the built image, then create the container. Don't use make cpu_run to create the container, otherwise the later command apt install zenoh-bridge-ros2dds will lead to the error System has not been booted with systemd as init system (PID 1). Can't operate.

docker run --privileged -itd --rm --ipc host --net host --pid host --name swarmslam swarmslam
docker exec -it swarmslam bash

Install dependencies

Inside the container, I install the rest dependencies.

apt update
apt install python3-pip python3-vcstool vim -y

git clone https://github.com/MISTLab/Swarm-SLAM.git
cd Swarm-SLAM && mkdir src && vcs import src < cslam.repos

pip install -r requirements.txt

cd /
git clone https://github.com/ros/rosdistro
vim /etc/ros/rosdep/sources.list.d/20-default.list
# Modify the following lines
yaml file:///rosdistro/rosdep/osx-homebrew.yaml osx
yaml file:///rosdistro/rosdep/base.yaml
yaml file:///rosdistro/rosdep/python.yaml
yaml file:///rosdistro/rosdep/ruby.yaml
gbpdistro file:///rosdistro/releases/fuerte.yaml fuerte

vim /usr/lib/python3/dist-packages/rosdep2/sources_list.py
# Modify the following line
DEFAULT_SOURCES_LIST_URL = 'file:///etc/ros/rosdep/sources.list.d/20-default.list'

vim /usr/lib/python3/dist-packages/rosdep2/rep3.py
# Modify the following line
REP3_TARGETS_URL = 'file:///rosdistro/releases/targets.yaml'

vim /usr/lib/python3/dist-packages/rosdistro/__init__.py
# Modify the following line
DEFAULT_INDEX_URL = 'file:///rosdistro/index-v4.yaml'

# After modifying the above files, `rosdep update` will go way faster
rosdep update
cd Swarm-SLAM
rosdep install --from-paths src --ignore-src -r -y

. /opt/ros/humble/setup.sh
colcon build

cd /
git clone https://github.com/MIT-SPARK/TEASER-plusplus.git
cd TEASER-plusplus && mkdir build && cd build
cmake -DTEASERPP_PYTHON_VERSION=3.10 ..
make teaserpp_python
cd python && pip install .

echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
echo "source Swarm-SLAM/install/setup.bash" >> ~/.bashrc

cd /
apt install wget
wget -O head_cslam https://api.github.com/repos/lajoiepy/cslam/commits?per_page=1
wget -O head_cslam_interfaces https://api.github.com/repos/lajoiepy/cslam_interfaces/commits?per_page=1
wget -O head_cslam_experiments https://api.github.com/repos/lajoiepy/cslam_experiments/commits?per_page=1

cd Swarm-SLAM/src/cslam && git pull
cd ../cslam_experiments && git pull
cd ../cslam_interfaces && git pull
cd ../.. && colcon build

echo "deb [trusted=yes] https://download.eclipse.org/zenoh/debian-repo/ /" | tee -a /etc/apt/sources.list > /dev/null
apt update && apt install zenoh-bridge-ros2dds

# At last, some addtional dependencies also needs to be installed.
pip install pickle5
apt install ros-humble-rtabmap*

Then ros2 launch cslam_experiments graco_lidar.launch.py goes without any error!

@mjforan
Copy link

mjforan commented Mar 12, 2024

I also had GTSAM 4.1.1 installed as per the instructions and still got that error. I was able to get the existing Dockerfile to build without issue. I had to manually install rtabmap-odom but everything seems to work. Just waiting on a dataset to download so I can fully test it.

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

3 participants