Wednesday, January 30, 2013

Install OpenNI(Kinect) on odroid-x2(ARM)

Install OpenNI

1. Download OpenNI source code(Version 1.5.4.0 - May 7th 2012)

    git clone https:// github.com/OpenNI/OpenNI.git -b unstable

2. Modify makefile

    vim /OpenNI/Platform/Linux/Build/Common/Platform.Arm
    Remove the “-mfloat-abi” 

3. Compile source code 

    cd /OpenNI/Platform/Linux/CreateRedist
    ./RedistMaker.Arm

4. Install OpenNI

    cd OpenNI/Platform/Linux/Redist
    sudo ./install.sh


Install SensorKinect(driver for kinect)

1. Download SensorKinect source code(Version 5.1.2.1 - May 15th 2012)

git clone git://github.com/avin2/SensorKinect.git


2. Modify makefile

  vim /SensorKinect/Platform/Linux/Build/Common/Platform.Arm
  Remove the “-mfloat-abi” 

3. Compile source code 

    cd /SensorKinect/Platform/Linux/CreateRedist
    ./RedistMaker.Arm

4. Install SensorKinect 


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
;UsbInterface=2
UsbInterface=1

There’s an edit required to a config file or else it will not select the correct USB port. Edit Config/GlobalDefaultsKinect.ini. 
  cd SensorKinect/Platform/Linux/Redist
  sudo ./install.sh

Testing

cd OpenNI/Platform/Linux/Redist/OpenNI-Bin-Dev-Linux-Arm-v1.5.4.0
cd Samples/Bin/Arm-Release
./Sample-NiSimpleRead