基于ubuntu16.04安装iai_kinect2及出现的问题

基于ubuntu16.04安装iai_kinect2及出现的问题

安装iai_kinect2 链接 https://github.com/code-iai/iai_kinect2
安装步骤:
$:cd ~/catkin_ws/src
$:git clone https://github.com/code-iai/iai_kinect2.git
$:cd iai_kinect2
$:rosdep install –r –from-path .
$:cd ~/catkin_ws
$:catkin_make –DCMAKE_BUILD_TYPE=“Release”

$:rosdep install –r –from-path . 出现错误
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
kinect2_viewer: Cannot locate rosdep definition for [kinect2_bridge]
kinect2_calibration: Cannot locate rosdep definition for [kinect2_bridge]
kinect2_bridge: Cannot locate rosdep definition for [kinect2_registration]
Continuing to install resolvable dependencies…
All required rosdeps installed successfully

将命令改成:
$ rosdep install --from-paths ~/catkin_ws/src/iai_kinect2 --ignore-src -r
出现All required rosdeps installed successfully
就可以把错误解决了

$:catkin_make –DCMAKE_BUILD_TYPE=“Release” 出现错误
CMake Error at /home/ubuntu/catkin_ws/devel/share/kinect2_registration/cmake/kinect2_registrationConfig.cmake:113 (message):
Project ‘kinect2_registration’ specifies ‘/usr/local/cuda-9.2/include’ as
an include dir, which is not found. It does neither exist as an absolute
directory nor in
‘/home/ubuntu/catkin_ws/src/iai_kinect2/kinect2_registration//usr/local/cuda-9.2/include’.
Report the problem to the maintainer ‘Thiemo Wiedemeyer
[email protected]’ and request to fix the problem.
Call Stack (most recent call first):
/opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package)
iai_kinect2/kinect2_bridge/CMakeLists.txt:24 (find_package)

– Configuring incomplete, errors occurred!
See also “/home/ubuntu/catkin_ws/build/CMakeFiles/CMakeOutput.log”.
See also “/home/ubuntu/catkin_ws/build/CMakeFiles/CMakeError.log”.
Makefile:2572: recipe for target ‘cmake_check_build_system’ failed
make: *** [cmake_check_build_system] Error 1
Invoking “make cmake_check_build_system” failed
解决办法:
是因为之前安装过别的版本的cuda,catkin_ws空间还保留着之前的版本信息,所以在编译的时候还用之前的版本,需要cd catkin_ws/build里找CMakeCache.txt,进去后在Ln387找到//Path to a file.
OpenCL_INCLUDE_DIR:PATH=/usr/local/cuda-9.1(这里改成你目前的cuda版本)/include
再到Li1376找到
FIND_PACKAGE_MESSAGE_DETAILS_OpenCL:INTERNAL=[/usr/lib/x86_64-linux-gnu/libOpenCL.so][/usr/local/cuda-9.1(这里改成你目前的cuda版本)/include][v1.2()]
再在cd catkn_ws到这个位置运行$:catkin_make –DCMAKE_BUILD_TYPE="Release"编译就可以了


作者:Mark#
来源:CSDN
原文:https://blog.csdn.net/coldplayplay/article/details/75200092
版权声明:本文为博主原创文章,转载请附上博文链接!

你可能感兴趣的:(Ros2bot移动小车,Kinect,Ubuntu16.04)