Skip to content

i successfully run kinect v2 in ubuntu 20.04..here's how i did it : #1196

Open
@usama0300854

Description

@usama0300854

folks it took me fucking 3 days to sort the problem and guess what the problem was!!!

remove previous gcc-9 and g++-9 by :
sudo update-alternatives --remove gcc /usr/bin/gcc-9

you need to install gcc-7 and g++-7 :
sudo apt-get install gcc-7 g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 50
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 50
sudo update-alternatives --config gcc
sudo update-alternatives --config g++

!!! cuda 10.1 requires gcc-7 !!!

cuda should be : nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243

install all these :
sudo apt-get install build-essential cmake pkg-config -y # Build tools
sudo apt-get install libusb-1.0-0-dev
sudo apt-get install libturbojpeg0-dev -y
sudo apt-get install libglfw3-dev -y
sudo apt-get install libva-dev libjpeg-dev -y
sudo apt-get install libopenni2-dev -y

install cuda samples
wget http://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_418.87.00_linux.run

after file is downloaded run this :
sudo sh cuda_10.1.243_418.87.00_linux.run

Uncheck Driver, CUDA Toolkit 10.1, CUDA Demo Suite 10.1. CUDA Documentation 10.1 (only CUDA Samples 10.1 should be checked)

then nano ~/.bashrc
export CPATH=$CPATH:$HOME/NVIDIA_CUDA-10.1_Samples/common/inc

download libfreenect2:
git clone https://github.com/OpenKinect/libfreenect2.git
cd libfreenect2

open libfreenect2 in vscode because we need to edit few things :
24e33b0
https://github.com/OpenKinect/libfreenect2/pull/1182/commits
https://github.com/OpenKinect/libfreenect2/pull/1171/commits
05076a8

mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/freenect2
make
make install
sudo cp ../platform/linux/udev/90-kinect2.rules /etc/udev/rules.d/
./bin/Protonect (DONT USE SUDO)

i hope someone find this useful..thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions