Ubuntu安装Kinect驱动(openni、NITE、Sensor)及遇到的问题

一、前言

先说一下博主的运行环境:
Ubuntu kylin14.04
kinect第一代
另外还要注意的是openni、NITE、Sensor这三个包的版本必须匹配才能正常运行,我的版本分别是:
OpenNI-Bin-Dev-Linux-x64-v1.5.7.10.tar
NITE-Bin-Linux-x64-v1.5.2.23.tar
SensorKinect093-Bin-Linux-x64-v5.1.2.1
可以在我的网盘下载:http://pan.baidu.com/s/1hqHB10w 提取密码:wrmn

二、安装OpenNI

下载OpenNI-Bin-Dev-Linux-x64-v1.5.7.10.tar解压得到OpenNI-Bin-Dev-Linux-x64-v1.5.7.10文件夹,我把这三个包都放在home下面的software目录下

$ cd /home/siat/software/OpenNI-Bin-Dev-Linux-x64-v1.5.7.10
$ sudo ./install.sh

如果显示如下

Installing OpenNI
****************************

copying shared libraries...OK
copying executables...OK
copying include files...OK
creating database directory...OK
registering module 'libnimMockNodes.so'...OK
registering module 'libnimCodecs.so'...OK
registering module 'libnimRecorder.so'...OK
creating java bindings directory...OK
Installing java bindings...OK

*** DONE ***

则安装成功

三、安装NITE

下载NITE-Bin-Linux-x64-v1.5.2.23.tar解压得到NITE-Bin-Linux-x64-v1.5.2.23文件夹放在software下面

$ cd /home/siat/software/NITE-Bin-Linux-x64-v1.5.2.23
$ sudo ./install.sh

如果显示如下:

Installing NITE
***************

Copying shared libraries... OK
Copying includes... OK
Installing java bindings... OK
Installing module 'Features_1_3_0'...
Registering module 'libXnVFeatures_1_3_0.so'... OK
Installing module 'Features_1_3_1'...
Registering module 'libXnVFeatures_1_3_1.so'... OK
Installing module 'Features_1_4_1'...
Registering module 'libXnVFeatures_1_4_1.so'... OK
Installing module 'Features_1_4_2'...
Registering module 'libXnVFeatures_1_4_2.so'... OK
Installing module 'Features_1_5_2'...
Registering module 'libXnVFeatures_1_5_2.so'... OK
Copying XnVSceneServer... OK
Installing module 'Features_1_5_2'
registering module 'libXnVHandGenerator_1_3_0.so'...OK
Installing module 'Features_1_5_2'
registering module 'libXnVHandGenerator_1_3_1.so'...OK
Installing module 'Features_1_5_2'
registering module 'libXnVHandGenerator_1_4_1.so'...OK
Installing module 'Features_1_5_2'
registering module 'libXnVHandGenerator_1_4_2.so'...OK
Installing module 'Features_1_5_2'
registering module 'libXnVHandGenerator_1_5_2.so'...OK
Adding license.. OK

*** DONE ***

则安装成功

四、安装Sensor

下载SensorKinect093-Bin-Linux-x64-v5.1.2.1.tar.bz2解压得到SensorKinect093-Bin-Linux-x64-v5.1.2.1文件夹放到software下面

$ cd /home/siat/software/Sensor-Bin-Linux-x64-v5.1.2.1
$ sudo ./install.sh

如果显示如下

Installing PrimeSense Sensor
****************************

creating config dir /usr/etc/primesense...OK
copying shared libraries...OK
copying executables...OK
registering module 'libXnDeviceSensorV2KM.so' with OpenNI...OK
registering module 'libXnDeviceFile.so' with OpenNI...OK
copying server config file...OK
setting uid of server...OK
creating server logs dir...OK
installing usb rules...OK
installing modprobe blacklist...OK

*** DONE ***

则安装成功

四、运行示例

连上kinect的数据线

$ cd ~/software/OpenNI-Bin-Dev-Linux-x64-v1.5.7.10/Samples/Bin/x64-Release
$ ./NiViewer 

如果出现kinect画面则配置成功
Ubuntu安装Kinect驱动(openni、NITE、Sensor)及遇到的问题_第1张图片

五、问题

1、注意如果出现:

One or more of the following nodes could not be enumerated:

Device: PrimeSense/SensorV2/5.1.6.6: The device is not connected!
Device: PrimeSense/SensorV2/5.1.0.41: The device is not connected!
Device: PrimeSense/SensorV2/5.1.6.6: The device is not connected!
Device: PrimeSense/SensorV2/5.1.0.41: The device is not connected!

Press any key to continue . . .

这样的问题有可能是这三个包版本不匹配,我这里的三个包亲测是可用的。但是Sensor如果是5.1.6.6版本则出现上面报错。

—-2015.10.19
之前安装好了驱动可以正常运行的,今天运行openni的节点却发现不能正常打开Kinect了,报错如下:

Device: PrimeSense/SensorV2/5.1.0.41: The device is not connected!

于是我重新做了一遍步骤四

$ cd /home/siat/software/Sensor-Bin-Linux-x64-v5.1.2.1
$ sudo ./install.sh

再次运行示例程序成功启动Kinect

2、注意ubuntu下不能使用openni2.2和NITE2.2版本的包

你可能感兴趣的:(ubuntu,sensor,kinect,nite,openni)