Important Note
SyntroKinect and the Kinect infrastructure use a significant amount of processing power and, while it can be used on the BeagleBoard-xM and Pandaboard, performance can be quite poor.
Prerequisites
These instructions have been tested for Ubuntu 12.04 loaded from here. Select the appropriate Texas Instruments OMAP3 (BeagleBoard-xM) or OMAP4 (PandaBoard).
The Kinect driver and middleware need to be built from source and there are some packages required. Enter:
sudo apt-get update sudo apt-get install gcc-multilib libusb-1.0.0-dev git-core build-essential sudo apt-get install doxygen graphviz default-jdk freeglut3-dev libopencv-dev
Installing OpenNI
Download the latest unstable version of the OpenNI software from GitHub:
cd ~/ mkdir kinect cd kinect git clone git://github.com/OpenNI/OpenNI.git cd OpenNI git checkout unstable
Take a look at the README. This should say that the version is at least 1.5.4.0.
The software is set up for software floating point but the Ubuntu has been compiled for hardware floating point. So, the compiler flags need to be modified. To do this, enter:
cd Platform/Linux/Build
Edit Common/Platform.Arm. The original looks like this:
ifeq "$(CFG)" "Release" # Hardware specifying flags CFLAGS += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp #-mcpu=cortex-a8 # Optimization level, minus currently buggy optimizing methods (which break bit-exact) CFLAGS += -O3 -fno-tree-pre -fno-strict-aliasing # More optimization flags CFLAGS += -ftree-vectorize -ffast-math -funsafe-math-optimizations -fsingle-precision-constant endif
Remove the “-mfloat-abi” so that it looks like this:
ifeq "$(CFG)" "Release" # Hardware specifying flags CFLAGS += -march=armv7-a -mtune=cortex-a8 -mfpu=neon #-mcpu=cortex-a8 # Optimization level, minus currently buggy optimizing methods (which break bit-exact) CFLAGS += -O3 -fno-tree-pre -fno-strict-aliasing # More optimization flags CFLAGS += -ftree-vectorize -ffast-math -funsafe-math-optimizations -fsingle-precision-constant endif
To build, enter the following:
cd ~/kinect/OpenNI/Platform/Linux/CreateRedist ./RedistMaker.Arm
It’s possible that this will result in an error because MAKE_ARGS includes “-j0″ which is illegal. If this occurs, edit Redist_OpenNI.py and find the line that looks like:
MAKE_ARGS += ' -j' + calc_jobs_number()
and change it to
MAKE_ARGS += ' -j1'
This will build the OpenNI binaries and create a folder called Redist. So enter the following to install:
cd ~/kinect/OpenNI/Platform/Linux/Redist/OpenNI-Bin-Dev-Linux-Arm-v1.5.4.0 sudo ./install.sh
The version number in the path may need to be changed to reflect whatever is the current version.
Installing the Driver
Download the source code like this:
cd ~/kinect git clone git://github.com/avin2/SensorKinect.git
The software floating point option has to be turned off. Enter this:
cd ~/kinect/SensorKinect/Platform/Linux/Build/Common
Edit the Platform.Arm file to remove the “-mfloat-abi” option as for OpenNI.
To build, enter:
cd ~/kinect/SensorKinect/Platform/Linux/CreateRedist ./RedistMaker
This will build the driver and create a Redist folder. Enter this:
cd ~/kinect/SensorKinect/Platform/Linux/Redist/Sensor-Bin-Linux-Arm-v5.1.2.1
There’s an edit required to a config file or else it will not select the correct USB port. Edit Config/GlobalDefaultsKinect.ini. There’ll be a line that looks like:
;UsbInterface=2
Change this line to be:
UsbInterface=1
Note that the line has been uncommented and the interface has been changed from 2 to 1. Now the driver can be installed. Enter:
sudo ./install.sh
Testing
It’s worth trying to run a sample to see if this has worked. Enter:
cd ~/kinect/OpenNI/Platform/Linux/Redist/OpenNI-Bin-Dev-Linux-Arm-v1.5.4.0 cd Samples/Bin/Arm-Release ./Sample-NiSimpleRead
This should result in a series of values being displayed which vary if something is waved in front of the Kinect. In principle, it should also be possible to run:
java -jar org.OpenNI.Samples.SimpleViewer.jar
but this crashes at the moment. Non-GUI samples seem to work though.
It’s possible that the “gspca_kinect” problem will cause the sample not to see the Kinect. If the sample doesn’t run, enter:
sudo rmmod gspca_kinect
and try again. It looks like the driver install blacklists this module so an alternative would just be to restart the BeagleBoard or PandaBoard.
'UTIL' 카테고리의 다른 글
Linaro Android 4.0.4 and OpenNI (0) | 2013.06.08 |
---|---|
비글보드(beagleboard) (0) | 2013.06.08 |
OpenNI/NITE & kinect 드라이버 설치 및 테스트 (키넥트 개발 Open Kinect 코리아 커뮤니티) (7) | 2013.06.08 |
kinect on android (0) | 2013.06.06 |
키넥트 안드로이드 연결 (2) | 2013.06.03 |