프로그램 사용/kinect2024. 7. 15. 21:57

10세대 노트북에서 해서 그런가 잘 된다.

2세대에는 native USB3.0이 없어서 그런가?

 

[  102.223422] usb 1-3: new high-speed USB device number 5 using xhci_hcd
[  102.375595] usb 1-3: New USB device found, idVendor=045e, idProduct=02d9, bcdDevice= 0.70
[  102.375609] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  102.375615] usb 1-3: Product: NuiSensor Adaptor      
[  102.375619] usb 1-3: Manufacturer: Microsoft Corporation  
[  102.377490] hub 1-3:1.0: USB hub found
[  102.377643] hub 1-3:1.0: 1 port detected
[  102.832793] usb 2-3: new SuperSpeed USB device number 3 using xhci_hcd
[  105.820384] usb 2-3: New USB device found, idVendor=045e, idProduct=02d9, bcdDevice= 0.73
[  105.820400] usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  105.820406] usb 2-3: Product: NuiSensor Adaptor      
[  105.820411] usb 2-3: Manufacturer: Microsoft Corporation  
[  105.825068] hub 2-3:1.0: USB hub found
[  105.825375] hub 2-3:1.0: 1 port detected
[  106.307431] usb 2-3.1: new SuperSpeed USB device number 4 using xhci_hcd
[  106.328374] usb 2-3.1: New USB device found, idVendor=045e, idProduct=02d8, bcdDevice= 1.00
[  106.328380] usb 2-3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=4
[  106.328381] usb 2-3.1: Product: Xbox NUI Sensor
[  106.328383] usb 2-3.1: Manufacturer: Microsoft
[  106.328384] usb 2-3.1: SerialNumber: 501441643042
[  106.379651] usbcore: registered new interface driver snd-usb-audio
[  120.739532] usb 2-3.1: reset SuperSpeed USB device number 4 using xhci_hcd
[  163.891946] warning: `ThreadPoolForeg' uses wireless extensions which will stop working for Wi-Fi 7 hardware; use nl80211
[  188.498922] usb 1-3: USB disconnect, device number 5
[  188.581688] usb 2-3: USB disconnect, device number 3
[  188.581693] usb 2-3.1: USB disconnect, device number 4

 

되니 좋긴한데.. 되서 나쁘네.. 컴퓨터 바꾸어야 한다는 말이잖아.. ㅠㅠ

libfreenect2/build/bin$ ./Protonect 
Version: 0.2.0
Environment variables: LOGFILE=<protonect.log>
Usage: ./Protonect [-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 @2:4 with serial 501441643042
[Info] [Freenect2Impl] found 1 devices
libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
[Info] [VaapiRgbPacketProcessorImpl] driver: Intel iHD driver for Intel(R) Gen Graphics - 22.3.1 ()
[Info] [Freenect2DeviceImpl] opening...
[Info] [Freenect2DeviceImpl] transfer pool sizes rgb: 20*16384 ir: 60*8*33792
[Info] [Freenect2DeviceImpl] opened
[Info] [Freenect2DeviceImpl] starting...
[Debug] [Freenect2DeviceImpl] status 0x090000: 9729
[Debug] [Freenect2DeviceImpl] status 0x090000: 9731
[Info] [Freenect2DeviceImpl] submitting rgb transfers...
[Info] [Freenect2DeviceImpl] submitting depth transfers...
[Debug] [DepthPacketStreamParser] not all subsequences received 0
[Info] [Freenect2DeviceImpl] started
device serial: 501441643042
device firmware: 4.0.3911.0
[Debug] [DepthPacketStreamParser] not all subsequences received 960
[Debug] [DepthPacketStreamParser] not all subsequences received 1007
[Info] [DepthPacketStreamParser] 1 packets were lost
[Debug] [DepthPacketStreamParser] not all subsequences received 1022
[Debug] [DepthPacketStreamParser] not all subsequences received 511
[Debug] [DepthPacketStreamParser] not all subsequences received 1019
[Info] [DepthPacketStreamParser] 3 packets were lost
[Debug] [DepthPacketStreamParser] not all subsequences received 1015
[Debug] [DepthPacketStreamParser] not all subsequences received 1015
[Debug] [DepthPacketStreamParser] not all subsequences received 1019
[Info] [DepthPacketStreamParser] 3 packets were lost
[Info] [OpenGLDepthPacketProcessor] avg. time: 7.41895ms -> ~134.79Hz
[Info] [VaapiRgbPacketProcessor] avg. time: 3.69809ms -> ~270.41Hz
[Debug] [DepthPacketStreamParser] not all subsequences received 1015
[Info] [DepthPacketStreamParser] 1 packets were lost
[Info] [OpenGLDepthPacketProcessor] avg. time: 7.03777ms -> ~142.091Hz
[Info] [VaapiRgbPacketProcessor] avg. time: 3.92516ms -> ~254.767Hz
[Debug] [DepthPacketStreamParser] not all subsequences received 1022
[Debug] [DepthPacketStreamParser] not all subsequences received 1019
[Debug] [DepthPacketStreamParser] not all subsequences received 1022
[Debug] [DepthPacketStreamParser] not all subsequences received 1022
[Debug] [DepthPacketStreamParser] not all subsequences received 991
[Debug] [DepthPacketStreamParser] not all subsequences received 1022
[Debug] [DepthPacketStreamParser] not all subsequences received 987
[Info] [DepthPacketStreamParser] 7 packets were lost
[Debug] [DepthPacketStreamParser] not all subsequences received 511
[Debug] [DepthPacketStreamParser] not all subsequences received 511
[Debug] [DepthPacketStreamParser] not all subsequences received 991
[Debug] [DepthPacketStreamParser] not all subsequences received 511
[Debug] [DepthPacketStreamParser] not all subsequences received 1022
[Debug] [DepthPacketStreamParser] not all subsequences received 1019
[Debug] [DepthPacketStreamParser] not all subsequences received 767
[Debug] [DepthPacketStreamParser] not all subsequences received 991
[Debug] [DepthPacketStreamParser] not all subsequences received 1019
[Info] [DepthPacketStreamParser] 9 packets were lost
[Debug] [DepthPacketStreamParser] not all subsequences received 1022
[Debug] [DepthPacketStreamParser] not all subsequences received 1022
[Debug] [DepthPacketStreamParser] not all subsequences received 971
[Debug] [DepthPacketStreamParser] not all subsequences received 511
[Debug] [DepthPacketStreamParser] not all subsequences received 511
[Debug] [DepthPacketStreamParser] not all subsequences received 1022
[Info] [VaapiRgbPacketProcessor] avg. time: 4.29916ms -> ~232.603Hz
[Debug] [DepthPacketStreamParser] not all subsequences received 1019
[Debug] [DepthPacketStreamParser] not all subsequences received 511
[Debug] [DepthPacketStreamParser] not all subsequences received 511
[Info] [DepthPacketStreamParser] 9 packets were lost
[Debug] [DepthPacketStreamParser] not all subsequences received 1022
[Debug] [DepthPacketStreamParser] not all subsequences received 1022
[Debug] [DepthPacketStreamParser] not all subsequences received 987
[Info] [OpenGLDepthPacketProcessor] avg. time: 7.66351ms -> ~130.489Hz
[Debug] [DepthPacketStreamParser] not all subsequences received 511
[Debug] [DepthPacketStreamParser] not all subsequences received 1022
[Debug] [DepthPacketStreamParser] not all subsequences received 1019
[Debug] [DepthPacketStreamParser] not all subsequences received 511
[Debug] [DepthPacketStreamParser] not all subsequences received 511
[Debug] [DepthPacketStreamParser] not all subsequences received 511
[Info] [DepthPacketStreamParser] 9 packets were lost
[Debug] [DepthPacketStreamParser] not all subsequences received 1022
[Debug] [DepthPacketStreamParser] not all subsequences received 1019
[Info] [DepthPacketStreamParser] 2 packets were lost
[Debug] [DepthPacketStreamParser] not all subsequences received 1022
[Debug] [DepthPacketStreamParser] not all subsequences received 1007
[Info] [VaapiRgbPacketProcessor] avg. time: 4.41688ms -> ~226.404Hz
[Info] [DepthPacketStreamParser] 2 packets were lost
[Debug] [DepthPacketStreamParser] not all subsequences received 1022
[Debug] [DepthPacketStreamParser] not all subsequences received 1019
[Info] [DepthPacketStreamParser] 2 packets were lost
[Debug] [DepthPacketStreamParser] not all subsequences received 1022
[Info] [OpenGLDepthPacketProcessor] avg. time: 6.63554ms -> ~150.704Hz
[Debug] [DepthPacketStreamParser] not all subsequences received 510
[Debug] [DepthPacketStreamParser] not all subsequences received 1022
[Debug] [DepthPacketStreamParser] not all subsequences received 1019
[Debug] [DepthPacketStreamParser] not all subsequences received 1015
[Info] [DepthPacketStreamParser] 5 packets were lost
[Debug] [DepthPacketStreamParser] not all subsequences received 1022
[Debug] [DepthPacketStreamParser] not all subsequences received 1022
[Info] [DepthPacketStreamParser] 2 packets were lost
[Info] [VaapiRgbPacketProcessor] avg. time: 4.01999ms -> ~248.757Hz
[Debug] [DepthPacketStreamParser] not all subsequences received 511
[Info] [DepthPacketStreamParser] 1 packets were lost
[Debug] [DepthPacketStreamParser] not all subsequences received 1022
[Debug] [DepthPacketStreamParser] not all subsequences received 511
[Debug] [DepthPacketStreamParser] not all subsequences received 1022
[Info] [OpenGLDepthPacketProcessor] avg. time: 6.68671ms -> ~149.55Hz
[Debug] [DepthPacketStreamParser] not all subsequences received 1022
[Debug] [DepthPacketStreamParser] not all subsequences received 1022
[Info] [DepthPacketStreamParser] 5 packets were lost
[Debug] [DepthPacketStreamParser] not all subsequences received 511
[Debug] [DepthPacketStreamParser] not all subsequences received 511
[Info] [DepthPacketStreamParser] 2 packets were lost
[Info] [VaapiRgbPacketProcessor] avg. time: 4.43949ms -> ~225.251Hz
[Info] [OpenGLDepthPacketProcessor] avg. time: 6.87763ms -> ~145.399Hz
[Info] [VaapiRgbPacketProcessor] avg. time: 4.5502ms -> ~219.771Hz
[Info] [OpenGLDepthPacketProcessor] avg. time: 6.86435ms -> ~145.68Hz
[Debug] [DepthPacketStreamParser] not all subsequences received 511
[Debug] [DepthPacketStreamParser] not all subsequences received 959
[Debug] [DepthPacketStreamParser] not all subsequences received 895
[Debug] [DepthPacketStreamParser] not all subsequences received 511
[Debug] [DepthPacketStreamParser] not all subsequences received 959
[Info] [DepthPacketStreamParser] 5 packets were lost
[Info] [VaapiRgbPacketProcessor] avg. time: 4.07819ms -> ~245.207Hz
[Info] [OpenGLDepthPacketProcessor] avg. time: 6.89874ms -> ~144.954Hz
[Info] [VaapiRgbPacketProcessor] avg. time: 4.5117ms -> ~221.646Hz
[Debug] [DepthPacketStreamParser] not all subsequences received 991
[Info] [DepthPacketStreamParser] 1 packets were lost
[Info] [OpenGLDepthPacketProcessor] avg. time: 7.00382ms -> ~142.779Hz
[Info] [VaapiRgbPacketProcessor] avg. time: 4.54288ms -> ~220.125Hz
[Info] [OpenGLDepthPacketProcessor] avg. time: 7.04759ms -> ~141.892Hz
[Info] [VaapiRgbPacketProcessor] avg. time: 4.4388ms -> ~225.286Hz
[Debug] [DepthPacketStreamParser] not all subsequences received 959
[Info] [DepthPacketStreamParser] 1 packets were lost
[Info] [Freenect2DeviceImpl] stopping...
[Info] [Freenect2DeviceImpl] canceling rgb transfers...
[Info] [OpenGLDepthPacketProcessor] avg. time: 7.02522ms -> ~142.344Hz
[Info] [Freenect2DeviceImpl] canceling depth transfers...
[Info] [Freenect2DeviceImpl] stopped
[Info] [Freenect2DeviceImpl] closing...
[Info] [Freenect2DeviceImpl] releasing usb interfaces...
[Info] [Freenect2DeviceImpl] deallocating usb transfer pools...
[Info] [Freenect2DeviceImpl] closing usb device...
[Info] [Freenect2DeviceImpl] closed
[Info] [Freenect2DeviceImpl] closing...
[Info] [Freenect2DeviceImpl] already closed, doing nothing

 

디버그 모드로 하니 몇 줄 더 나오긴 한데.. 별 차이가 없어 보인다

$ LIBUSB_DEBUG=3 ./Protonect 
Version: 0.2.0
Environment variables: LOGFILE=<protonect.log>
Usage: ./Protonect [-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
libusb: warning [libusb_init] installing new context as implicit default
[Info] [Freenect2Impl] enumerating devices...
[Info] [Freenect2Impl] 8 usb devices connected
[Info] [Freenect2Impl] found valid Kinect v2 @2:6 with serial 501441643042
[Info] [Freenect2Impl] found 1 devices
libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
[Info] [VaapiRgbPacketProcessorImpl] driver: Intel iHD driver for Intel(R) Gen Graphics - 22.3.1 ()
[Info] [Freenect2DeviceImpl] opening...
[Info] [Freenect2DeviceImpl] transfer pool sizes rgb: 20*16384 ir: 60*8*33792
[Info] [Freenect2DeviceImpl] opened
[Info] [Freenect2DeviceImpl] starting...
libusb: error [udev_hotplug_event] ignoring udev action change
libusb: error [udev_hotplug_event] ignoring udev action change
[Debug] [Freenect2DeviceImpl] status 0x090000: 1024
[Debug] [Freenect2DeviceImpl] status 0x090000: 9729
[Debug] [Freenect2DeviceImpl] status 0x090000: 9731
[Info] [Freenect2DeviceImpl] submitting rgb transfers...
[Info] [Freenect2DeviceImpl] submitting depth transfers...
[Debug] [DepthPacketStreamParser] not all subsequences received 0
[Info] [Freenect2DeviceImpl] started
device serial: 501441643042
device firmware: 4.0.3911.0
[Debug] [DepthPacketStreamParser] not all subsequences received 896
[Info] [OpenGLDepthPacketProcessor] avg. time: 7.5057ms -> ~133.232Hz
[Info] [VaapiRgbPacketProcessor] avg. time: 4.58964ms -> ~217.882Hz
[Debug] [DepthPacketStreamParser] not all subsequences received 511

 

$ lsusb -t -v
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    |__ Port 3: Dev 5, If 0, Class=Hub, Driver=hub/1p, 5000M
        ID 045e:02d9 Microsoft Corp. 
        |__ Port 1: Dev 6, If 0, Class=Vendor Specific Class, Driver=, 5000M
            ID 045e:02d8 Microsoft Corp. 
        |__ Port 1: Dev 6, If 1, Class=Vendor Specific Class, Driver=, 5000M
            ID 045e:02d8 Microsoft Corp. 
        |__ Port 1: Dev 6, If 2, Class=Audio, Driver=snd-usb-audio, 5000M
            ID 045e:02d8 Microsoft Corp. 
        |__ Port 1: Dev 6, If 3, Class=Audio, Driver=snd-usb-audio, 5000M
            ID 045e:02d8 Microsoft Corp. 
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 3: Dev 6, If 0, Class=Hub, Driver=hub/1p, 480M
        ID 045e:02d9 Microsoft Corp. 
    |__ Port 5: Dev 2, If 0, Class=Vendor Specific Class, Driver=, 12M
        ID 04e8:730b Samsung Electronics Co., Ltd 
    |__ Port 6: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M
        ID 2b7e:0134  
    |__ Port 6: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M
        ID 2b7e:0134  
    |__ Port 10: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M
        ID 8087:0026 Intel Corp. AX201 Bluetooth
    |__ Port 10: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M
        ID 8087:0026 Intel Corp. AX201 Bluetooth

 

 

+

2024.07.18

빌드 타임 추가 (노트북)

8쓰레드 4쓰레드 2쓰레드 1쓰레드
real 0m6.974s
user 0m27.675s
sys 0m2.416s
real 0m7.923s
user 0m19.886s
sys 0m1.687s
real 0m11.978s
user 0m19.263s
sys 0m1.688s
real 0m17.982s
user 0m16.453s
sys 0m1.503s

 

+

2024.07.20

빌드 타임 추가 (데스크 탑 / i7-3770)

8쓰레드 4쓰레드 2쓰레드 1쓰레드
real 0m4.899s
user 0m22.435s
sys 0m2.366s
real 0m5.263s
user 0m14.712s
sys 0m1.612s
real 0m8.456s
user 0m13.561s
sys 0m1.707s
real 0m15.343s
user 0m13.623s
sys 0m1.707s

 

 

'프로그램 사용 > kinect' 카테고리의 다른 글

libfreenect2 성공  (0) 2024.07.17
libfreenect2 실행 실패  (0) 2024.07.14
libfreenect2 CUDA 끄고 빌드 성공  (0) 2024.07.13
kinect v2 / freenect 실패  (0) 2024.07.09
xbox one S / 기본형?  (0) 2024.06.25
Posted by 구차니
프로그램 사용/kinect2024. 7. 14. 11:19

처음 실행하니 권한부족.. libusb가 권한이 필요한 녀석이었던가?

libfreenect2/build/bin$ ./Protonect 
Version: 0.2.0
Environment variables: LOGFILE=<protonect.log>
Usage: ./Protonect [-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] 10 usb devices connected
[Error] [Freenect2Impl] failed to open Kinect v2: @4:3 LIBUSB_ERROR_ACCESS Access denied (insufficient permissions)
[Info] [Freenect2Impl] found 0 devices
no device connected!

 

짜잔~하고 먼가 나오길 기대했지만... 안된다 -_-

$ sudo ./Protonect 
Version: 0.2.0
Environment variables: LOGFILE=<protonect.log>
Usage: ./Protonect [-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] 10 usb devices connected
[Info] [Freenect2Impl] found valid Kinect v2 @4:5 with serial 501441643042
[Info] [Freenect2Impl] found 1 devices
[Info] [Freenect2DeviceImpl] opening...
[Info] [Freenect2DeviceImpl] transfer pool sizes rgb: 20*16384 ir: 60*8*33792
[Info] [Freenect2DeviceImpl] opened
[Info] [Freenect2DeviceImpl] starting...
[Debug] [Freenect2DeviceImpl] status 0x090000: 9729
[Error] [protocol::UsbControl] failed to set ir interface state! LIBUSB_ERROR_OTHER Other error. Try debugging with environment variable: export LIBUSB_DEBUG=3 .
[Info] [Freenect2DeviceImpl] closing...
[Info] [Freenect2DeviceImpl] releasing usb interfaces...
[Info] [Freenect2DeviceImpl] deallocating usb transfer pools...
[Info] [Freenect2DeviceImpl] closing usb device...
[Info] [Freenect2DeviceImpl] closed

 

LIBUSB_DEBUG를 줘도 두 줄 추가 되는 것 외에는 별다른 에러 메시지가 없다.

# LIBUSB_DEBUG=3 ./Protonect 
Version: 0.2.0
Environment variables: LOGFILE=<protonect.log>
Usage: ./Protonect [-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
libusb: warning [libusb_init] installing new context as implicit default
[Info] [Freenect2Impl] enumerating devices...
[Info] [Freenect2Impl] 10 usb devices connected
[Info] [Freenect2Impl] found valid Kinect v2 @4:7 with serial 501441643042
[Info] [Freenect2Impl] found 1 devices
[Info] [Freenect2DeviceImpl] opening...
[Info] [Freenect2DeviceImpl] transfer pool sizes rgb: 20*16384 ir: 60*8*33792
[Info] [Freenect2DeviceImpl] opened
[Info] [Freenect2DeviceImpl] starting...
libusb: error [udev_hotplug_event] ignoring udev action change
libusb: error [udev_hotplug_event] ignoring udev action change
[Debug] [Freenect2DeviceImpl] status 0x090000: 9731
libusb: error [op_set_interface] set interface failed, errno=28
[Error] [protocol::UsbControl] failed to set ir interface state! LIBUSB_ERROR_OTHER Other error. Try debugging with environment variable: export LIBUSB_DEBUG=3 .
[Info] [Freenect2DeviceImpl] closing...
[Info] [Freenect2DeviceImpl] releasing usb interfaces...
[Info] [Freenect2DeviceImpl] deallocating usb transfer pools...
[Info] [Freenect2DeviceImpl] closing usb device...
[Info] [Freenect2DeviceImpl] closed
libusb: warning [libusb_exit] device 4.7 still referenced
libusb: warning [libusb_exit] device 4.6 still referenced
libusb: warning [libusb_exit] device 4.1 still referenced

 

커널 메시지로는.... 엥? 왜 갑자기 대역폭 부족?

$ sudo dmesg -w
[  415.484074] usb 4-1.1: reset SuperSpeed USB device number 7 using xhci_hcd
[  415.595900] usb 4-1.1: Not enough bandwidth for new device state.
[  415.595907] usb 4-1.1: Not enough bandwidth for altsetting 1

 

라이브러리 홈페이지 가서 다시 보니 

make install 하고 udev rule을 복사한 뒤, 키넥트를 뽑았다 꽂으라고 한다.

Build (if you have run cd depends previously, cd .. back to the libfreenect2 root directory first.)
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/freenect2
make
make install
You need to specify cmake -Dfreenect2_DIR=$HOME/freenect2/lib/cmake/freenect2 for CMake based third-party application to find libfreenect2.
Set up udev rules for device access: sudo cp ../platform/linux/udev/90-kinect2.rules /etc/udev/rules.d/, then replug the Kinect.
Run the test program: ./bin/Protonect
Run OpenNI2 test (optional): sudo apt-get install openni2-utils && sudo make install-openni2 && NiViewer2. Environment variable LIBFREENECT2_PIPELINE can be set to cl, cuda, etc to specify the pipeline.

[링크 : https://github.com/OpenKinect/libfreenect2]

 

먼가 잔뜩 뜨긴 한데.. udev 쪽 먼가 실행하는 것 같진 않고..

[  517.098960] usb 3-1: new high-speed USB device number 5 using xhci_hcd
[  517.251097] usb 3-1: New USB device found, idVendor=045e, idProduct=02d9, bcdDevice= 0.70
[  517.251115] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  517.251122] usb 3-1: Product: NuiSensor Adaptor      
[  517.251127] usb 3-1: Manufacturer: Microsoft Corporation  
[  517.254367] hub 3-1:1.0: USB hub found
[  517.254752] hub 3-1:1.0: 1 port detected
[  517.704842] usb 4-1: new SuperSpeed USB device number 8 using xhci_hcd
[  520.690577] usb 4-1: New USB device found, idVendor=045e, idProduct=02d9, bcdDevice= 0.73
[  520.690597] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  520.690604] usb 4-1: Product: NuiSensor Adaptor      
[  520.690610] usb 4-1: Manufacturer: Microsoft Corporation  
[  520.694210] hub 4-1:1.0: USB hub found
[  520.694623] hub 4-1:1.0: 1 port detected
[  521.187545] usb 4-1.1: new SuperSpeed USB device number 9 using xhci_hcd
[  521.212947] usb 4-1.1: New USB device found, idVendor=045e, idProduct=02d8, bcdDevice= 1.00
[  521.212966] usb 4-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=4
[  521.212973] usb 4-1.1: Product: Xbox NUI Sensor
[  521.212977] usb 4-1.1: Manufacturer: Microsoft
[  521.212982] usb 4-1.1: SerialNumber: 501441643042

 

키넥트 관련은 MODE 주는 것 외에는 별다른게 없어 보인다.

src/libfreenect2/build/bin# cat ../../platform/linux/udev/90-kinect2.rules 
# this file belongs in /etc/udev/rules.d/
# ATTR{product}=="Kinect2"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02c4", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02d8", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02d9", MODE="0666"

 

에러는 동일하게 대역폭 부족이 뜬다.

$ sudo ./Protonect 
Version: 0.2.0
Environment variables: LOGFILE=<protonect.log>
Usage: ./Protonect [-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] 10 usb devices connected
[Info] [Freenect2Impl] found valid Kinect v2 @4:13 with serial 501441643042
[Info] [Freenect2Impl] found 1 devices
[Info] [Freenect2DeviceImpl] opening...
[Info] [Freenect2DeviceImpl] transfer pool sizes rgb: 20*16384 ir: 60*8*33792
[Info] [Freenect2DeviceImpl] opened
[Info] [Freenect2DeviceImpl] starting...
[Debug] [Freenect2DeviceImpl] status 0x090000: 9731
[Error] [protocol::UsbControl] failed to set ir interface state! LIBUSB_ERROR_OTHER Other error. Try debugging with environment variable: export LIBUSB_DEBUG=3 .
[Info] [Freenect2DeviceImpl] closing...
[Info] [Freenect2DeviceImpl] releasing usb interfaces...
[Info] [Freenect2DeviceImpl] deallocating usb transfer pools...
[Info] [Freenect2DeviceImpl] closing usb device...
[Info] [Freenect2DeviceImpl] closed

 

[  786.203660] usb 4-2.1: reset SuperSpeed USB device number 13 using xhci_hcd
[  786.318931] usb 4-2.1: Not enough bandwidth for new device state.
[  786.318939] usb 4-2.1: Not enough bandwidth for altsetting 1

 

혹시나 해서 USB2.0에 꽂아보니 아래와 같이 에러가 발생한다.

$ sudo ./Protonect 
Version: 0.2.0
Environment variables: LOGFILE=<protonect.log>
Usage: ./Protonect [-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] 9 usb devices connected
[Info] [Freenect2Impl] found valid Kinect v2 @2:5 with serial 501441643042
[Info] [Freenect2Impl] found 1 devices
[Info] [Freenect2DeviceImpl] opening...
[Error] [protocol::UsbControl] failed to claim interface with IrInterfaceId(=1)! LIBUSB_ERROR_BUSY Resource busy. Try debugging with environment variable: export LIBUSB_DEBUG=3 .
[Info] [Freenect2DeviceImpl] closing...
[Info] [Freenect2DeviceImpl] deallocating usb transfer pools...
[Info] [Freenect2DeviceImpl] closing usb device...
[Info] [Freenect2DeviceImpl] closed
[Error] [Freenect2Impl] failed to open Kinect v2: @2:5
failure opening device!

 

dmesg 상에는 아래와 같이 BOS desciptor 가 없거나 너무 짧다는게 그건 또 머냐..

[  683.513603] usb 2-1.1.1: reset high-speed USB device number 5 using ehci-pci
[  683.634757] usb 2-1.1.1: unable to get BOS descriptor or descriptor too short

 

expresscard to USB3.0 을 써서 생기는 문제인가.. 아니면 빌드라던가 다른 문제인가..

 

 

+

2024.07.15

usbfs 크기가 적으니 늘리는게 도움이 된다는데 해도 해결은 안된다.

기본은 ubutu 22.04 에서 16MB 인 듯한데 1000MB로 늘려도 안된다.

$ cat /etc/default/grub | grep GRUB_CMDLINE_LINUX_DEFAULT
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
$ cat /sys/module/usbcore/parameters/usbfs_memory_mb
16
$ sudo sh -c 'echo 1000 > /sys/module/usbcore/parameters/usbfs_memory_mb'
$ cat /sys/module/usbcore/parameters/usbfs_memory_mb
1000

[링크 : https://github.com/OpenKinect/libfreenect2/issues/971]

[링크 : https://importgeek.wordpress.com/2017/02/26/increase-usbfs-memory-limit-in-ubuntu/]

 

+

혹시나 해서 찾아보는데..

expresscard의 경우 PCIe 2 or USB 3 mode 일 경우 3.2Gbps로 USB3.0의 5Gbps 에는 어떤 모드던 부족하다.

그런데 풀 대역폭을 쓰진 않을수도 있긴한데.. USB 장치에서 필요로 하는 대역폭을 다 커버 할 수 없는건가?

 

Speed
480 Mbit/s effective (USB 2 mode)
1.6 Gbit/s effective (PCIe 1 mode)
3.2 Gbit/s effective (PCIe 2 or USB 3 mode)

[링크 : https://en.wikipedia.org/wiki/ExpressCard]

 

칩셋인 uPD720202도 스펙상 PCIe Gen2 1 lane 이고, 속도까진 나와있지 않다

System I/F: PCIe Gen2 x 1 Lane

[링크 : https://www.renesas.com/us/en/products/interface/usb-switches-hubs/upd720202-usb-30-host-controller#overview]

 

i5-2520m 도 PCIe Gen 2 라고 하는데

확장 옵션
PCI Express 개정판 2.0
PCI Express 구성 ‡ 1x16, 2x8, 1x8+2x4
최대 PCI Express 레인 수 16

[링크 : https://www.intel.co.kr/content/www/kr/ko/products/sku/52229/intel-core-i52520m-processor-3m-cache-up-to-3-20-ghz/specifications.html]

 

pci-e 2.0 lane 1은 5.0GT/s 이고 5Gbps로 계산이 되긴한다.

반대로 생각하면 USB3.0이 생각외로 빠른거구나..

[링크 : https://en.wikipedia.org/wiki/PCI_Express]

 

Depends on your thinkpad's generation of Expresscard
Gen 1 is 1.6gbps
Gen 2 is 3.2gbps
Gen 3 is 6.4gbps, but each usb port can only do a max of 5gbps
In this case it's a T420 so it has gen 2 expresscard

[링크 : https://www.reddit.com/r/thinkpad/comments/xy44zj/finally_got_the_cheapest_usb_30_express_card_for/]

 

expresscard 34 규격의 sony sxs pro 라는 저장장치 인데

우연인지 아니면 대역폭 한계인지 3.2Gbps가 검색되서 나온다. expresscard와 pci-e 와는 속도 차이가 존재하는건가?

Max. Speeds
Read speed 3.5Gbps (=440MB/s) (1)
Write Speed 3.2Gbps (=400MB/s) (1)

[링크 : https://ccktech.com/product/sony-sxs-pro/]

[링크 :  https://ccktech.com/product-interface/expresscard-34/]

'프로그램 사용 > kinect' 카테고리의 다른 글

libfreenect2 성공  (0) 2024.07.17
libfreenect2 실행 성공..  (0) 2024.07.15
libfreenect2 CUDA 끄고 빌드 성공  (0) 2024.07.13
kinect v2 / freenect 실패  (0) 2024.07.09
xbox one S / 기본형?  (0) 2024.06.25
Posted by 구차니
프로그램 사용/kinect2024. 7. 13. 23:05

귀찮으니 실행은 다음에 해보는 걸로 ㅋ

 

cmake .. -DENABLE_CUDA=OFF
CMake Deprecation Warning at CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- using tinythread as threading library
-- Checking for modules 'libva;libva-drm'
--   No package 'libva' found
--   No package 'libva-drm' found
-- Could NOT find TegraJPEG (missing: TegraJPEG_LIBRARIES TegraJPEG_INCLUDE_DIRS TegraJPEG_WORKS) 
CMake Warning (dev) at /home/minimonk/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.30/Modules/FindOpenGL.cmake:415 (message):
  Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
  available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  FindOpenGL found both a legacy GL library:

    OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

  OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
  compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
  CMakeLists.txt:269 (FIND_PACKAGE)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find OpenCL (missing: OpenCL_LIBRARY OpenCL_INCLUDE_DIR) 
-- Linking with these libraries: 
 /usr/lib/x86_64-linux-gnu/libusb-1.0.so
 pthread
 /usr/lib/x86_64-linux-gnu/libturbojpeg.so.0
 /usr/lib/x86_64-linux-gnu/libglfw.so
 /usr/lib/x86_64-linux-gnu/libGL.so
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Configurating examples
CMake Deprecation Warning at examples/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Using in-tree freenect2 target
-- Feature list:
--   CUDA    disabled
--   CXX11    disabled
--   Examples    yes
--   OpenCL    no
--   OpenGL    yes
--   OpenNI2    yes
--   TegraJPEG    no
--   Threading    tinythread
--   TurboJPEG    yes
--   VAAPI    no
--   VideoToolbox    no (Apple only)
--   streamer_recorder    disabled
-- Configuring done (0.1s)
-- Generating done (0.0s)
-- Build files have been written to: /home/minimonk/src/libfreenect2/build

 

$ make -j4
[  2%] Building CXX object CMakeFiles/generate_resources_tool.dir/tools/generate_resources.cpp.o
[  5%] Linking CXX executable bin/generate_resources_tool
[  5%] Built target generate_resources_tool
[  8%] Generating resources.inc.h
[ 10%] Building CXX object CMakeFiles/freenect2.dir/src/transfer_pool.cpp.o
[ 13%] Building CXX object CMakeFiles/freenect2.dir/src/event_loop.cpp.o
[ 16%] Building CXX object CMakeFiles/freenect2.dir/src/usb_control.cpp.o
[ 18%] Building CXX object CMakeFiles/freenect2.dir/src/allocator.cpp.o
[ 21%] Building CXX object CMakeFiles/freenect2.dir/src/frame_listener_impl.cpp.o
[ 24%] Building CXX object CMakeFiles/freenect2.dir/src/packet_pipeline.cpp.o
[ 27%] Building CXX object CMakeFiles/freenect2.dir/src/rgb_packet_stream_parser.cpp.o
[ 29%] Building CXX object CMakeFiles/freenect2.dir/src/rgb_packet_processor.cpp.o
[ 32%] Building CXX object CMakeFiles/freenect2.dir/src/depth_packet_stream_parser.cpp.o
[ 35%] Building CXX object CMakeFiles/freenect2.dir/src/depth_packet_processor.cpp.o
[ 37%] Building CXX object CMakeFiles/freenect2.dir/src/cpu_depth_packet_processor.cpp.o
[ 40%] Building CXX object CMakeFiles/freenect2.dir/src/resource.cpp.o
[ 43%] Building CXX object CMakeFiles/freenect2.dir/src/command_transaction.cpp.o
[ 45%] Building CXX object CMakeFiles/freenect2.dir/src/registration.cpp.o
[ 48%] Building CXX object CMakeFiles/freenect2.dir/src/logging.cpp.o
/home/minimonk/src/libfreenect2/src/cpu_depth_packet_processor.cpp: In member function ‘virtual void libfreenect2::CpuDepthPacketProcessor::loadP0TablesFromCommandResponse(unsigned char*, size_t)’:
/home/minimonk/src/libfreenect2/src/cpu_depth_packet_processor.cpp:844:53: warning: taking address of packed member of ‘libfreenect2::protocol::P0TablesResponse’ may result in an unaligned pointer value [-Waddress-of-packed-member]
  844 |     flipHorizontal(Mat(424, 512, p0table->p0table0), impl_->p0_table0);
      |                                            ~~~~~~~~~^~~~~~~~
/home/minimonk/src/libfreenect2/src/cpu_depth_packet_processor.cpp:845:53: warning: taking address of packed member of ‘libfreenect2::protocol::P0TablesResponse’ may result in an unaligned pointer value [-Waddress-of-packed-member]
  845 |     flipHorizontal(Mat(424, 512, p0table->p0table1), impl_->p0_table1);
      |                                            ~~~~~~~~~^~~~~~~~
/home/minimonk/src/libfreenect2/src/cpu_depth_packet_processor.cpp:846:53: warning: taking address of packed member of ‘libfreenect2::protocol::P0TablesResponse’ may result in an unaligned pointer value [-Waddress-of-packed-member]
  846 |     flipHorizontal(Mat(424, 512, p0table->p0table2), impl_->p0_table2);
      |                                            ~~~~~~~~~^~~~~~~~
/home/minimonk/src/libfreenect2/src/cpu_depth_packet_processor.cpp:850:42: warning: taking address of packed member of ‘libfreenect2::protocol::P0TablesResponse’ may result in an unaligned pointer value [-Waddress-of-packed-member]
  850 |     Mat p00(424, 512, p0table->p0table0);
      |                                 ~~~~~~~~~^~~~~~~~
/home/minimonk/src/libfreenect2/src/cpu_depth_packet_processor.cpp:852:38: warning: taking address of packed member of ‘libfreenect2::protocol::P0TablesResponse’ may result in an unaligned pointer value [-Waddress-of-packed-member]
  852 |     Mat(424, 512, p0table->p0table1).copyTo(impl_->p0_table1);
      |                             ~~~~~~~~~^~~~~~~~
/home/minimonk/src/libfreenect2/src/cpu_depth_packet_processor.cpp:853:38: warning: taking address of packed member of ‘libfreenect2::protocol::P0TablesResponse’ may result in an unaligned pointer value [-Waddress-of-packed-member]
  853 |     Mat(424, 512, p0table->p0table2).copyTo(impl_->p0_table2);
      |                             ~~~~~~~~~^~~~~~~~
[ 51%] Building CXX object CMakeFiles/freenect2.dir/src/libfreenect2.cpp.o
[ 54%] Building CXX object CMakeFiles/freenect2.dir/src/tinythread/tinythread.cpp.o
[ 56%] Building CXX object CMakeFiles/freenect2.dir/src/turbo_jpeg_rgb_packet_processor.cpp.o
[ 59%] Building CXX object CMakeFiles/freenect2.dir/src/flextGL.cpp.o
[ 62%] Building CXX object CMakeFiles/freenect2.dir/src/opengl_depth_packet_processor.cpp.o
[ 64%] Linking CXX shared library lib/libfreenect2.so
[ 64%] Built target freenect2
[ 70%] Building CXX object examples/CMakeFiles/Protonect.dir/Protonect.cpp.o
[ 72%] Building CXX object CMakeFiles/freenect2-openni2.dir/src/openni2/ColorStream.cpp.o
[ 72%] Building CXX object examples/CMakeFiles/Protonect.dir/__/src/flextGL.cpp.o
[ 75%] Building CXX object examples/CMakeFiles/Protonect.dir/viewer.cpp.o
[ 78%] Building CXX object CMakeFiles/freenect2-openni2.dir/src/openni2/DepthStream.cpp.o
/home/minimonk/src/libfreenect2/examples/Protonect.cpp: In function ‘int main(int, char**)’:
/home/minimonk/src/libfreenect2/examples/Protonect.cpp:157:7: warning: variable ‘deviceId’ set but not used [-Wunused-but-set-variable]
  157 |   int deviceId = -1;
      |       ^~~~~~~~
[ 81%] Building CXX object CMakeFiles/freenect2-openni2.dir/src/openni2/DeviceDriver.cpp.o
[ 83%] Building CXX object CMakeFiles/freenect2-openni2.dir/src/openni2/IrStream.cpp.o
[ 86%] Building CXX object CMakeFiles/freenect2-openni2.dir/src/openni2/Registration.cpp.o
[ 89%] Linking CXX executable ../bin/Protonect
[ 89%] Built target Protonect
[ 91%] Building CXX object CMakeFiles/freenect2-openni2.dir/src/openni2/Utility.cpp.o
[ 94%] Building CXX object CMakeFiles/freenect2-openni2.dir/src/openni2/VideoStream.cpp.o
[ 97%] Building CXX object CMakeFiles/freenect2-openni2.dir/src/tinythread/tinythread.cpp.o
In file included from /usr/include/string.h:535,
                 from /usr/include/openni2/Linux-x86/OniPlatformLinux-x86.h:34,
                 from /usr/include/openni2/OniPlatform.h:42,
                 from /usr/include/openni2/Driver/OniDriverAPI.h:24,
                 from /home/minimonk/src/libfreenect2/src/openni2/DeviceDriver.cpp:35:
In function ‘char* strncpy(char*, const char*, size_t)’,
    inlined from ‘void Freenect2Driver::Driver::register_uri(std::string)’ at /home/minimonk/src/libfreenect2/src/openni2/DeviceDriver.cpp:404:14:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:95:34: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ specified bound 256 equals destination size [-Wstringop-truncation]
   95 |   return __builtin___strncpy_chk (__dest, __src, __len,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
   96 |                                   __glibc_objsize (__dest));
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~
[100%] Linking CXX shared library lib/libfreenect2-openni2.so
[100%] Built target freenect2-openni2

 

~/src/libfreenect2/build$ tree -L 2 
.
├── CMakeCache.txt
├── CMakeFiles
│   ├── 3.30.0
│   ├── CMakeConfigureLog.yaml
│   ├── CMakeDirectoryInformation.cmake
│   ├── CMakeRuleHashes.txt
│   ├── CMakeScratch
│   ├── Makefile.cmake
│   ├── Makefile2
│   ├── TargetDirectories.txt
│   ├── cmake.check_cache
│   ├── freenect2-openni2.dir
│   ├── freenect2.dir
│   ├── generate_resources_tool.dir
│   ├── install-openni2.dir
│   ├── pkgRedirects
│   └── progress.marks
├── Makefile
├── bin
│   ├── Protonect
│   └── generate_resources_tool
├── cmake_install.cmake
├── doc
│   ├── CMakeFiles
│   ├── Makefile
│   └── cmake_install.cmake
├── examples
│   ├── CMakeFiles
│   ├── Makefile
│   └── cmake_install.cmake
├── freenect2.pc
├── freenect2Config.cmake
├── freenect2ConfigVersion.cmake
├── lib
│   ├── libfreenect2-openni2.so -> libfreenect2-openni2.so.0
│   ├── libfreenect2-openni2.so.0
│   ├── libfreenect2.so -> libfreenect2.so.0.2
│   ├── libfreenect2.so.0.2 -> libfreenect2.so.0.2.0
│   └── libfreenect2.so.0.2.0
├── libfreenect2
│   ├── config.h
│   └── export.h
└── resources.inc.h

15 directories, 28 files

 

bin/Protonect 를 실행하면 스트리밍 된다고 한다.

[링크 : https://www.notaboutmy.life/posts/run-kinect-2-on-ubuntu-20-lts/]

 

소스를 뒤져보니 glfw 라는 접두로 된 녀석을 통해 그리는데, openGL ES와 vulkan으로 그리는 듯?

[링크 : https://www.glfw.org/]

'프로그램 사용 > kinect' 카테고리의 다른 글

libfreenect2 실행 성공..  (0) 2024.07.15
libfreenect2 실행 실패  (0) 2024.07.14
kinect v2 / freenect 실패  (0) 2024.07.09
xbox one S / 기본형?  (0) 2024.06.25
kinect for windows v2 설치  (0) 2024.06.24
Posted by 구차니

이번에 구매한 usb3.0 확장 카드를 연결하고 케이블들을 낑낑대면서 연결하니 뜨긴 한다.

$ sudo dmesg
[  437.911262] pcieport 0000:00:1c.1: pciehp: Slot(1): Card present
[  437.911269] pcieport 0000:00:1c.1: pciehp: Slot(1): Link Up
[  438.044260] pci 0000:02:00.0: [1912:0015] type 00 class 0x0c0330
[  438.044330] pci 0000:02:00.0: reg 0x10: [mem 0x00000000-0x00001fff 64bit]
[  438.044672] pci 0000:02:00.0: PME# supported from D0 D3hot D3cold
[  438.044800] pci 0000:02:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0000:00:1c.1 (capable of 4.000 Gb/s with 5.0 GT/s PCIe x1 link)
[  438.045216] pci 0000:02:00.0: BAR 0: assigned [mem 0xd0000000-0xd0001fff 64bit]
[  438.045250] pcieport 0000:00:1c.1: PCI bridge to [bus 02-22]
[  438.045256] pcieport 0000:00:1c.1:   bridge window [io  0x2000-0x3fff]
[  438.045263] pcieport 0000:00:1c.1:   bridge window [mem 0xd0000000-0xd3ffffff]
[  438.045269] pcieport 0000:00:1c.1:   bridge window [mem 0xbfb00000-0xbfcfffff 64bit pref]
[  438.045301] pci 0000:02:00.0: enabling device (0000 -> 0002)
[  438.064367] xhci_hcd 0000:02:00.0: failed to load firmware renesas_usb_fw.mem, fallback to ROM
[  438.064525] xhci_hcd 0000:02:00.0: xHCI Host Controller
[  438.064539] xhci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 3
[  438.069936] xhci_hcd 0000:02:00.0: hcc params 0x014051cf hci version 0x100 quirks 0x0000001100000090
[  438.070598] xhci_hcd 0000:02:00.0: xHCI Host Controller
[  438.070606] xhci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 4
[  438.070613] xhci_hcd 0000:02:00.0: Host supports USB 3.0 SuperSpeed
[  438.076171] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
[  438.076179] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[  438.076181] usb usb3: Product: xHCI Host Controller
[  438.076183] usb usb3: Manufacturer: Linux 5.15.0-113-generic xhci-hcd
[  438.076185] usb usb3: SerialNumber: 0000:02:00.0
[  438.076795] hub 3-0:1.0: USB hub found
[  438.076819] hub 3-0:1.0: 2 ports detected
[  438.077339] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[  438.077384] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.15
[  438.077388] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[  438.077391] usb usb4: Product: xHCI Host Controller
[  438.077393] usb usb4: Manufacturer: Linux 5.15.0-113-generic xhci-hcd
[  438.077395] usb usb4: SerialNumber: 0000:02:00.0
[  438.077862] hub 4-0:1.0: USB hub found
[  438.077883] hub 4-0:1.0: 2 ports detected
[  633.299719] usb 3-1: new high-speed USB device number 2 using xhci_hcd
[  633.451210] usb 3-1: New USB device found, idVendor=045e, idProduct=02d9, bcdDevice= 0.70
[  633.451228] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  633.451235] usb 3-1: Product: NuiSensor Adaptor      
[  633.451240] usb 3-1: Manufacturer: Microsoft Corporation  
[  633.454348] hub 3-1:1.0: USB hub found
[  633.454783] hub 3-1:1.0: 1 port detected
[  633.909291] usb 4-1: new SuperSpeed USB device number 2 using xhci_hcd
[  636.898560] usb 4-1: New USB device found, idVendor=045e, idProduct=02d9, bcdDevice= 0.73
[  636.898577] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  636.898584] usb 4-1: Product: NuiSensor Adaptor      
[  636.898590] usb 4-1: Manufacturer: Microsoft Corporation  
[  636.902320] hub 4-1:1.0: USB hub found
[  636.902758] hub 4-1:1.0: 1 port detected
[  637.392541] usb 4-1.1: new SuperSpeed USB device number 3 using xhci_hcd
[  637.421621] usb 4-1.1: New USB device found, idVendor=045e, idProduct=02d8, bcdDevice= 1.00
[  637.421649] usb 4-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=4
[  637.421654] usb 4-1.1: Product: Xbox NUI Sensor
[  637.421657] usb 4-1.1: Manufacturer: Microsoft
[  637.421661] usb 4-1.1: SerialNumber: 501441643042
[  637.493029] usbcore: registered new interface driver snd-usb-audio

 

일단.. 5Gbps로 USB3.0으로 잘 붙긴한데

$ lsusb -t -v
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/1p, 5000M
        ID 045e:02d9 Microsoft Corp. 
        |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=, 5000M
            ID 045e:02d8 Microsoft Corp. 
        |__ Port 1: Dev 3, If 1, Class=Vendor Specific Class, Driver=, 5000M
            ID 045e:02d8 Microsoft Corp. 
        |__ Port 1: Dev 3, If 2, Class=Audio, Driver=snd-usb-audio, 5000M
            ID 045e:02d8 Microsoft Corp. 
        |__ Port 1: Dev 3, If 3, Class=Audio, Driver=snd-usb-audio, 5000M
            ID 045e:02d8 Microsoft Corp. 
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/1p, 480M
        ID 045e:02d9 Microsoft Corp. 
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
        ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
        |__ Port 4: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M
            ID 04f2:b242 Chicony Electronics Co., Ltd 
        |__ Port 4: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M
            ID 04f2:b242 Chicony Electronics Co., Ltd 
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
        ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
        |__ Port 4: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
            ID 04b4:6560 Cypress Semiconductor Corp. CY7C65640 USB-2.0 "TetraHub"
        |__ Port 6: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 480M
            ID 049f:0081 Compaq Computer Corp. 

 

이전에 실행했던 녀석을 실행하니.. 어...?!

$ freenect-camtest 
No device found!

 

검색해보니 libfreenect2 라는걸 설치해야 하는 것 같은데..

일단 패키지 설치 안하고 하니 먼가 에러가 나서

-- Could NOT find TegraJPEG (missing: TegraJPEG_LIBRARIES TegraJPEG_INCLUDE_DIRS TegraJPEG_WORKS) 
CMake Error at /home/minimonk/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
  Could NOT find TurboJPEG (missing: TurboJPEG_LIBRARIES
  TurboJPEG_INCLUDE_DIRS TURBOJPEG_WORKS)
Call Stack (most recent call first):
  /home/minimonk/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)
  cmake_modules/FindTurboJPEG.cmake:66 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:243 (FIND_PACKAGE)

 

패키지들 왕창 설치!!

$ sudo apt-get install libusb-1.0-0-dev libturbojpeg0-dev libglfw3-dev libva-dev libjpeg-dev libopenni2-dev
$ pip3 install cmake

 

make 하는데 gcc 버전이 낮아서 안되는 듯...

귀찮으니 나중에 다시 시도.. 키넥트2 정리하기 귀찮은디.. ㅠㅠ

(다시보니 cuda 때문인데 cuda 지원을 뺄까?)

In file included from /usr/local/cuda/include/cuda_runtime.h:83,
                 from <command-line>:
/usr/local/cuda/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
  138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
      |  ^~~~~
CMake Error at cuda_compile_1_generated_cuda_depth_packet_processor.cu.o.RelWithDebInfo.cmake:220 (message):
  Error generating
  /home/minimonk/src/libfreenect2/build/CMakeFiles/cuda_compile_1.dir/src/./cuda_compile_1_generated_cuda_depth_packet_processor.cu.o


CMake Error at cuda_compile_1_generated_cuda_kde_depth_packet_processor.cu.o.RelWithDebInfo.cmake:220 (message):
  Error generating
  /home/minimonk/src/libfreenect2/build/CMakeFiles/cuda_compile_1.dir/src/./cuda_compile_1_generated_cuda_kde_depth_packet_processor.cu.o


make[2]: *** [CMakeFiles/freenect2.dir/build.make:87: CMakeFiles/cuda_compile_1.dir/src/cuda_compile_1_generated_cuda_depth_packet_processor.cu.o] 오류 1
make[2]: *** 끝나지 않은 작업을 기다리고 있습니다....
make[2]: *** [CMakeFiles/freenect2.dir/build.make:94: CMakeFiles/cuda_compile_1.dir/src/cuda_compile_1_generated_cuda_kde_depth_packet_processor.cu.o] 오류 1
make[1]: *** [CMakeFiles/Makefile2:148: CMakeFiles/freenect2.dir/all] 오류 2
make: *** [Makefile:136: all] 오류 2

[링크 : https://github.com/OpenKinect/libfreenect2]

[링크 : https://www.notaboutmy.life/posts/run-kinect-2-on-ubuntu-20-lts/]

 

[링크 : https://scazlab.github.io/kinect2_setup_guide.html]

 

+

-DENABLE_CUDA=OFF

[링크 : https://github.com/OpenKinect/libfreenect2/issues/1119]

'프로그램 사용 > kinect' 카테고리의 다른 글

libfreenect2 실행 실패  (0) 2024.07.14
libfreenect2 CUDA 끄고 빌드 성공  (0) 2024.07.13
xbox one S / 기본형?  (0) 2024.06.25
kinect for windows v2 설치  (0) 2024.06.24
kinect2 도착  (0) 2024.06.20
Posted by 구차니
프로그램 사용/kinect2024. 6. 25. 11:37

Xbox One S

얘는.. PC에서 연결하는거랑 똑같네?

 

XBox One 기본형

전용 커넥터가 본체에 똭!

[링크 : https://support.xbox.com/ko-KR/help/hardware-network/kinect/kinect-sensor-not-recognized-by-console]

'프로그램 사용 > kinect' 카테고리의 다른 글

libfreenect2 CUDA 끄고 빌드 성공  (0) 2024.07.13
kinect v2 / freenect 실패  (0) 2024.07.09
kinect for windows v2 설치  (0) 2024.06.24
kinect2 도착  (0) 2024.06.20
오늘의 충동구매 kinect v2 for windows  (0) 2024.06.19
Posted by 구차니
프로그램 사용/kinect2024. 6. 24. 23:22

설치 중에는 딱히 v2 라는 이야기가 없어서 실망(?)

 

먼가.. 먼가.. 밋밋하게 끝 -_-

 

SDK v1.8 과 v2.0 이라..

 

장치 관리자에는 WDF KinectSensor interface 라고 인식된다.

 

설정 확인용 프로그램

처음에 kinect studio를 실행해도 영상이 획득이 안되길래 해봤는데

별 도움은 안되었지만.. 아무튼 USB3.0으로 정상적으로 접속되어야

Kinect Depth and Color Streams 등이 녹색으로 체크가 된다.

최소한 USB 포트가 2.0인지 3.0인지 정상적으로 연결된걸 확인했으니 도움은 된듯

 

 

 

'프로그램 사용 > kinect' 카테고리의 다른 글

kinect v2 / freenect 실패  (0) 2024.07.09
xbox one S / 기본형?  (0) 2024.06.25
kinect2 도착  (0) 2024.06.20
오늘의 충동구매 kinect v2 for windows  (0) 2024.06.19
kinect skeleton tracking  (0) 2022.05.02
Posted by 구차니
프로그램 사용/kinect2024. 6. 20. 23:22

뜯어볼 체력이 없..다 ㅠㅠ

일단 풀박스로 온 듯(!!)

 

 

체력을 끌어모아 열어보는데 무겁고 크다

어딘가의 AR/VR 개발팀에서 써보지도 않고 묵혀놓다고 방출한 듯


열면 키넥트의 상단이 똭!

 

키넥트 층(?)을 빼내면 아래쪽에

메뉴얼과 usb3.0 케이블 그리고 전용 케이블 연결을 위한 허브(?)가 위치한다.

 

메뉴얼은 먼가.. 다른 제품껏도 끌려온거 아닌가 싶은.. 두셋트

그 와중에 110V 식 2구 전원이 2개나 왔네 -_-

전원 / usb3.0 / 전원 / 어댑터(상) / 허브(하) / 메뉴얼 / 메뉴얼

 

문제(?)의 전용 커넥터.

얘는 키넥트 본체와 연결된다. 대충 보면 USB3.0 B 타입 전원형 비슷하게 생겨 먹긴했는데

그렇다고 커넥터가 같은건 또 아님.

 

키넥트 쪽은 말랑말랑 고무로 덧데어져 있긴한데 분해는 안된다.

 

KINECT for WINDOWS HUB

음.. 엑박원에 이걸로는 연결이 안되겠...지?

어댑터는 다행히 100~240V 프리볼트 모델. 빔프로젝터용 220V 2구나 꽂아서 해봐야 할 듯.

'프로그램 사용 > kinect' 카테고리의 다른 글

xbox one S / 기본형?  (0) 2024.06.25
kinect for windows v2 설치  (0) 2024.06.24
오늘의 충동구매 kinect v2 for windows  (0) 2024.06.19
kinect skeleton tracking  (0) 2022.05.02
kinect 윈도우 vs 리눅스  (0) 2022.05.02
Posted by 구차니

테스트 필요

 

현재 경로에서 서브모듈로 다른 프로젝트 추가하기

$ git submodule add https://github.com/chaconinc/DbConnector

 

서브모듈 초기화하고 받아오기 (저장소만 업데이트)

$ git submodule init
Submodule 'DbConnector' (https://github.com/chaconinc/DbConnector) registered for path 'DbConnector'
$ git submodule update

 

혹은 받아올 때 서브모듈 초기화 같이 하기(이게 편리할 듯)

$ git clone --recurse-submodules https://github.com/chaconinc/MainProject

 

서브모듈의 저장소 갱신시 최신버전을 가져오기(git pull ?)

$ git submodule update --remote

 

make 할때 git submodlue update --remote를 추가해두니 편하긴 한데

이래저래 귀찮다. -ㅁ-

 

[링크 : https://git-scm.com/book/ko/v2/Git-도구-서브모듈]

'프로그램 사용 > Version Control' 카테고리의 다른 글

git diff --staged  (0) 2022.09.05
git reset 서버 commit  (0) 2021.09.14
git blame  (0) 2021.06.21
git pull rebase 설정  (0) 2021.06.02
git log --stat  (0) 2021.05.10
Posted by 구차니
프로그램 사용/kinect2024. 6. 19. 12:16

얘는 xbox one 용인가?

xbox 360 용도 있으니 웬지(?) xbox one용도 하나 가지고 싶어지는(!!) ㅋㅋ

그나저나 일본향이라 110V 코드라는데 프리볼트 어댑터면 코드만 바꾸면 되니 머.. 어떻게 되겠지?

 

괜한 욕심이려나?

(4만원에 지름 ㅋㅋ)

'프로그램 사용 > kinect' 카테고리의 다른 글

kinect for windows v2 설치  (0) 2024.06.24
kinect2 도착  (0) 2024.06.20
kinect skeleton tracking  (0) 2022.05.02
kinect 윈도우 vs 리눅스  (0) 2022.05.02
freenect on mac 실패  (0) 2022.04.28
Posted by 구차니

특이하게 설치한다고 바로 되는건 아니고

wireshark - 메뉴 - 도움말 - about - 폴더

에서 extcap 디렉토리가 없으면 생성하고

 

winpcap 설치 경로에서 USBPcapCMD.exe를 복사해 주고 wireshark를 재시작하면

C:\Program Files\USBPcap

 

아래와 같이 USBPcap1 장치가 생겨난다.

 

wireshark가 파란색이 아닌 녹색으로 뜨면서 먼가 캡쳐가 되긴 한다.

[링크 : https://desowin.org/usbpcap/tour.html]

 

usb.dst usb.src==1.4.0 이런식으로 필터링 가능하다

[링크 : https://stackoverflow.com/questions/73715190/wireshark-usb-filtering]

Posted by 구차니