Skip to content

Commit f11841a

Browse files
committed
Merge pull request #279 from xlz/docs
Documentation update
2 parents c7e2042 + a02aa08 commit f11841a

File tree

1 file changed

+72
-5
lines changed

1 file changed

+72
-5
lines changed

README.md

Lines changed: 72 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ No. It's a pure USB3 device due to the high bandwidth requirements.
2626

2727
Either your device is connected to an USB2-only port (see above), or you don't have permissions to access the device. On Linux, try running Protonect as root (e.g. using `sudo`). If that fixes things, place `rules/90-kinect2.rules` into `/etc/udev/rules.d/` and re-plug the device.
2828

29+
On Linux, also check `dmesg`. If there are warnings like `usb 4-1.1: Not enough bandwidth for new device state.` it means the hardware does not have the capacity for USB3 even if it claims so, or its capacity is not well supported.
30+
2931
On Mac OS X, open "System Information" from Spotlight, go to the USB section, and verify "Xbox NUI Sensor" is under "USB 3.0 SuperSpeed Bus" not "High-Speed Bus". If this is not the case, try unplugging the Kinect from power source with the USB cable connected, and plug the power again, then verify.
3032

3133
### I'm getting lots of USB transfer errors, and/or only blank windows.
@@ -37,6 +39,13 @@ USB3 as a whole is a flaky thing. If you're running Linux, try upgrading to a re
3739

3840
Probably not working:
3941
* ASMedia Technology Inc. Device 1142
42+
* ASMedia Technology Inc. ASM1042
43+
44+
Messages in `dmesg` like this means bugs in the USB driver. Updating kernel might help.
45+
```
46+
[ 509.238571] xhci_hcd 0000:03:00.0: xHCI host not responding to stop endpoint command.
47+
[ 509.238580] xhci_hcd 0000:03:00.0: Assuming host is dying, halting host.
48+
```
4049

4150
Finally, it's also possible that your executable is not actually using the patched libusb from the depends/ folder which is required at the moment. Check this using `ldd | grep libusb` (shows libusb-1.0 under `depends/`), and adjust your `LD_LIBRARY_PATH` if necessary.
4251

@@ -54,7 +63,9 @@ The depth packet processor runs on OpenGL by default. You can try alternatives,
5463

5564
This project uses the libusbx drivers and API. Setting things up varies by platform.
5665

57-
### Windows
66+
### Windows / Visual Studio
67+
68+
#### libusbK driver
5869

5970
If you have the Kinect for Windows v2 SDK, install it first. You don't need to uninstall the SDK or the driver before doing this procedure.
6071

@@ -81,6 +92,54 @@ This will enumerate the Kinect sensor again and it will pick up the K4W2 SDK dri
8192

8293
You can go back and forth between the SDK driver and the libusbK driver very quickly and easily with these steps.
8394

95+
#### libusb
96+
97+
* Build from source (recommended)
98+
```bash
99+
cd depends/
100+
git clone https://github.com/libusb/libusb.git
101+
cd libusb
102+
git remote add joshblake https://github.com/JoshBlake/libusbx.git
103+
git fetch joshblake
104+
git merge joshblake/winiso # patches for libusbK backend
105+
```
106+
Open `libusb/msvc/libusb_2013.sln` with Visual Studio 2013 (or older version, accordingly), set configurations to "Release x64", and build "libusb-1.0 (dll)". You can clone the libusb repo to somewhere else, but you will need to set environment variable `LibUSB_ROOT` to that path. Building with "Win32" is not recommended as it results in lower performance.
107+
108+
* Pre-built binary
109+
110+
Joshua Blake provided a Debug version binary: https://www.dropbox.com/s/madoye1ayaoajet/libusbx-winiso.zip. Install it as `depends/libusbx`. This version was built in 2013.
111+
112+
#### TurboJPEG
113+
114+
* Download from http://sourceforge.net/projects/libjpeg-turbo/files
115+
* Extract it to the default path (`c:\libjpeg-turbo64`), or as `depends/libjpeg-turbo64`, or anywhere as long as the environment variable `TurboJPEG_ROOT` is set to installed path.
116+
117+
#### GLFW
118+
119+
* Download 64-bit Windows binaries from http://www.glfw.org/download.html
120+
* Extract it as `depends/glfw` (rename `glfw-3.x.x.bin.WIN64` to glfw), or anywhere as long as the environment variable `GLFW_ROOT` is set to the installed path.
121+
122+
#### OpenCV
123+
124+
* Download the installer from http://sourceforge.net/projects/opencvlibrary/files/opencv-win
125+
* Extract it anywhere (maybe also in `depends`)
126+
127+
#### OpenCL
128+
129+
* Intel GPU: Download `intel_sdk_for_ocl_applications_2014_x64_setup.msi` from http://www.softpedia.com/get/Programming/SDK-DDK/Intel-SDK-for-OpenCL-Applications.shtml (SDK official download is replaced by $$$ and no longer available) and install it. Then verify `INTELOCLSDKROOT` is set as an environment variable.
130+
131+
#### Build
132+
133+
You need to specify the location of OpenCV installation in `OpenCV_DIR`.
134+
```
135+
cd example\protonect
136+
mkdir build && cd build
137+
cmake .. -G "Visual Studio 12 2013 Win64" -DCMAKE_INSTALL_PREFIX=. -DOpenCV_DIR=%cd%\..\..\..\depends\opencv\build
138+
cmake --build . --config Release --target install
139+
```
140+
141+
Then you can run the program with `.\bin\Protonect.exe`. If DLLs are missing, you can copy them to the `bin` folder.
142+
84143
### Mac OSX
85144

86145
1. ``cd`` into a directory where you want to keep libfreenect2 stuff in
@@ -90,6 +149,8 @@ You can go back and forth between the SDK driver and the libusbK driver very qui
90149
brew update
91150
brew tap homebrew/science
92151
brew install opencv git nasm wget jpeg-turbo
152+
brew tap homebrew/versions
153+
brew install glfw3
93154
```
94155

95156
1. Download the libfreenect2 repository
@@ -102,7 +163,6 @@ git clone [email protected]:OpenKinect/libfreenect2.git
102163

103164
```
104165
cd ./libfreenect2
105-
ln -s /usr/local/opt/jpeg-turbo depends/libjpeg_turbo
106166
sh ./depends/install_mac.sh
107167
```
108168

@@ -120,7 +180,7 @@ make && make install
120180
./bin/Protonect
121181
```
122182

123-
### Ubuntu 14.04 (perhaps earlier)
183+
### Debian/Ubuntu 14.04 (perhaps earlier)
124184

125185
1. Install libfreenect2
126186

@@ -130,14 +190,21 @@ git clone https://github.com/OpenKinect/libfreenect2.git
130190

131191
1. Install a bunch of dependencies
132192

133-
```
193+
```bash
134194
sudo apt-get install build-essential libjpeg-turbo8-dev libtool autoconf libudev-dev cmake mesa-common-dev freeglut3-dev libxrandr-dev doxygen libxi-dev libopencv-dev automake
195+
# sudo apt-get install libturbojpeg0-dev (Debian)
135196

136197
cd libfreenect2/depends
137198
sh install_ubuntu.sh
138-
sudo dpkg -i libglfw3*_3.0.4-1_*.deb
199+
sudo dpkg -i libglfw3*_3.0.4-1_*.deb # Ubuntu 14.04 only
200+
# sudo apt-get install libglfw3-dev (Debian/Ubuntu 14.10+:)
139201
```
140202

203+
1. OpenCL dependency
204+
* AMD GPU: Install the latest version of the AMD Catalyst drivers from https://support.amd.com and `apt-get install opencl-headers`.
205+
* Nvidia GPU: Install the latest version of the Nvidia drivers, for example nvidia-346 from `ppa:xorg-edgers` and `apt-get install opencl-headers`.
206+
* Intel GPU (kernel 3.16+ recommended): Install beignet-dev 1.0+, `apt-get install beignet-dev`. If not available, use this ppa `sudo apt-add-repository ppa:pmjdebruijn/beignet-testing`.
207+
141208
1. Build the actual protonect executable
142209

143210
```

0 commit comments

Comments
 (0)