2

I'm running a 3D SLAM application (RTAB-Map) on my Raspberry Pi 3 with Raspbian Jessie. The sensor I'm using is a Kinect v1 (Xbox 360) camera connected to one of the USB ports.

I've installed libfreenect from source, following this tutorial. After the tutorial, I was able to run the sample tests normally, but after I've installed OpenCV from source, the problem started. Most times (~90%) I try to start the mapping process on RTAB-Map (or when I try one of the demos from libfreenect) I get one of the following errors:

send_cmd: Output control transfer failed (-1)
freenect_fetch_reg_pad_info: send_cmd read -1 bytes (expected 8)
freenect_camera_init(): Failed to fetch registration pad info for device

or

send_cmd: Input control transfer failed (18)
freenect_fetch_reg_pad_info: send_cmd read 18 bytes (expected 118)

Every now and then, libfreenect actually starts working and I manage to run the application.

What is causing this behavior? How can I fix it?

Thanks in advance. I'll provide any additional details necessary.

UPDATE

Here's part of the output from dmesg:

[ 2137.035095] usb 1-1.5.3: USB disconnect, device number 13
[ 2140.086494] usb 1-1.5.3: new high-speed USB device number 14 using dwc_otg
[ 2140.189807] usb 1-1.5.3: New USB device found, idVendor=045e, idProduct=02ae
[ 2140.189831] usb 1-1.5.3: New USB device strings: Mfr=2, Product=1, SerialNumber=3
[ 2140.189845] usb 1-1.5.3: Product: Xbox NUI Camera
[ 2140.189857] usb 1-1.5.3: Manufacturer: Microsoft
[ 2140.189869] usb 1-1.5.3: SerialNumber: A00366814383041A
[ 2140.190947] gspca_main: kinect-2.14.0 probing 045e:02ae
[ 2972.032617] gspca_main: kinect-2.14.0 probing 045e:02ae
[ 2972.036198] gspca_main: kinect-2.14.0 probing 045e:02ae
[ 2972.218569] usb 1-1.5.3: USB disconnect, device number 14
[ 2975.012840] usb 1-1.5.3: new high-speed USB device number 15 using dwc_otg
[ 2975.116115] usb 1-1.5.3: New USB device found, idVendor=045e, idProduct=02ae
[ 2975.116138] usb 1-1.5.3: New USB device strings: Mfr=2, Product=1, SerialNumber=3
[ 2975.116152] usb 1-1.5.3: Product: Xbox NUI Camera
[ 2975.116165] usb 1-1.5.3: Manufacturer: Microsoft
[ 2975.116177] usb 1-1.5.3: SerialNumber: A00366814383041A
[ 2975.117261] gspca_main: kinect-2.14.0 probing 045e:02ae

Things I've tried:

  • Reserving memory: vm.min_free_kbytes = 32768 in /etc/sysctl.conf
  • Copying udev rules: sudo cp /libfreenect/platform/linux/udev/51-kinect.rules /etc/udev/rules.d
  • ln -s /home/[my username]/.Xauthority /root/.Xauthority
  • Blacklisting gspca_kinect driver: sudo nano /etc/modprobe.d/raspi-blacklist.conf > blacklist gspca_kinect
0

The problem was solved in the following commit: raspberry pi3 fix.

So, apparently, it was a timing issue. Now the sensor starts normally every time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.