catkin_make error
Opened this issue · 0 comments
mengchaoheng commented
CMake Error at LIO-SAM/CMakeLists.txt:27 (find_package):Find GTSAM.cmake
solved by install gtsam
#open a Terminal.
wget -O ~/Downloads/gtsam.zip https://github.com/borglab/gtsam/archive/4.0.0-alpha2.zip
cd ~/Downloads/ && unzip gtsam.zip -d ~/Downloads/
cd ~/Downloads/gtsam-4.0.0-alpha2/
mkdir build && cd build
cmake ..
sudo make install
# copy the libmetis.so library into /usr/lib/ folder. !!!!!!!
sudo cp /usr/local/lib/libmetis.so /usr/lib
and install the dependence of the lio_sam,follow as below:
sudo add-apt-repository ppa:borglab/gtsam-release-4.0
sudo apt update
sudo apt install libgtsam-dev libgtsam-unstable-dev
if using Ubuntu 20.04 and ROS Noetic, after Install GTSAM following readme and catkin_make error, need to :
Configure the utility.h to use #include <opencv2/opencv.hpp> instead of #include <opencv/cv.h>
Configure CMakeLists.txt to use set(CMAKE_CXX_FLAGS "-std=c++14") instead of set(CMAKE_CXX_FLAGS "-std=c++11")
Move #include <opencv2/opencv.hpp> after the pcl headers
and if you have error:
neor_mini/mini_sim18_ws/src/LeGO-LOAM/LeGO-LOAM/include/utility.h:11:10: fatal error: cloud_msgs/cloud_info.h: No such file or directory
11 | #include "cloud_msgs/cloud_info.h"
just add option -DCATKIN_WHITELIST_PACKAGES="cloud_msgs"
catkin_make -DCATKIN_WHITELIST_PACKAGES="cloud_msgs"
after that, you can "catkin_make" as usual.