Closed alex-precosky closed 5 years ago
Forgot to add, I'm using this USB 3.0 PCIe card http://www.vantecusa.com/products_detail.php?p_id=119
Hi @alex-precosky
Well, on Linux librealsense is just a fancy wrapper on top of V4L2 really. So yavta is as good a tool as any for the job. In fact, we have the same check in backend-v4l2.cpp:959-968
What about the built-in USB3 port on the Jetson? From my experience with the Jetson, it should be absolutely capable of handling 1080p. There might be a lost frame here and there, but nothing major.
Also, I might be saying something stupid (being Jetson newbie and all) but did you try it with jetson_clocks.sh
?
Cool thx for the info! Helpful to know it should indeed be possible to get that resolution.
I've tried the built-in USB3 port but the output is the same, in fact the exact same number of bytes are missing from the image when I use the built-in port. Yep I've run jetson_clocks.sh
I've only applied the two kernel patches listed in my first message, but maybe I need to patch using the approved method. Looks like some USB stuff in there. I'll see what I can do.
I think you can safely rule out kernel patches. The RGB sensor on the D400 / SR300 should behave 100% as a UVC compliant web-cam, with no extra steps. The only unusual thing about these cameras is that they work in Bulk USB mode and not Isochronous. Later is more widespread among web-cams. This can be related to what you are seeing if there is another high bandwidth device on the same USB controller (either another camera or maybe something like external drive)
Ah gotchya. Just in case, I'm going to try taking the stock L4T kernel and applying the recommended patches and see if that makes a difference, since I might have other weird things set up in the kernel I was using. I'll keep this ticket updated with whatever I find
Sadly no luck still. I tried a bunch of different D435 cameras just to make sure, and a few different Jetson TX2 boards. And tried building a kernel using https://github.com/jetsonhacks/buildJetsonTX2Kernel.git and booting off that on a stock Tegra JetPack system image but the problem remained. I'll see if Nvidia has any ideas. For my application, I only need 15 fps so I'll just take the 30 fps image stream and throw away bad frames as necessary.
As another data point on this issue, I tried a different 1080p 30 fps YUYV output USB3 camera on this platform, and the frames are all complete without anything missing, and they appear fine when I inspect the images after acquiring them with yavta:
Device /dev/video3 opened: e-con's CX3 RDK with OV5640 (usb-0000:04:00.0-1).
Video format set: width: 1920 height: 1080 buffer size: 4147200
Video format: YUYV (56595559) 1920x1080
Current frame rate: 1/30
Setting frame rate to: 1/30
Frame rate set: 1/30
8 buffers requested.
length: 4147200 offset: 0
Buffer 0 mapped at address 0x7faf341000.
length: 4147200 offset: 4149248
Buffer 1 mapped at address 0x7faef4c000.
length: 4147200 offset: 8298496
Buffer 2 mapped at address 0x7faeb57000.
length: 4147200 offset: 12447744
Buffer 3 mapped at address 0x7fae762000.
length: 4147200 offset: 16596992
Buffer 4 mapped at address 0x7fae36d000.
length: 4147200 offset: 20746240
Buffer 5 mapped at address 0x7fadf78000.
length: 4147200 offset: 24895488
Buffer 6 mapped at address 0x7fadb83000.
length: 4147200 offset: 29044736
Buffer 7 mapped at address 0x7fad78e000.
0 (0) [-] 0 4147200 bytes 18665.700342 1543367715.818434
1 (1) [-] 1 4147200 bytes 18665.733670 1543367715.851539
2 (2) [-] 2 4147200 bytes 18665.766974 1543367715.884921
3 (3) [-] 3 4147200 bytes 18665.800321 1543367715.918279
4 (4) [-] 4 4147200 bytes 18665.833653 1543367715.951602
5 (5) [-] 5 4147200 bytes 18665.866985 1543367715.984937
..
[Realsense Customer Engineering Team Comment] Hi alex-precosky,
Wonder if there is any update from you? Also any info from nvidia side as you wanted to check? I managed to repeat what you mentioned off a TX2 (w L$T 4.4.38 28.2), and got similar issue of not being able to capture all the frames. I will try to dig into it and see if I can find out more.
Thanks!
Hi alex-precosky,
Wonder if there is any update on this one?
Here are some comments: As for a sanity check, there is no issue off an Intel NUC i5 with Ubuntu 16.04 when doing same yavta tests. D435 supports YUYV 1920x1080 30fps (check with v4l2-ctl command), and uses USB Bulk mode (lsusb info). To my understanding, it would indicate that there would some improvement outside RealSense SDK (comparing NUC i5 vs. TX2), and should have nothing to do with RealSense optimization.
Thanks!
Hi alex-precosky,
Is there still anything needing help? Otherwise, this one will be closed soon.
Thanks!
Hi thanks for the reply. I think I'm fine - I've worked around the issue by filtering out the partial frames and setting the frame rate higher than I need, and this seems fine.
Issue Description
Sorry if this is covered elsewhere. I searched through online documentation and old issues.
Kernel version as above, but I've also the following two kernel patches applied: realsense-metadata-ubuntu-xenial-master.patch realsense-camera-formats_ubuntu-xenial-master.patch
I'm attempting to use V4L2 to acquire at the highest resolution, 1920x1080 @ 30fps using yavta (https://github.com/fastr/yavta) from the /dev/video* device representing the colour image. Up to 964x540@60 I'm able to record proper images. Anything higher in resolution though and I seem to start getting partial images, i.e. they only seem to have a few rows of pixels in them. The yavta tool even warns me of this. Even at lower frame rate, i.e. 6 fps, this still occurs at the higher resolutions. I'll paste some sample output below:
Is this something I might expect to be resolved if I use librealsense in an application instead of just using a stock V4L2 recording application? If it would help answer this question, I'll get realsense-viewer compiled for my board and try with that to see if I can get this resolution in there. Thought I would ask here first though in case someone knows right away any obvious issue with my setup.