ubuntu16.04 kinect2使用安装
机器最好是有nvidia显卡的,参考前文安装cuda。当然如果没有显卡也可以使用。
本文第一部分是安装kinect2的驱动。第二部分是在ROS中使用。
1)首先安装libfreenect2
git clone https://github.com/OpenKinect/libfreenect2.git   ``cd libfreenect2   sudo apt-get install build-essential cmake pkg-config libusb-1.0-0-dev libturbojpeg libjpeg-turbo8-dev
sudo apt-get install libglfw3-dev  libopenni2-dev   ``cd ..   ``mkdir build && cd build   ``cmake .. -DENABLE_CXX11=ON   ``make   ``make install   ``sudo cp ../platform/linux/udev/90-kinect2.rules /etc/udev/rules.d/
重新插拔kinect2,之后运行。后面参数可选一个。具体看帮助文档
./bin/Protonect [gl | cuda | cpu]
2)ROS中使用kinect2
cd ~/catkin_ws/src/
git clone https://github.com/code-iai/iai_kinect2.git
cd iai_kinect2
rosdep install -r --from-paths .
cd ~/catkin_ws
catkin_make -DCMAKE_BUILD_TYPE="Release"
roslaunch kinect2_bridge kinect2_bridge.launch
rosrun image_view image_view image:=/kinect2/hd/image_color
本文是项目iai_kinect2和libfreenect2的帮助文档的简化版。更多内容可参考两个项目的github(上文都有)
 
        