ubuntu安装lidar_align时编译出错,激光雷达与IMU标定

1、下载lidar_align

ethz-asl/lidar_align: A simple method for finding the extrinsic calibration between a 3D lidar and a 6-dof pose sensor (github.com)https://github.com/ethz-asl/lidar_align2、安装编译

sudo apt-get install libnlopt-dev
cd lidar_align-master
mkdir build
cd build
cmake .. && make -j4

此时可能会出现以下问题:

问题1:

 CNake Error at /usr /share/cnake-3.10/Nodules/FindPackageHandlestandardArgs.cmake:137 (nessage);could NOT find NLOPT (missing: NLOPT_INCLUDE_DIR NLOPT_LIBRARY)
Call stack (most recent call first):
/usr/share/cnake-3.10/NModules/FindPackageHandleStandardArgs.cnake:378(_FPHSA_FAILURENLOPTConfig.cmake:65 (find_package_handle_standard_args)
CMakeLists.txt: 18 (find_package)
-- Configuring incomplete, errors occurred!
see also "/home/findlab/lidar_align-naster/build /CMakeFiles/CNakeoutput.log".See also "/hone /findlab/lidar_align-naster/build/CMakeFiles/CNakeError.log".

 解决方法:

在lidar_align-master文件夹中的CMakeLists.txt添加以下代码:

list(APPEND CMAKE_FIND_ROOT_PATH ${PROJECT_SOURCE_DIR})
set (CMAKE_PREFIX_PATH "/usr/local/lib/cmake/nlopt")

 

问题2:

/usr/include/flann/ext/lz4.h:196:57: error: conflicting declaration 'typedef struct LZ4_ strean_t LZ4_ strean_t'typedef struct { long long table[LZ4_STREANSIZE_U64];} LZ4_strean_t;

解决办法:

在终端中执行以下命令

sudo mv /usr/include/flann/ext/lz4.h /usr/include/flann/ext/lz4.h.bak
sudo mv /usr/include/flann/ext/lz4hc.h /usr/include/flann/ext/lz4.h.bak
sudo ln -s /usr/include/lz4.h /usr/include/flann/ext/lz4.h
sudo ln -s /usr/include/lz4hc.h /usr/include/flann/ext/lz4hc.h

 

问题3 :

/usr/include/pcl-1.10/pcl/point_types.h:525:1: error: ‘minusscalar’ is not a member of ‘pcl::traits’
  525 | POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointWithViewpoint,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 

 解决办法:

在lidar_align-master文件中的CMakeLists.txt里增加以下代码:

set(CMAKE_CXX_STANDARD 14)

 问题4:

In file included from /home/hzw/lidar_align-master/src/aligner.cpp:1:
/home/hzw/lidar_align-master/include/lidar_align/aligner.h:7:10: fatal error: nlopt.hpp: 没有那个文件或目录
    7 | #include <nlopt.hpp>
      |          ^~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/lidar_align.dir/build.make:76:CMakeFiles/lidar_align.dir/src/aligner.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:1165:CMakeFiles/lidar_align.dir/all] 错误 2
make: *** [Makefile:141:all] 错误 2

解决办法:

安装nlopt

git clone https://github.com/stevengj/nlopt
cd nlopt
mkdir build
cd build
cmake .. && make -j4
sudo make install

 最终编译成功

  • 6
    点赞
  • 24
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

╰︶ ̄ 莫等闲۩۩۩

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值