KinectV2驱动安装(OpenNI问题解决)

配置环境
Ubuntu18.04
ros-melodic
Kinect v2

一.安装libfreenect2

安装依赖项

sudo apt-get install build-essential cmake pkg-config libturbojpeg libjpeg-turbo8-dev mesa-common-dev freeglut3-dev libxrandr-dev libxi-dev 
sudo apt-get install libglfw3-dev
sudo apt-get install libopenni2-dev
sudo apt-get install libopenni2-dev

安装libfreenect2

git clone https://github.com/OpenKinect/libfreenect2.git
cd libfreenect2
mkdir build 
cd build
cmake ..
make
sudo make install

设定udev rules:

sudo cp libfreenect2/platform/linux/udev/90-kinect2.rules /etc/udev/rules.d/
./bin/Protonect

二.安装OpenNI2

安装依赖

sudo apt-get install -y g++ python libusb-1.0-0-dev freeglut3-dev doxygen graphviz
sudo apt-get install libudev-dev
apt-cache search openni2
sudo apt-get install libopenni2-dev
pkg-config --modversion libopenni2

三.OpenNI2问题解决

测试NiViewer2时报错:

SimpleViewer: Device open failed:   
    DeviceOpen using default: no devices found
raise OpenNIError(res, msg.strip(), logfile)
openni.utils.OpenNIError: (OniStatus.ONI_STATUS_ERROR, 'DeviceOpen using default: no devices found', None)

解决办法:

$ sudo apt-get install openni2-utils

在freenect2/build目录下

$ sudo make install-openni2
$ NiViewer2
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值