Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raspberry Pi 4: libuvc vs v4l2 backend differences? #6943

Closed
dbolkensteyn opened this issue Jul 27, 2020 · 4 comments
Closed

Raspberry Pi 4: libuvc vs v4l2 backend differences? #6943

dbolkensteyn opened this issue Jul 27, 2020 · 4 comments

Comments

@dbolkensteyn
Copy link
Contributor

This tutorial on how to use RealSense cameras on Raspberry Pi 4s mentions: https://dev.intelrealsense.com/docs/open-source-ethernet-networking-for-intel-realsense-depth-cameras

When building for the Raspberry Pi
-DFORCE_RSUSB_BACKEND=ON flag is also strongly recommended.

However this page on build options mentions: https://github.com/IntelRealSense/librealsense/wiki/Build-Configuration

FORCE_LIBUVC
libuvc can serve as a more robust alternative to the native backend, however, it has well known limitations and is not recommended to be used in end-products (please use FORCE_RSUSB_BACKEND cmake flag instead)

During my initials tests, I managed to get both rs-enumerate-devices and rs-depth work under the two modes.

Hence my questions:

  1. What are the well-known limitations of libuvc, and why is it not recommended in end-products?
  2. Why, specifically for the Raspberry Pi 4, is the libuvc mode recommended nevertheless?

Thank you for shedding some light on this!

@dbolkensteyn dbolkensteyn changed the title Raspberry Pi 4: libuvc vs vl4c backend differences Raspberry Pi 4: libuvc vs vl4c backend differences? Jul 27, 2020
@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Jul 27, 2020

Hi @dbolkensteyn For answers to your first question, please visit the link below and scroll down through the linked-to comment to the section headed What are the advantages and disadvantages of using libuvc vs patched kernel modules?

#5212 (comment)

In regard to the second question, using libuvc on devices with Arm processors makes librealsense easier to deploy and helps to avoid complications with kernel patching, as mentioned in the 'advantages' list in the link above.

@dbolkensteyn
Copy link
Contributor Author

Thanks a lot @MartyG-RealSense

My understanding after reading the comment you referenced is:

  1. If no frame metadata beyond timestamps are needed, v4l2 on an unpatched kernel is the best option (as it has official support/maintainers, unlike libuvc)
  2. If frame metadata are needed, then the ideal route would be to go for the patched kernel option which is officially supported and more reliable.
  3. If that kernel patching is too demanding, or for debugging purposes, libuvc is an easier but unsupported route.

Is my understanding correct here?

@dbolkensteyn dbolkensteyn changed the title Raspberry Pi 4: libuvc vs vl4c backend differences? Raspberry Pi 4: libuvc vs v4l2 backend differences? Aug 2, 2020
@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 3, 2020

If you are seeking a highly stable production-level professional build then your understanding in each of your points is correct. Though the patch-based build process is undoubtedly more complex than libuvc-backend / RSUSB backend over an internet connection, there are clear reasons why it is the recommended method in the documentation for building from source code even though an internet-based build is much simpler.

For test builds and hobbyist / experimental projects that use a single camera, or on devices that the patch-based install process will not work with, libuvc / RSUSB is clearly advantageous for getting a librealsense setup up and running quickly.

@dbolkensteyn
Copy link
Contributor Author

Thanks a lot @MartyG-RealSense , all clear

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants