我一直在試圖讓libfreenect2庫啓動並運行在我的Windows 10機器上,並且遇到了一個我無法過去的問題。我已經建立了圖書館,這是一些例子。我遇到的問題是當我去運行「Protonect」示例代碼時。我得到的輸出列示如下:Libfreenect2 USB連接失敗
$ ./install/bin/Protonect.exe
Version: 0.2.0
Environment variables: LOGFILE=<protonect.log>
Usage: U:\Repositories\libfreenect2\build\install\bin\Protonect.exe [-gpu=<id>] [gl | cl | clkde | cuda | cudakde | cpu] [<device serial>]
[-noviewer] [-norgb | -nodepth] [-help] [-version]
[-frames <number of frames to process>]
To pause and unpause: pkill -USR1 Protonect
[Info] [Freenect2Impl] enumerating devices...
[Info] [Freenect2Impl] 8 usb devices connected
[Info] [Freenect2Impl] found valid Kinect v2 @12:2 with serial 003370163847
[Info] [Freenect2Impl] found 1 devices
Pipeline Not-Used
libusb_open returned: -99
BLAH BLAH BLAH
[Error] [Freenect2Impl] failed to open Kinect v2: @12:2 LIBUSB_ERROR_OTHER Other error
failure opening device!
請忽略「BLAH BLAH BLAH」我使用的是作爲print語句調試。我想我已經查明問題下降到的libusb庫core.c文件libusb_open()函數本節的所有方式:
r = usbi_backend->open(_dev_handle);
if (r < 0) {
usbi_dbg("open %d.%d returns %d", dev->bus_number, dev->device_address, r);
libusb_unref_device(dev);
usbi_mutex_destroy(&_dev_handle->lock);
free(_dev_handle);
return r;
}
我找不到錯誤代碼-99東西,這樣是我的調試結束。從我的理解看來,示例代碼由於某種原因無法將USB設備打開到Kinect。
我已經用Kinect Studio使用Windows SDK測試了Kinect Studio,並且在拾取Kinect Feed時沒有問題。有沒有人遇到過這個問題,你是如何解決它的?對於錯誤代碼意味着什麼或者我如何解決USB開放問題有什麼建議?