ROS交流群
ROS Group 产品服务
Product Service 开源代码库
Github 官网
Official website 技术交流
Technological exchanges 激光雷达
LIDAR ROS教程
ROS Tourials 深度学习
Deep Learning 机器视觉
Computer Vision
ROS Group 产品服务
Product Service 开源代码库
Github 官网
Official website 技术交流
Technological exchanges 激光雷达
LIDAR ROS教程
ROS Tourials 深度学习
Deep Learning 机器视觉
Computer Vision
编译安装libfreenect2时错误问题
-
在编译安装
libfreenect2
时出现如下的错误-- using tinythread as threading library -- Checking for module 'libusb-1.0>=1.0.20' -- CMake Error at /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:367 (message): A required package was not found Call Stack (most recent call first): /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:532 (_pkg_check_modules_internal) cmake_modules/FindLibUSB.cmake:21 (PKG_CHECK_MODULES) CMakeLists.txt:93 (FIND_PACKAGE)
这个错误来自于
libusb
,但是我已经按照说明安装了libusb
,即执行下面的指令sudo apt-get install libusb-1.0-0-dev
然后我又重新源码安装了最新的libusb,发现还是不行.
最后就把libfreenect2/cmake_modules/FindLibUSB.cmake
中的几行注释掉,感觉是在用pkg-config
来找库的时候module
的名字错了# - Find libusb for portable USB support # # If the LibUSB_ROOT environment variable # is defined, it will be used as base path. # The following standard variables get defined: # LibUSB_FOUND: true if LibUSB was found # LibUSB_INCLUDE_DIR: the directory that contains the include file # LibUSB_LIBRARIES: the libraries IF(PKG_CONFIG_FOUND) IF(DEPENDS_DIR) #Otherwise use System pkg-config path SET(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${DEPENDS_DIR}/libusb/lib/pkgconfig") ENDIF() SET(MODULE "libusb-1.0") #把下面的几行注释掉 #IF(CMAKE_SYSTEM_NAME MATCHES "Linux") # SET(MODULE "libusb-1.0>=1.0.20") #ENDIF() IF(LibUSB_FIND_REQUIRED) SET(LibUSB_REQUIRED "REQUIRED") ENDIF()
这样在安装说明文件的方法make就可以了