How to install a kinect with openni in MK802

Needed Hardware:

MK802 (1G)
SanDisk UltraMicro-SDHC 8GB-Class10-UHS1-30MB/s (TFcard)
A displayer or TV that support hdmi interface,mouse and keyboard(Mouse and keyboard are not needed after connect to WIFI,it could remote to operates SSH)
the process of install omitted

Lubuntu setups:

Install the img of miniand, methods at [Miniand]

> Lubuntu:1G 1080P or 512M 720P
> Note:It can not to changes the screen resolution of different img
> In addition:It’s slow to install the normal Ubuntu 12.04

The user name and password of miniand is sames with Lubuntu img: miniand
After finish connecting wifi,you could sign in SSH on windows or Mac. windows上可以putty 或者ssh client;mac 命令行 ssh -D 22 miniand@192.168.X.X

Prepare to install

execute:

{

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

}

now is wait ,you could also install through software manager

Install OpenNi

######First######

cd ~/
mkdir kinect
cd kinect
git clone git://github.com/OpenNI/OpenNI.git
cd OpenNI git checkout unstable
git checkout unstable is very important ,it need to pitching-in1.5.4.0 the newest branch .Next, it would be appear XnListT fault when install the driver in version of 1.5.2.X.Which version could be saw in README file.

Next,modify ‘/Platform/Linux/Build/Common/Platform.Arm’ (some configuration files needs to backup before modify. )

{

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

}

modify to:

{

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
end if

}

In fact,it’s delete the `-mfloat-abi=softfp`.

###### next to execute ######
cd ~/kinect/OpenNI/Platform/Linux/CreateRedist
modify `Redist_OpenNI.py`
modify ‘MAKE_ARGS += ‘ -j’ + calc_jobs_number()` to `MAKE_ARGS += ‘ -j1′`

After saw the Source Code you will konw why to do that.It’s the Returning Values problem of cale_jobs_number.
###### next to execute ######
./RedistMaker.Arm
After a while ,you will find a new catalogue named Redist in superior
###### execute ######
cd ~/kinect/OpenNI/Platform/Linux/Redist/OpenNI-Bin-Dev-Linux-Arm-v1.5.4.0
If the verson is lower than1.5.4.0 now,it would be you don’t pitching-in the newest branch when ‘git checkout unstable’.

sudo ./install.sh

##### End #####
Install driver

cd ~/kinect git clone git://github.com/avin2/SensorKinect.git
###### modify ######
`~/kinect/SensorKinect/Platform/Linux/Build/Common/Platform.Arm `

delete `-mfloat-abi=softfp`

###### continue to modify######
`/kinect/SensorKinect/Platform/Linux/CreateRedist/RedistMaker`
将 `make -j$(calc-jobs_number) -C ../Build` 一行改为 `make -j1 -C ../Build`

###### next to execute#######
cd ~/kinect/SensorKinect/Platform/Linux/CreateRedist
./RedistMaker

###### important step ######

cd ~/kinect/SensorKinect/Platform/Linux/Redist/Sensor-Bin-Linux-Arm-v5.1/Config/
sudo vi GlobalDefaultsKinect.ini
modify`;UsbInterface=2` into `UsbInterface=1`
Note:Not only modify’2′ into ’1′ but delete the annotation symbol:`;` .If not, it would be appear the fault that USB interface is not supported .

###### the last to execute######
cd ~/kinect/SensorKinect/Platform/Linux/Redist/Sensor-Bin-Linux-Arm-v5.1
sudo ./install.sh
Tip :

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 \*\*\*
#### Now success to install ####
Next:

cd ~/kinect/OpenNI/Platform/Linux/Redist/OpenNI-Bin-Dev-Linux-Arm-v1.5.4.0
cd Samples/Bin/Arm-Release ./Sample-NiSimpleRead
Now you could see the output of example.
Others:

means of verification for support the kinect hardwear:

you could see three devices of kinect after execute lsusb or could see the message of USB while execute dmesg after pull up kinect.

Reference links:

https://wiki.ubuntu.com/ARM/Server/Install
http://speculatrix.tumblr.com/post/23043561344/kinect-on-the-beagleboard-and-ubuntu
http://www.pansenti.com/wordpress/?page_id=1772
http://raymondlo84.blogspot.jp/2012/04/openni-kinect-android-40-tegra-2.html
http://www.andol.info/hci/1924.htm
http://blog.jozilla.net/2012/03/29/getting-up-and-running-with-the-kinect-in-ubuntu-12-04/

Advertisements

8 comments on “How to install a kinect with openni in MK802

  1. Hi I followed your instructions and installed kinect on mk802 but no success in visualizing the depth map.
    From your example seems to me that it’s working for you.
    Could you confirm it ?

  2. Hi, first thanks for the nice tutorial.
    I was testing this small pc for a collaboration with a choreographer, who wants to use several of them to control several kinects for a show.

    I followed all the instructions and tried a Sample to check the depth map which is not showing up (see following)

    miniand@miniand:~/kinect/OpenNI_unstable/Platform/Linux/Bin/Arm-Release$ ./Sample-NiSimpleRead
    Reading config from: ‘../../../../Data/SamplesConfig.xml’
    Warning: USB events thread – failed to set priority. This might cause loss of data…
    Frame 1 Middle point is: 0. FPS: 0.000000
    Frame 2 Middle point is: 0. FPS: 0.000000
    Frame 3 Middle point is: 0. FPS: 0.000000
    ….

    the
    “Warning: USB events thread – failed to set priority. This might cause loss of data…”
    disappears when run as root obviously

    I tried to found some more informations without that much success.
    I think this is really promising but I’m quite stuck.
    Would be great to have some suggestions/ pointer from your side.

    thanks in advance

  3. With havin so much content do you ever run into any issues of plagorism or copyright violation? My blog has a lot of unique content I’ve either written myself or outsourced but it seems a lot of it is popping it up all over the internet without my permission. Do you know any techniques to help protect against content from being stolen? I’d truly appreciate it.|

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s