ubuntu 16.04 + ROS kinetic 安装Kinect v1驱动

openni、Sensor、NITE(可选)这三个包的版本必须匹配才能正常运行

主要参考

①https://www.20papercups.net/programming/kinect-on-ubuntu-with-openni/

②https://blog.csdn.net/u011092188/article/details/54861591

③https://blog.csdn.net/sinat_39411798/article/details/80606204?utm_source=blogxgwz0

第三篇主要是讲参照第二篇安装过程中遇到的问题

 

ubuntu 下的kinect1的驱动我知道的有两种方式: 

1 openNI+sensor+NITE(可选) 

2 openNI2+libFreenect 

 

链接①中使用的是第一种方法

一、安装依赖项

1. sudo apt-get install git build-essential python libusb-1.0-0-dev freeglut3-dev openjdk-8-jdk

2. sudo apt-get install doxygen graphviz mono-complete

 

二、OPENNI

1. git clone https://github.com/OpenNI/OpenNI.git

2. cd OpenNI

3. git checkout Unstable-1.5.4.0

4. cd Platform/Linux/CreateRedist

5. chmod +x RedistMaker

6. ./RedistMaker

7. cd ../Redist/OpenNI-Bin-Dev-Linux-[xxx]  (根据Redist文件夹下的实际名称来where [xxx] is your architecture and this particular OpenNI release)

8. sudo ./install.sh

 

三、Kinect Sensor Module

1. 先进入home目录

2. git clone https://github.com/avin2/SensorKinect

3. cd SensorKinect

4. cd Platform/Linux/CreateRedist

5. chmod +x RedistMaker

6. ./RedistMaker

7. cd ../Redist/Sensor-Bin-Linux-[xxx] (where [xxx] is your architecture and this particular OpenNI release)

8. chmod +x install.sh

9. sudo ./install.sh

 

四、验证

连接Kinect

1. cd OpenNI/Platform/Linux/Bin/x64-Release 此文件夹的名称每台电脑都不一样,大概按照这个去找

2. ./Sample-NiSimpleViewer

如果正确的话,会出现 yellow-black depth image

 

五、设置环境变量

如果使用Kinect作为3D传感器就设置一下TURTLEBOT_3D_SENSOR

$ echo "export TURTLEBOT_3D_SENSOR=kinect" >> ~/turtlebot/devel/setup.sh

$ source ~/turtlebot/devel/setup.bash

 

六. 卸载

如果想卸载这两个或三个软件包只要同样运行./install.sh 带上参数-u 即可

sudo ./install.sh -u

你可能感兴趣的:(ROS)