Install Kinect drivers on TrimSlice Pro

本文提供了Kinect在Arm Linux系统上安装的具体步骤。包括下载并安装OpenNI及Sensor模块,配置编译参数以匹配Arm架构,并解决安装过程中可能出现的问题。

TrimSlice Pro was delivered finally, it is preinstalled ubuntu 11.04. I hurried to get the Kinect working on the Arm Linux this weekend. I installed the official drivers, although it is regretful that NITE cannot be run without SSE support.

(1) mkdir ~/kinect, download the latest OpenNI (Version 1.3.2.3 unstable version for now) into that folder, and untar it.

https://github.com/OpenNI/OpenNI/tree/unstable

(2) According to the README file, install the requirements. Please note that sun-java6-jdk has been removed from the official repository. I found a external PPA, but it doesn't work for me. So I install the Openjdk-6-jdk instead. The remaining requirements should be installed easily.

(3) Don't build OpenNI at the moment. Firstly revise the Platform.Arm file in ~/kinect/OpenNI_DIR/Platform/Linux-x86/Build/Common. Otherwise, on one hand, you will fail to compile due to the first line, where I trapped for a whole day to configure the angtrom. On the other hand, the cpu by default may be not matched with your own with error as below, when you finished running sudo ./install.sh and launched an application for test.

"One or more of the following nodes could not be enumerated:
Device: PrimeSense/SensorV2/5.0.0.24: The device is not connected!"

For the first issue, it can be fixed by commenting out the first line. We don't need it on the native machine. And reconfigure the ARM options for the second one. It looks like

# export CXX=/home/primesense/DiGMi/BeagleBoard/Kernel/OE/angstrom-dev/cross/armv7a/bin/arm-angstrom-linux-gnueabi-g++
export GLES=1

ifeq "$(CFG)" "Release"
# CFLAGS += -mcpu=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -ffast-math -fsingle-precision-constant
   CFLAGS += -mcpu=cortex-a9 -mfpu=vfpv3-d16 -ftree-vectorize -mfloat-abi=softfp -ffast-math -fsingle-precision-constant
endif

For -mfpu option, you can find it by typing cat /proc/cpuinfo in the terminal.

(4) Now enter ~/kinect/OpenNI_DIR/Platform/Linux-x86/CreateRedist/, run ./RedistMaker Arm or ./RedistMaker.Arm

(5) A Redist directory will be produced in ~/kinect/OpenNI_DIR/Platform/Linux-x86/. Run sudo ./install.sh

(6) Install the sensor modul from https://github.com/avin2/SensorKinect

Important note: Don't use the sensor module from the official website. Although the driver seems to be installed normally, you will get nothing when you launch an application in the Sample directory.

(7) The requirements should already be installed when compiling the OpenNI. The same revision is done for the Platform.Arm file in ~/kinect/Sensor_DIR/Platform/Linux-x86/Build/Common.

(8) Enter ~/kinect/Sensor_DIR/Platform/Linux-x86/CreateRedist/, run ./RedistMaker Arm.

(9) Enter ~/kinect/Sensor_DIR/Platform/Linux-x86/Redist, run sudo ./install.sh.

(10) Enter ~/kinect/OpenNI_DIR/Platform/Linux-x86/Redist/Samples/Bin/Release, run sudo ./org.OpenNI.Samples.SimpleViewer.

Because NiViewer is removed from the Samples, I'm not sure if the color camera works.

(11) Enjoy it.

Reference

  1. http://davetaz-blog.blogspot.com/2011/03/installing-kinect-on-ubuntu-full-guide.html
  2. http://tirokartblog.wordpress.com/2011/01/22/kinect-on-the-beagleboard-xm-not-working-yet/
  3. http://groups.google.com/group/openni-dev/browse_thread/thread/848487b8857bb668

转载于:https://www.cnblogs.com/JohnShao/archive/2011/10/11/2204853.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值