You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+57-47Lines changed: 57 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,19 @@ Missing features:
16
16
17
17
Watch the OpenKinect wiki at www.openkinect.org and the mailing list at https://groups.google.com/forum/#!forum/openkinect for the latest developments and more information about the K4W2 USB protocol.
18
18
19
+
## Requirements
20
+
21
+
Supported operating systems:
22
+
* Windows 7 (buggy), Windows 8, Windows 8.1, and probably Windows 10
23
+
* Linux. Ubuntu and Debian are most well tested.
24
+
* Mac OS X
25
+
26
+
Virtual machines likely do not work, because USB 3.0 isochronous transfer is quite delicate.
27
+
28
+
The following minimum requirements must be met in order to enable the optional features:
29
+
* OpenGL depth processing: OpenGL 3.1 (Windows, Linux, Mac OS X). No OpenGL ES support at the moment.
30
+
* OpenCL depth processing: OpenCL 1.1
31
+
19
32
## FAQ
20
33
21
34
### Can I use the Kinect v2 without an USB3 port?
@@ -47,7 +60,11 @@ Messages in `dmesg` like this means bugs in the USB driver. Updating kernel migh
47
60
[ 509.238580] xhci_hcd 0000:03:00.0: Assuming host is dying, halting host.
48
61
```
49
62
50
-
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 ./Protonect | grep libusb` (shows `libusb-1.0` under `depends/`), and adjust your `LD_LIBRARY_PATH` if necessary.
63
+
Windows 7 does not have great USB 3.0 drivers. In our testing the above known working devices will stop working after running for a while. However, the official Kinect v2 SDK does not support Windows 7 at all, so there is still hope for Windows 7 users. Windows 8.1 and 10 have improved USB 3.0 drivers.
64
+
65
+
Diabling USB selective suspend/autosuspend might be helpful to ameliorate transfer problems.
66
+
67
+
When you report USB issues, please attach relevant debug log from running the program with environment variable `LIBUSB_DEBUG=4`, and relevant log from `dmesg`.
51
68
52
69
### I'm seeing the color camera stream, but no depth/IR (black windows).
53
70
@@ -71,27 +88,27 @@ If you're using an expansion card, make sure it's not plugged into an PCI-E x1 s
71
88
72
89
## Installation
73
90
74
-
This project uses the libusbx drivers and API. Setting things up varies by platform.
91
+
This project uses the libusb-1.0 drivers and API. Setting things up varies by platform.
75
92
76
93
### Windows / Visual Studio
77
94
78
95
#### libusbK driver
79
96
80
-
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.
97
+
You don't need the Kinect for Windows v2 SDK to build and install libfreenect2, though it doesn't hurt to have it too. You don't need to uninstall the SDK or the driver before doing this procedure.
81
98
82
-
Install the libusbK backend driver for libusbx:
99
+
Install the libusbK backend driver for libusb. Please follow the steps exactly:
83
100
84
101
1. Download Zadig from http://zadig.akeo.ie/.
85
-
2. Run Zadig and in options, check List All Devices and uncheck Ignore Hubs or Composite Parents
86
-
3. Select the Xbox NUI Sensor (composite parent) from the drop-down box. (Ignore the Interface 0 and Interface 2 varieties.) The current driver will list usbccgp. USB ID is VID 045E, PID 02C4.
87
-
4. Select libusbK (v3.0.6.0) from the replacement driver list.
88
-
5. Click the Replace Driver button. Click yes on the warning about replacing a system driver. (This is because it is a composite parent.)
102
+
2. Run Zadig and in options, check "List All Devices" and uncheck "Ignore Hubs or Composite Parents"
103
+
3. Select the "Xbox NUI Sensor (composite parent)" from the drop-down box. (Important: Ignore the "NuiSensor Adaptor" varieties, which are the adapter, NOT the Kinect) The current driver will list usbccgp. USB ID is VID 045E, PID 02C4 or 02D8.
104
+
4. Select libusbK (v3.0.7.0 or newer) from the replacement driver list.
105
+
5. Click the "Replace Driver" button. Click yes on the warning about replacing a system driver. (This is because it is a composite parent.)
89
106
6. Done.
90
107
91
108
To uninstall the libusbK driver (and get back the official SDK driver, if installed):
92
109
93
110
1. Open Device Manager
94
-
2. Under libusbK USB Devices, right click the "Xbox NUI Sensor (Composite Parent)" device and select uninstall.
111
+
2. Under "libusbK USB Devices" tree, right click the "Xbox NUI Sensor (Composite Parent)" device and select uninstall.
95
112
3. Important: Check the "Delete the driver software for this device." checkbox, then click OK.
96
113
97
114
If you already had the official SDK driver installed and you want to use it:
@@ -104,20 +121,12 @@ You can go back and forth between the SDK driver and the libusbK driver very qui
104
121
105
122
#### libusb
106
123
107
-
*Build from source (recommended)
108
-
```bash
124
+
*Open a Git shell, or any shell that has access to git.exe and msbuild.exe
git merge joshblake/winiso # patches for libusbK backend
127
+
.\install_libusb_vs2013.cmd
115
128
```
116
-
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.
117
-
118
-
* Pre-built binary
119
-
120
-
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.
129
+
Or `install_libusb_vs2015.cmd`. If you see some errors, you can always open the cmd files and follow the git commands, and maybe build `libusb_201x.sln` with Visual Studio by hand. Building with "Win32" is not recommended as it results in lower performance.
121
130
122
131
#### TurboJPEG
123
132
@@ -131,49 +140,43 @@ Joshua Blake provided a Debug version binary: https://www.dropbox.com/s/madoye1a
131
140
132
141
#### OpenCL
133
142
134
-
* 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.
143
+
* 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. You may need to download and install additional OpenCL runtime.
135
144
136
145
#### Build
137
146
138
147
```
139
148
mkdir build && cd build
140
-
cmake .. -G "Visual Studio 12 2013 Win64" -DCMAKE_INSTALL_PREFIX=.
Then you can run the program with `.\bin\Protonect.exe`. If DLLs are missing, you can copy them to the `bin` folder.
152
+
Or `-G "Visual Studio 14 2015 Win64"`. Then you can run the program with `.\install\bin\Protonect.exe`, or start debugging in Visual Studio. `RelWithDebInfo` provides debug symbols with release performance. The default installation path is `install`, you may change it by editing `CMAKE_INSTALL_PREFIX`.
145
153
146
154
### Mac OSX
147
155
148
-
Use your favorite package managers (brew, ports, etc.)
156
+
Use your favorite package managers (brew, ports, etc.) to install most if not all dependencies:
149
157
150
158
1.``cd`` into a directory where you want to keep libfreenect2 stuff in
151
-
1. Make sure these build tools are available: wget, git, cmake, pkg-config, automake, autoconf, libtool. Xcode may provide some of them. Install the rest via package managers.
152
-
1. Install dependencies: TurboJPEG, GLFW.
159
+
1. Make sure these build tools are available: wget, git, cmake, pkg-config. Xcode may provide some of them. Install the rest via package managers.
160
+
1. Install dependencies: libusb, TurboJPEG, GLFW.
153
161
154
162
```
155
163
brew update
164
+
brew install libusb
156
165
brew tap homebrew/science
157
166
brew install jpeg-turbo
158
167
brew tap homebrew/versions
159
168
brew install glfw3
160
169
```
161
170
162
-
Do not install libusb via package managers for libfreenect2. libfreenect2 includes an unreleased local version of libusb with USB3 specific patches. libfreenect2's libusb should still work fine in presence of a global version libusb.
171
+
It **is** now recommended to install libusb from package managers instead of building from source locally. Previously it was not recommended but that is no longer the case.
163
172
164
-
It is not recommended to build TurboJPEG from source, which produces corrupted results on Mac OSX according to reports. Install TurboJPEG binary only from package managers.
173
+
It is not recommended to build TurboJPEG from source, which may produce corrupted results on Mac OSX according to user reports. Install TurboJPEG binary only from package managers.
1. Install libusb. `sudo apt-get install libusb-1.0-0-dev`. The version must be >=1.0.20. You may use `sudo apt-add-repository ppa:floe/libusb` if version 1.0.20 is not available.
207
213
214
+
1. Install GLFW3. If `sudo apt-get install libglfw3-dev` is not available (e.g. Ubuntu trusty 14.04), you can download and install deb files from later Ubuntu releases:
215
+
216
+
```bash
208
217
cd libfreenect2/depends
209
218
sh install_ubuntu.sh
210
-
sudo dpkg -i libglfw3*_3.0.4-1_*.deb # Ubuntu 14.04 only
If you have Intel GPU, there is a serious GLSL bug with `libgl1-mesa-dri`. You are recommended but not required to update it to >=10.3 or newest using later releases or xorg-edgers ppa.
213
222
214
223
1. OpenCL dependency
224
+
* OpenCL ICD loader: if you have `ocl-icd-libopencl1` (provides libOpenCL.so) installed, you are recommended but not required to update it to 2.2.4+ using later releases. Early versions have a deadlock bug that may cause hanging.
215
225
* AMD GPU: Install the latest version of the AMD Catalyst drivers from https://support.amd.com and `apt-get install opencl-headers`.
216
-
* Nvidia GPU: Install the latest version of the Nvidia drivers, for example nvidia-346 from `ppa:xorg-edgers` and `apt-get install opencl-headers`.
217
-
* 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`.
226
+
* Nvidia GPU: Install the latest version of the Nvidia drivers, for example nvidia-346 from `ppa:xorg-edgers` and `apt-get install opencl-headers`. Make sure that `dpkg -S libOpenCL.so` shows `ocl-icd-libopencl1` instead of nvidia opencl packages which are incompatible with `opencl-headers`. CUDA toolkit is not required for OpenCL.
227
+
* 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`. Do not install `beignet` which has version 0.3.
218
228
219
229
1. Build the actual protonect executable
220
230
221
231
```
222
232
mkdir build && cd build
223
233
cmake ..
224
234
make
225
-
sudo make install
235
+
sudo make install # without sudo if cmake -DCMAKE_INSTALL_PREFIX=$HOME/...
0 commit comments