Difference between revisions of "PCL/OpenNI troubleshooting"

From robotica.unileon.es
Jump to: navigation, search
m
m
Line 7: Line 7:
 
This page tries to cover all of the issues I ran into while trying to get my Kinect device ready for developing with PCL. If you have any questions regarding this subject or know of a different bug, feel free to send me an email describing it, and I will add it to this section. Just remember to try Google first!
 
This page tries to cover all of the issues I ran into while trying to get my Kinect device ready for developing with PCL. If you have any questions regarding this subject or know of a different bug, feel free to send me an email describing it, and I will add it to this section. Just remember to try Google first!
  
==No device found / No devices connected==
+
=No device found / No devices connected=
  
===Microsoft Kinect===
+
==Microsoft Kinect==
  
 
If your system does not seem to be able to use Kinect, despite it being correctly plugged and listed by <span style="color:#228B22">''lsusb''</span>, then you may have a problem with the installed drivers. I eventually discovered that, in 32-bit Ubuntu, it was necessary to downgrade <span style="color:#228B22">''openni-dev''</span> and <span style="color:#228B22">''ps-engine''</span> to versions 1.3.2.1 and 5.0.3.3 respectively, using your package manager.
 
If your system does not seem to be able to use Kinect, despite it being correctly plugged and listed by <span style="color:#228B22">''lsusb''</span>, then you may have a problem with the installed drivers. I eventually discovered that, in 32-bit Ubuntu, it was necessary to downgrade <span style="color:#228B22">''openni-dev''</span> and <span style="color:#228B22">''ps-engine''</span> to versions 1.3.2.1 and 5.0.3.3 respectively, using your package manager.
Line 17: Line 17:
 
[[Image:Synaptic_Kinect_lock.png|thumb|none|700px|Downgraded and locked ''openni-dev'' and ''ps-engine'' in Synaptic package manager.]]
 
[[Image:Synaptic_Kinect_lock.png|thumb|none|700px|Downgraded and locked ''openni-dev'' and ''ps-engine'' in Synaptic package manager.]]
  
===ASUS Xtion PRO===
+
==ASUS Xtion PRO==
  
 
In order to get our Xtion device working with OpenNI, we have to modify a configuration file:
 
In order to get our Xtion device working with OpenNI, we have to modify a configuration file:
Line 25: Line 25:
 
Find (<span style="color:#228B22">'''Ctrl+W'''</span>) the line that says <span style="color:#FF1493">";UsbInterface=2"</span> and uncomment it (remove the semicolon at the start). Save the file (<span style="color:#228B22">'''Ctrl+O'''</span>) and close (<span style="color:#228B22">'''Ctrl+X'''</span>). Reboot your computer, and you should be able to use your Xtion device with OpenNI/PCL. If you want to switch to a Kinect instead, you must change the value from 2 to 0 (or comment the line), or else you will get the same <span style="color:#FF1493">''"No devices connected"''</span> error.
 
Find (<span style="color:#228B22">'''Ctrl+W'''</span>) the line that says <span style="color:#FF1493">";UsbInterface=2"</span> and uncomment it (remove the semicolon at the start). Save the file (<span style="color:#228B22">'''Ctrl+O'''</span>) and close (<span style="color:#228B22">'''Ctrl+X'''</span>). Reboot your computer, and you should be able to use your Xtion device with OpenNI/PCL. If you want to switch to a Kinect instead, you must change the value from 2 to 0 (or comment the line), or else you will get the same <span style="color:#FF1493">''"No devices connected"''</span> error.
  
==Compiling OpenNI==
+
=Compiling OpenNI=
  
===glInit() not found / OpenGL isues===
+
==glInit() not found / OpenGL isues==
  
 
If you get this error while compiling OpenNI, and you are sure you have installed all dependencies, then this is due to faulty Makefiles that do not link against GL libraries where they should.
 
If you get this error while compiling OpenNI, and you are sure you have installed all dependencies, then this is due to faulty Makefiles that do not link against GL libraries where they should.
Line 41: Line 41:
 
The samples should now compile.
 
The samples should now compile.
  
===Permission denied===
+
==Permission denied==
  
 
If you get this error related to some header (.h) in <span style="color:#FF8C00">''/usr/include/''</span>, it means that OpenNI's installer has given the wrong permissions when moving files there, and the compiler can not access them. Locate the faulty file and change its permissions to allow reading for everyone:
 
If you get this error related to some header (.h) in <span style="color:#FF8C00">''/usr/include/''</span>, it means that OpenNI's installer has given the wrong permissions when moving files there, and the compiler can not access them. Locate the faulty file and change its permissions to allow reading for everyone:

Revision as of 10:24, 26 November 2013

Go to root: PhD-3D-Object-Tracking




This page tries to cover all of the issues I ran into while trying to get my Kinect device ready for developing with PCL. If you have any questions regarding this subject or know of a different bug, feel free to send me an email describing it, and I will add it to this section. Just remember to try Google first!

No device found / No devices connected

Microsoft Kinect

If your system does not seem to be able to use Kinect, despite it being correctly plugged and listed by lsusb, then you may have a problem with the installed drivers. I eventually discovered that, in 32-bit Ubuntu, it was necessary to downgrade openni-dev and ps-engine to versions 1.3.2.1 and 5.0.3.3 respectively, using your package manager.

If you use Synaptic, the instructions are simple. Select both mentioned packages, press Ctrl+E to choose the desired version you want installed, and then apply the changes, accepting to overwrite any files. Then, to prevent them from being restored in the next upgrade, select each and click the "Lock Version" option in the "Package" menu. The packages will then be picked up by the "Status: Pinned" filter on the left. Reboot, and everything should be working now.

Downgraded and locked openni-dev and ps-engine in Synaptic package manager.

ASUS Xtion PRO

In order to get our Xtion device working with OpenNI, we have to modify a configuration file:

sudo nano /etc/openni/GlobalDefaults.ini

Find (Ctrl+W) the line that says ";UsbInterface=2" and uncomment it (remove the semicolon at the start). Save the file (Ctrl+O) and close (Ctrl+X). Reboot your computer, and you should be able to use your Xtion device with OpenNI/PCL. If you want to switch to a Kinect instead, you must change the value from 2 to 0 (or comment the line), or else you will get the same "No devices connected" error.

Compiling OpenNI

glInit() not found / OpenGL isues

If you get this error while compiling OpenNI, and you are sure you have installed all dependencies, then this is due to faulty Makefiles that do not link against GL libraries where they should.

Go to the Platform/Linux/Build/Samples/ subdirectory and find the samples that are giving errors (look at the compiler output to find them). For each one, enter its subdirectory and open the Makefile you will find there. Go to the line that says:

USED_LIBS += glut

And change it to the following:

USED_LIBS += glut GL

The samples should now compile.

Permission denied

If you get this error related to some header (.h) in /usr/include/, it means that OpenNI's installer has given the wrong permissions when moving files there, and the compiler can not access them. Locate the faulty file and change its permissions to allow reading for everyone:

sudo chmod +r -R /usr/include/<file>




Go to root: PhD-3D-Object-Tracking

Links to articles:

PCL/OpenNI tutorial 1: First steps

PCL/OpenNI tutorial 2: Cloud processing (basic)

PCL/OpenNI tutorial 3: Cloud processing (advanced)

PCL/OpenNI tutorial 4: 3D object recognition (descriptors)

PCL/OpenNI tutorial 5: 3D object recognition (detection and pose estimation)

PCL/OpenNI troubleshooting