rsasaki0109 / lidarslam_ros2

ROS 2 package of 3D lidar slam using ndt/gicp registration and pose-optimization
BSD 2-Clause "Simplified" License
542 stars 123 forks source link

installation failure Imported target "g2o::solver_eigen" includes non-existent path #57

Closed ShaharSarShalom closed 1 year ago

ShaharSarShalom commented 1 year ago

I tried to compile the code using the command

colcon build --symlink-install --cmake-clean-first --parallel-workers 12 --ament-cmake-args -DPYTHON_EXECUTABLE=$MY_PYTHON_ENV

I keep on getting this error message

`This may be promoted to an error in a future release of colcon-override-check. Starting >>> lidarslam_msgs Starting >>> ndt_omp_ros2 Starting >>> ros2_kitti_publishers Starting >>> turtlesim Finished <<< lidarslam_msgs [15.5s]
[Processing: ndt_omp_ros2, ros2_kitti_publishers, turtlesim]
Finished <<< turtlesim [50.2s]
Finished <<< ros2_kitti_publishers [55.4s]
[Processing: ndt_omp_ros2]
Finished <<< ndt_omp_ros2 [1min 26s]
Starting >>> graph_based_slam Starting >>> scanmatcher --- stderr: graph_based_slam
WARNING io features related to pcap will be disabled WARNING io features related to png will be disabled WARNING io features related to libusb-1.0 will be disabled CMake Warning (dev) at /usr/share/cmake-3.16/Modules/FindOpenGL.cmake:275 (message): Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when available. Run "cmake --help-policy CMP0072" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

FindOpenGL found both a legacy GL library:

OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

and GLVND libraries for OpenGL and GLX:

OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for compatibility with CMake 3.10 and below the legacy GL library will be used. Call Stack (most recent call first): /usr/share/cmake-3.16/Modules/CMakeFindDependencyMacro.cmake:47 (find_package) /usr/local/lib/cmake/g2o/g2oConfig.cmake:4 (find_dependency) CMakeLists.txt:33 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error in CMakeLists.txt: Imported target "g2o::solver_eigen" includes non-existent path

"/usr/local/include/g2o/solver_eigen"

in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

CMake Error in CMakeLists.txt: Imported target "g2o::solver_eigen" includes non-existent path

"/usr/local/include/g2o/solver_eigen"

in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

rsasaki0109 commented 1 year ago

Perhaps you compile and install g2o? If you are, that's the problem, install ros--libg2o with apt.

ShaharSarShalom commented 1 year ago

Perhaps you compile and install g2o? If you are, that's the problem, install ros--libg2o with apt.

thank you

S