Repository navigation
Cannot get Protonect Viewer running on the Tegra X1 #480
Copy link
Copy link
Closed
Labels
Description
I'm trying to get libfreenect2 working on the Nvidia Tegra X1 and I'm having issues displaying anything from the viewer. The main viewer window opens, but it is blank. The log output seems to indicate that the TurboJpegRgbPacketProcessor is running at 20Hz.
Should I expect that this should work on the tegra X1 (or K1)? let me know if there is any other output I can give you to help diagnose.
Protonect Output
$ ./bin/Protonect
Environment variables: LOGFILE=<protonect.log>
Usage: ./bin/Protonect [gl | cl | cpu] [<device serial>] [-noviewer]
[Info] [Freenect2Impl] enumerating devices...
[Info] [Freenect2Impl] 17 usb devices connected
[Info] [Freenect2Impl] found valid Kinect v2 @10:4 with serial 068176734547
[Info] [Freenect2Impl] found 1 devices
freenect2.openDevice.
[Info] [Freenect2DeviceImpl] opening...
[Info] [Freenect2DeviceImpl] opened
[Info] [Freenect2DeviceImpl] starting...
[Debug] [Freenect2DeviceImpl] ReadData0x14 response
[Debug] [Freenect2DeviceImpl] 92 bytes of raw data
0x0000: 00 00 12 00 00 00 00 00 01 00 00 00 43 c1 1f 41 2e2e2e2e2e2e2e2e2e2e2e2e432e2e41
0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e
0x0020: 0a 21 33 55 c2 00 17 20 00 08 00 00 10 00 00 00 2e2133552e2e2e202e2e2e2e2e2e2e2e
0x0030: 00 01 00 00 00 10 00 00 00 00 80 00 01 00 00 00 2e2e2e2e2e2e2e2e2e2e802e2e2e2e2e
0x0040: 31 33 00 00 00 03 11 17 47 48 57 31 32 35 2e 31 31332e2e2e2e2e2e4748573132352e31
0x0050: 58 00 00 00 00 00 00 00 00 00 00 00 582e2e2e2e2e2e2e2e2e2e2e
[Debug] [Freenect2DeviceImpl] ReadStatus0x090000 response
[Debug] [Freenect2DeviceImpl] 4 bytes of raw data
0x0000: 7f 26 00 00 7f262e2e
[Debug] [Freenect2DeviceImpl] ReadStatus0x090000 response
[Debug] [Freenect2DeviceImpl] 4 bytes of raw data
0x0000: 7f 26 00 00 7f262e2e
[Info] [Freenect2DeviceImpl] enabling usb transfer submission...
[Info] [Freenect2DeviceImpl] submitting usb transfers...
[Info] [Freenect2DeviceImpl] started
device serial: 068176734547
device firmware: 1.1.3326.0.7
[Error] [RgbPacketStreamParser] packetsize or sequence doesn't match!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
^C[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Info] [TurboJpegRgbPacketProcessor] avg. time: 50.2055ms -> ~19.9181Hz
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
[Debug] [RgbPacketStreamParser] skipping rgb packet!
Host Details
$ uname -a
Linux tegra-ubuntu 3.10.67-g3a5c467 #1 SMP PREEMPT Fri Oct 30 14:26:17 PDT 2015 aarch64 aarch64 aarch64 GNU/Linux
$ head -1 /etc/nv_tegra_release
# R23 (release), REVISION: 1.1, GCID: 6220086, BOARD: t210ref, EABI: hard, DATE: Fri Oct 30 21:33:12 UTC 2015
Activity
xlz commentedon Nov 25, 2015
Have you enabled USB 3.0 and disabled USB autosuspend?
Also,
LIBUSB_DEBUG=3 ./Protonectanddmesg.xlz commentedon Nov 25, 2015
May be related: #481
Things to do:
git checkout v0.1-rc1, rebuild, and run itgdb ./Protonect,run, Ctrl-C,thread apply all backtraceandbt fullbigcmos commentedon Nov 30, 2015
jetson_x1_dmesg.txt
jetson_x1_protonect.txt
yes.
usb_port_owner_info=2
usbcore.autosuspend=-1
bigcmos commentedon Nov 30, 2015
bigcmos commentedon Nov 30, 2015
Added some logging and let it run for a while, looks like I'm not getting the correct footer in the DepthPacketStreamParser (see below).
[Info] [DepthPacketStreamParser] [zdaa] DepthPacketStreamParser::onDataReceived footer in_length: 28312, footer_found: 0, wb.length: 0, wb.capacity: 298496
[Info] [DepthPacketStreamParser] [zdaa] DepthPacketStreamParser::onDataReceived memcpy in_length: 28312, footer_found: 0
6
xlz commentedon Dec 1, 2015
28312 is strange. It's far from a round number. There are a lot of these
tegra-xhci tegra-xhci: WARN Event TRB for slot 4 ep 8 with no TDs queued?in dmesg, this is also not normal. Also, libusb has[handle_iso_completion] low-level USB error -18. 18 is EXDEV, meaning iso transfers are partially completed or something.Things to do:
lspci -nn.sudo sh -c 'for dev in /sys/bus/usb/devices/*/power/autosuspend; do echo -1 >$dev; done'floe commentedon Dec 23, 2015
Still an issue? Otherwise, please close.
soulslicer commentedon Dec 23, 2015
Can I know if anyone got libfreenect2 to work with tegra?
xlz commentedon Dec 24, 2015
It works on Tegra K1. I don't have a Tegra X1 so no idea about it.
soulslicer commentedon Dec 25, 2015
Does it work with OpenCL or does it run on the CPU?
On Thu, Dec 24, 2015 at 9:07 AM, Lingzhu Xiang notifications@github.com
wrote:
xlz commentedon Dec 25, 2015
There is no OpenCL support for Tegra K1. It works with OpenGL.
bigcmos commentedon Dec 26, 2015
Still an issue.
Will send this when I'm back in the office in Jan.
Yes, using 1.0.20.
Yes, I tried this the first time, but had to fix it every time I plugged/unplugged the USB. Is there a good way to test if autosuspend is working?
I don't think it is too slow. I was able to run 3 separate USB cameras @ 40 Hz with no problem.
I'm at the newest supplied by Nvidia. I would have to build a new Kernel. Do you have an idea of what kernel people are using on the TK1 that is succeeding?
hanyazou commentedon Jan 31, 2016
I bought my TK1 and setup today. And Protonect prints many 'skipping rgb packet!' message without any image.
I found that ./bin/Protonect uses /usr/lib/arm-linux-gnueabihf/mesa/libGL.so instread of tegra/libGL.so.
My setup steps:
I found that libgl1-mesa-dev package overwrite /usr/lib/arm-linux-gnuapihf/libGL.so -> tegra/libGL.so symbolic link. I'm not sure which step introduced the libgl1-mesa-dev package. I guess 'apt-get install mesa-common-dev' in the libfreenect2 build instruction depends the libgl1-mesa-dev.
@bigcmos please check your libGL.so with ldd
xlz commentedon Jan 31, 2016
The overwrite is an old known issue. See the top sticky post https://devtalk.nvidia.com/default/board/162/ Notice On apt-get upgrade: libglx.so Corruption
12 remaining items
marketto89 commentedon Feb 18, 2016
Are there any news about libfreenect2 with the Jetson TX1?
I tried to make it work but I had the same
[Debug] [RgbPacketStreamParser] skipping rgb packet!error lines.xlz commentedon Feb 18, 2016
This is not an error. You see it's a debug message.
CUDA support is merged. The Tegra hardware JPEG decoder support for TK1 is in #576, almost merged. It is probably easy to support TX1's hardware JPEG decoder but I don't have one so I'm unable to tell.
xlz commentedon Feb 18, 2016
If you have a TX1, maybe you can try it out and tell us what is needed.
marketto89 commentedon Feb 19, 2016
Yes, the problem seems related to the missing Tegra hardware JPEG decoder.
An
ldd Protonect | grep jpegreturns the following line:libturbojpeg.so.0 => /usr/lib/arm-linux-gnueabihf/libturbojpeg.so.0 (0xf702e000)I tried to look for
/usr/lib/arm-linux-gnueabihf/tegra/libjpeg.sowith no success.How can I fix this problem?
xlz commentedon Feb 19, 2016
TX1 seems to name libjpeg.so to libnvjpeg.so but their content is the same. What specific errors did you get?
marketto89 commentedon Feb 19, 2016
Thank you for the information about libnvjpeg.so
Actually I have no errors, but as I said I see a lot of
[Debug] [RgbPacketStreamParser] skipping rgb packet!.I also found that
cmakedoes not find Tegra JPEG even if I put a symbolic link from/usr/lib/arm-linux-gnueabihf/tegra/libjpeg.soto/usr/lib/arm-linux-gnueabihf/tegra/libnvjpeg.so. Is it an error?I remember that with the TK1 I saw the tegra/libjpeg.so correctly linked with
ldd Protonect.xlz commentedon Feb 19, 2016
What is the Tegra related output from CMake? It Should be able to find libnvjpeg.so.
xlz commentedon Feb 19, 2016
It no longer links to libjpeg because users use other things linked to the standard libjpeg and this tegra libjpeg creates symbol conflicts. Now it dlopen's at runtime.
marketto89 commentedon Feb 19, 2016
Here is the CMake output I got:
cmake_output.txt
and, after the compilation, this is the protonect output:
protonect_output.txt
xlz commentedon Feb 19, 2016
TegraJPEG has to be enabled to provide the native support.
CMake didn't find the tegra headers. It is supposed to extract gst_jpeg.tbz2 to build/gst_jpeg, and there should be nv_headers/jpeglib.h under build/gst_jpeg. Can you take a look there and see why it didn't find it, and provide
CMakeFiles/CMakeError.log?marketto89 commentedon Feb 19, 2016
Well, I can't see the folder you mentioned.
This is the
CMakeFiles/CMakeError.log:CMakeError.log.txt
xlz commentedon Feb 19, 2016
CMake is supposed to tar xfj gst_jpeg.tbz2 but it didn't. I don't have specific instructions but can you look at cmake --debug or cmake --trace around this line https://github.com/OpenKinect/libfreenect2/blob/master/cmake_modules/FindTegraJPEG.cmake#L51
xlz commentedon Feb 19, 2016
The directory is actually supposed to be
build/gstjpeg_srcandnv_headers/jpeglib.hunderbuild/gstjpeg_src.xlz commentedon Mar 11, 2016
This thread kind of digressed. All TX1 issues to be followed up in #581.