laboshinl/loam_velodyne安装流程

laboshinl/loam_velodyne安装流程

  • 1 下载地址
  • 2 catkin_make
    • 2.1 eigen3缺失
    • 2.1 FindEigen3.cmake

1 下载地址

https://github.com/laboshinl/loam_velodyne

2 catkin_make

2.1 eigen3缺失

在Eigen官网下载任意版本均可,在install安装文件中,有两种安装方法:

Method 1. Installing without using CMake
You can use right away the headers in the Eigen/ subdirectory. In order to install, just copy this Eigen/ subdirectory to your favorite location. If you also want the unsupported features, copy the unsupported /subdirectory too.

Method 2. Installing using CMake
Let's call this directory 'source_dir' (where this INSTALL file is). Before starting, create another directory which we will call 'build_dir'.
	Do:
	  cd build_dir
	  cmake source_dir
	  make install
The "make install" step may require administrator privileges. You can adjust the installation destination (the "prefix") by passing the -DCMAKE_INSTALL_PREFIX=myprefix option to cmake, as is explained in the message that cmake prints at the end.

其中,方法一直接复制到系统目录,方法二cmke编译后指定安装目录,笔者本想用方法二更完整,但是提示错误cmake找不到系统内的目录,加了sudo也没用,笔者猜测是上层系统文件的权限问题,我给了/usr/local/include的权限,但是/usr/local/没有权限,如有错误感谢指正。使用方法一步骤如下:

/*1*/
解压到任意文件夹eigen3
/*2*/
sudo mv eign3 /usr/local/include/

2.1 FindEigen3.cmake

CMake Error at loam_velodyne-master/CMakeLists.txt:14 (find_package):
  By not providing "FindEigen3.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Eigen3", but
  CMake did not find one.

  Could not find a package configuration file provided by "Eigen3" with any
  of the following names:

    Eigen3Config.cmake
    eigen3-config.cmake

  Add the installation prefix of "Eigen3" to CMAKE_PREFIX_PATH or set
  "Eigen3_DIR" to a directory containing one of the above files.  If "Eigen3"
  provides a separate development package or SDK, be sure it has been
  installed.

提示这个错误是因为CMakeLists.txt没有找到eigen3包,在CMakeLists.txt文件find_package(Eigen3 REQUIRED)前加入set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake),同时loam_velodyne-master包内新建文件夹cmake,把eigen安装包中的FindEigen3.cmake复制到cmake内,编译通过。

你可能感兴趣的:(Ubuntu,ROS,PCL,C++)