The above installs the library files and installable client driver
registration in /opt/intel/opencl-1.2-5.0.0.43. Two more steps were
needed to run an OpenCL program.
Add library to search path:
1
sudo gedit /etc/ld.so.conf.d/intelOpenCL.conf
Add the line:
1
/opt/intel/opencl-1.2-5.0.0.43/lib64
Link to the intel icd file in the expected location:
git clone https://github.com/OpenKinect/libfreenect2.git cd depends sh ./download_debs_trusty.sh sh ./install_ubuntu.sh sudo dpkg -i libglfw3*_3.0.4-1_*.deb sudo apt-get install build-essential cmake pkg-config libturbojpeg libjpeg-turbo8-dev mesa-common-dev freeglut3-dev libxrandr-dev libxi-dev sudo dpkg -i debs/libusb*deb sudo dpkg -i debs/{libva,i965}*deb; sudo apt-get install -f sudo apt-add-repository ppa:deb-rob/ros-trusty && sudo apt-get update cd cd .. mkdir build && cd build cmake .. -DENABLE_CXX11=ON make sudo make install sudo cp ../platform/linux/udev/90-kinect2.rules /etc/udev/rules.d/
如在编译时出现错误:
1 2 3 4 5 6 7
Linking CXX shared library lib/libfreenect2.so /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libturbojpeg.a(libturbojpeg_la-turbojpeg.o): relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libturbojpeg.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status make[2]: *** [lib/libfreenect2.so.0.2.0] Error 1 make[1]: *** [CMakeFiles/freenect2.dir/all] Error 2 make: *** [all] Error 2
echo "deb http://ppa.launchpad.net/keithw/glfw3/>ubuntu trusty main" | sudo tee -a /etc/apt/sources.list.d/fillwave_ext.list echo "deb-src http://ppa.launchpad.net/keithw/glfw3/ubuntu trusty main" | sudo tee -a /etc/>apt/sources.list.d/fillwave_ext.list
nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2015 NVIDIA Corporation Built on Tue_Aug_11_14:27:32_CDT_2015 Cuda compilation tools, release 7.5, V7.5.17
如果在安装时出现Depends: ros-indigo-simulators but it is not going to be installed的错误(安装gazebo2导致的错误),可以先下载老版本的libsdformat-dev,安装,然后再执行sudo apt-get install ros-indigo-desktop-full。
安装iai_kinect2(可选)
This is a collection of tools and libraries for a ROS Interface to
the Kinect One (Kinect v2).
1 2 3 4 5
mkdir -p ~/catkin_ws/src cd ~/catkin_ws/src git clone https://github.com/code-iai/iai_kinect2.git cd iai_kinect2 rosdep install -r --from-paths .
此时可能会显示有关[kinect2_bridge] and
[depth_registration]的错误,不用理它。
1 2
cd ~/catkin_ws catkin_make -DCMAKE_BUILD_TYPE="Release"
"libfreenect2.so:
undefined reference to clRetainContext@OPENCL_1.0"错误