Public bug reported:

The makefiles in /usr/share/doc/libopenni2-dev don't quite work.
The workaround is easy:

sudo apt install libopenni2-dev
cp -a /usr/share/doc/libopenni2-dev .
cd libopenni2-dev/examples/Samples/SimpleRead
g++ main.cpp `pkg-config --cflags --libs libopenni2` -I ../Common
./a.out

The End.

--------------------

p.s.

Here's why I tried building the samples, in case it helps anyone later.

I was having trouble using an Asus Xtion depth camera with ubuntu 16.04 on a
particular, rather new machine, a Dell 3620 minitower.

To reproduce, make sure current user is in video group with 'id'
(because /lib/udev/rules.d/60-libopenni2-0.rules makes the device writable for 
that group),
then run any openni2 program, e.g. the sample above.

With no camera plugged in, this fails as expected with
Couldn't open device
        DeviceOpen using default: no devices found

With an Asus camera plugged in, good systems succeed, and print lots of stuff.
On the bad system, it fails with
Couldn't open device
        Could not open "1d27/0600@1/24": Failed to set USB interface!

The smoking gun was the output of dmesg, which said

[10663.793029] usb 1-9: new high-speed USB device number 58 using xhci_hcd
[10663.924607] usb 1-9: New USB device found, idVendor=1d27, idProduct=0600
[10663.924614] usb 1-9: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[10663.924618] usb 1-9: Product: PrimeSense Device
[10663.924622] usb 1-9: Manufacturer: PrimeSense
[10663.925374] usb 1-9: Not enough bandwidth for new device state.
[10663.925391] usb 1-9: can't set config #1, error -28

which suggests the camera needed a firmware upgrade per
https://github.com/nh2/asus-xtion-fix
or
http://askubuntu.com/questions/276425/asus-xtion-pro-live-not-working-with-xhci-hcd
The official firmware appears to have moved to
http://dlcdnet.asus.com/pub/ASUS/MM/Xtion_Pro/FWUpdate_5_8_22.zip
dated Nov 5 2013. sha1sum is
440dd2323014af18e49824b64424ad4670720da9 FWUpdate_5_8_22.zip

The update won't work unless your windows box has their openni2 installed; 
that's
downloadable from their Xtion Pro Live support area, direct link
http://dlcdnet.asus.com/pub/ASUS/MM/Xtion_Pro/V1164_1202.zip
dated Dec 18 2013, sha1sum is
9b9ad01de33b2e2b821b02e553f690ebf9fc37ed  V1164_1202.zip

Those two files worked for me, and resolved the problem that made me want to 
build
the openni2 sample.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: libopenni2-dev 2.2.0.33+dfsg-6
ProcVersionSignature: Ubuntu 4.4.0-53.74-generic 4.4.30
Uname: Linux 4.4.0-53-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.4
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Dec 19 12:34:39 2016
SourcePackage: openni2
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: openni2 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug xenial

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1651283

Title:
  openni2 sample makefiles need adjusting

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openni2/+bug/1651283/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to