- https://github.com/OpenKinect/libfreenect2 を使うとkinect2が読めるらしい
- BRIXでテスト
$ lsusb -t
2-5:1.0: No such file or directory
2-5:1.1: No such file or directory
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
|__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/8p, 480M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
|__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/6p, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
|__ Port 5: Dev 2, If 0, Class=vend., Driver=, 5000M
|__ Port 5: Dev 2, If 1, Class=vend., Driver=, 5000M
|__ Port 5: Dev 2, If 2, Class=audio, Driver=snd-usb-audio, 5000M
|__ Port 5: Dev 2, If 3, Class=audio, Driver=snd-usb-audio, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
|__ Port 1: Dev 2, If 0, Class=HID, Driver=usbhid, 1.5M
|__ Port 1: Dev 2, If 1, Class=HID, Driver=usbhid, 1.5M
|__ Port 9: Dev 3, If 0, Class='bInterfaceClass 0xe0 not yet handled', Driver=btusb, 12M
|__ Port 9: Dev 3, If 1, Class='bInterfaceClass 0xe0 not yet handled', Driver=btusb, 12M
git clone https://github.com/OpenKinect/libfreenect2.git
sudo aptitude install libudev-dev autoconf
cd libfreenect2/dependes
./install_ubuntu.sh
cd ../examples/protonect
mkdir build
cd build
cmake ..
make
cd ../bin
sudo ./Protonect
Protonectの出力
Using libusbx v1.0.17.10852
Opening device 045E:02C4...
speed: 5000 Mbit/s (USB SuperSpeed)
active configuration: 1, err: 0
Claiming interface 0...
Claiming interface 1...
running kinect...
Control transfer 1 - set isoch delay
Control transfer 2 - set sel u1/u2
Setting interface alt setting...
Setting stream status: Disable
Control transfer 3 - enable u1
Control transfer 4 - enable u2
Control transfer 5 - set feature 768
Setting sensor status: Disable
Kinect init done
iso max_packet_size: 33792
speed: 5000 Mbit/s (USB SuperSpeed)
running kinect...
Setting sensor status: Enable
===
Cmd seq 0 func 0x02 (0)
Cmd sent, 20 bytes sent
Cmd response seq 0 func 0x02 (0)
Cmd response success, 512 bytes received
Received cmd data 0x02 (0), length: 512
Cmd response seq 0 func 0x02 (0)
Cmd response success, 16 bytes received
Cmd response completed
Response complete for cmd 0x02 (0)
dumping 512 bytes of raw data from command KCMD_READ_DATA1:
0x0000: 01 00 01 00 5a 0b 00 00 00 00 00 00 00 00 00 00 ....Z...........
0x0010: 03 00 02 00 47 0f 00 00 00 00 00 00 00 00 00 00 ....G...........
0x0020: 03 00 02 00 47 0f 00 00 00 00 00 00 00 00 00 00 ....G...........
0x0030: 03 00 02 00 47 0f 00 00 00 00 00 00 00 00 00 00 ....G...........
0x0040: 01 00 01 00 5a 0b 00 00 00 00 00 00 00 00 00 00 ....Z...........
0x0050: 03 00 02 00 47 0f 00 00 00 00 00 00 00 00 00 00 ....G...........
0x0060: 03 00 02 00 47 0f 00 00 00 00 00 00 00 00 00 00 ....G...........
0x0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x00f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x01a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x01b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x01c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x01d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x01e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x01f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
===
Cmd seq 1 func 0x14 (0)
Cmd sent, 20 bytes sent
Cmd response seq 1 func 0x14 (0)
Cmd response success, 92 bytes received
Received cmd data 0x14 (0), length: 92
Cmd response seq 1 func 0x14 (0)
Cmd response success, 16 bytes received
Cmd response completed
Response complete for cmd 0x14 (0)
dumping 92 bytes of raw data from command KCMD_READ_VERSIONS:
0x0000: 00 00 12 00 00 00 00 00 01 00 00 00 43 c1 1f 41 ............C..A
0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0020: 0a 21 33 55 c2 00 17 20 00 08 00 00 10 00 00 00 .!3U... ........
0x0030: 00 01 00 00 00 10 00 00 00 00 80 00 01 00 00 00 ................
0x0040: 31 33 00 00 00 04 13 08 47 48 56 30 34 36 2e 31 13......GHV046.1
0x0050: 58 00 00 00 00 00 00 00 07 00 00 00 X...........
===
Cmd seq 2 func 0x22 (0x1)
Cmd sent, 24 bytes sent
Cmd response seq 2 func 0x22 (0x1)
Cmd response success, 128 bytes received
Received cmd data 0x22 (0x1), length: 128
Cmd response seq 2 func 0x22 (0x1)
Cmd response success, 16 bytes received
Cmd response completed
Response complete for cmd 0x22 (0x1)
dumping 128 bytes of raw data from command KCMD_READ_DATA_PAGE 0x01:
0x0000: 30 00 33 00 30 00 39 00 33 00 34 00 32 00 33 00 0.3.0.9.3.4.2.3.
0x0010: 34 00 34 00 34 00 37 00 00 00 00 00 00 00 00 00 4.4.4.7.........
0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
===
Cmd seq 3 func 0x22 (0x3)
Cmd sent, 24 bytes sent
Cmd response seq 3 func 0x22 (0x3)
Cmd response success, 92 bytes received
Received cmd data 0x22 (0x3), length: 92
Cmd response seq 3 func 0x22 (0x3)
Cmd response success, 16 bytes received
Cmd response completed
Response complete for cmd 0x22 (0x3)
depth camera intrinsic parameters: fx 367.370605, fy 367.370605, cx 259.909302, cy 205.405197
depth camera radial distortion coeffs: k1 0.089520, k2 -0.270181, p1 0.000000, p2 0.000000, k3 0.096016
===
Cmd seq 4 func 0x22 (0x2)
Cmd sent, 24 bytes sent
Cmd response seq 4 func 0x22 (0x2)
Cmd response success, 1302878 bytes received
Received cmd data 0x22 (0x2), length: 1302878
Cmd response seq 4 func 0x22 (0x2)
Cmd response success, 16 bytes received
Cmd response completed
Response complete for cmd 0x22 (0x2)
===
Cmd seq 5 func 0x22 (0x4)
Cmd sent, 24 bytes sent
Cmd response seq 5 func 0x22 (0x4)
Cmd response success, 12981 bytes received
Received cmd data 0x22 (0x4), length: 12981
Cmd response seq 5 func 0x22 (0x4)
Cmd response success, 16 bytes received
Cmd response completed
Response complete for cmd 0x22 (0x4)
1081.37
959.5
539.5
863
52
0.000523573
1.48142e-05
-4.84616e-05
0.000413513
0.000337161
-8.17666e-05
-0.00122505
0.638288
-0.00397697
0.142856
3.34543e-06
0.000787409
0.00045894
-6.3001e-05
-0.000154578
-0.00122091
0.000335727
0.00442368
0.637383
-0.00957112
===
Cmd seq 6 func 0x16 (0x90000)
Cmd sent, 24 bytes sent
Cmd response seq 6 func 0x16 (0x90000)
Cmd response success, 4 bytes received
Received cmd data 0x16 (0x90000), length: 4
Cmd response seq 6 func 0x16 (0x90000)
Cmd response success, 16 bytes received
Cmd response completed
Response complete for cmd 0x16 (0x90000)
Received status KCMD_READ_STATUS (0x90000): 9763
===
Cmd seq 7 func 0x09 (0)
Cmd sent, 20 bytes sent
Cmd response seq 7 func 0x09 (0)
Cmd response success, 16 bytes received
Cmd response completed
Response complete for cmd 0x09 (0)
Setting stream status: Enable
===
Cmd seq 8 func 0x16 (0x90000)
Cmd sent, 24 bytes sent
Cmd response seq 8 func 0x16 (0x90000)
Cmd response success, 4 bytes received
Received cmd data 0x16 (0x90000), length: 4
Cmd response seq 8 func 0x16 (0x90000)
Cmd response success, 16 bytes received
Cmd response completed
Response complete for cmd 0x16 (0x90000)
Received status KCMD_READ_STATUS (0x90000): 9763
===
Cmd seq 9 func 0x2b (0x1)
Cmd sent, 24 bytes sent
Cmd response seq 9 func 0x2b (0x1)
Cmd response success, 16 bytes received
Cmd response completed
Response complete for cmd 0x2b (0x1)
Set stream status success: Enable
speed: 5000 Mbit/s (USB SuperSpeed)
[TurboJpegRgbPacketProcessor::doProcess] Failed to decompress rgb image! TurboJPEG error: 'Not a JPEG file: starts with 0x24 0x2c'
[DepthPacketStreamParser::handleNewData] working buffer full, resetting it!
[DepthPacketStreamParser::handleNewData] working buffer full, resetting it!
[DepthPacketStreamParser::handleNewData] working buffer full, resetting it!
[DepthPacketStreamParser::handleNewData] working buffer full, resetting it!
[DepthPacketStreamParser::handleNewData] working buffer full, resetting it!
[DepthPacketStreamParser::handleNewData] working buffer full, resetting it!
[DepthPacketStreamParser::handleNewData] working buffer full, resetting it!
[DepthPacketStreamParser::handleNewData] working buffer full, resetting it!
[DepthPacketStreamParser::handleNewData] working buffer full, resetting it!
まだうまくいっていない