- I have installed CUDA 8.0.44 (download here)
- CUDA proposes different ways of installation
- A .run file, and a .deb file
- I am currently using the .run file (local version)
- Follow the steps in the install guide with great care (as the CUDA install can be very tricky)
- After this the CUDA samples and Infinitam compile fine
- Clone Infinitam from here
- Follow the steps from the ReadMe.md on github
- From the created build folder
cmake ../InfiniTAM -DOPEN_NI_ROOT=/home/arennuit/Tools/AsusXtion/OpenNI2/
- If cmake complains about missing GLUT libraries (GLUT_Xi_LIBRARY and GLUT_Xmu_LIBRARY)
sudo apt-get install libxmu-dev libxi-dev
(more info here)
- At this point use ccmake check that cmake is pointing to the right version of OpenNI (which should be OpenNI2)
- ccmake ../InfiniTAM
- press 't' to toggle to the advatnced mode
- check cmake variables OpenNI_LIBRARY (there are 3 OpenNI variables)
- cmake has a tendency to choose old OpenNI 1 path in /usr/lib or /usr/local/lib (the error is described here)
- change the value of OpenNI_LIBRARY to where it should point to
- configure with 'c' and regenerate with 'g'
- run cmake ../InfiniTAM
- test using sudo ./Infinitam
- without sudo we get
Warning: USB events thread - failed to set priority. This might cause loss of data
- sudo is required to set the USB async priority thread to critical
- Also it can happen that the camera is not detected
- we get cout messages stalling at trying OpenNI device: <OpenNI default device>
- or at OpenNI: Initialization ...
- and ctrl+c may not work
- in this case change USB port and restart (from a new terminal?)
NOTE: in my situation (but it seems to only occur in some specific configurations) there is a USB bandwidth problem. Even though the RGB data is not used in the registration it is streamed over USB. And in some configurations the USB is a bottleneck.
A workaround is to ask for a reduced resolution RGB image. This can be done by modifying the constructor in file InfiniTAM/InfiniTAM/Engine/OpenNIEngine.h and replacing
imageSize_rgb = Vector2i(, ) by imageSize_rgb = Vector2i(320, 240). More details in this issue.