ubuntu 18.04 编译octomap

源码位置

https://github.com/OctoMap/octomap/blob/devel/octovis/README.md

commit 74c48ae on Apr 26, 2020.

本机系统Ubuntu 18.04,qt5,cmake 3.14.6。

编译

libQGLViewer for octovis

直接cmake configure octomap会报出无法编译libQGLViewer的错误,忽略该错误会导致octovis不能编译,尝试手工编译libQGLViewer。具体报错信息如下

-- QGLViewer includes found in /home/yaoyu/Libraries/octomap/octovis/src/extern/QGLViewer
-- QGLViewer library not found.
-- Trying to build libQGLViewer from source in /home/yaoyu/Libraries/octomap/octovis/src/extern/QGLViewer
-- 	 generating Makefile using qmake
-- 	 building library (this may take some time...)
make: *** No targets specified and no makefile found.  Stop.
CMake Warning at octovis/CMakeModules/FindQGLViewer.cmake:111 (MESSAGE):
  Could not find libQGLViewer.so, failed to build?
Call Stack (most recent call first):
  octovis/CMakeLists.txt:79 (FIND_PACKAGE)

libQGLViewer could not be found or generated.
Unfortunately, the viewer (octovis) can not be built because some requirements are missing.
This will not affect the compilation of the stand-alone library and tools (octomap)
See README.txt or http://octomap.sf.net for further information.

进入octomap/octovis/src/extern/QGLViewer,执行qmakemake。成功生成了libQGLViewer.so。最后sudo make install

OpenGL

cmake configure octomap时还有关于OpenGL的警告,需要用户手工指定OpenGL_GL_PREFERENCE

CMake Warning (dev) at /usr/local/share/cmake-3.14/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.

  FindO
  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值