Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
usama0300854 opened this issue Aug 6, 2024 · 0 comments
Open

Comments

@usama0300854
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant