Skip to content

Mac - Accessing an Orbbec Femto Mega requires sudo #124

@jackjansen

Description

@jackjansen

On the Mac you can use a Femto Mega in OrbecViewer or with the SDK, but you have to run your program with sudo.

This issue also occurs with cameras from other vendors (for example the RealSense cameras).

The root cause is that the Femto Mega advertises itself as a USB Universal Video Class device. MacOS handles all USB UVC devices through a daemon called UVCAssistant, which opens the USB device exclusively once it is detected. (UVCAssistant then manages access to the device through the CoreMedia framework. The advantage of this setup is that any webcam is automatically supported in any application).

The problem is this exclusive opening by UVCAssistant: this means that OrbecViewer cannot open the camera anymore.

The workaround is to run OrbecViewer (or your own application) with sudo: this overrides the exclusive use.

A permanent fix would be to somehow convince Apple to implement an exception to this managing of all UVC devices.

To see the analysis of this problem I sketched above:

  • Download IORegistryExplorer. It is part of the Additional Tools for Xcode on the Apple Developer download page.
  • Run it, connect the Orbbec.
  • In the IORegistryExplorer, search for Orbbec, see that the device is connected exclusively to UVCAssistant.
  • Check that trying to also open it with OrbbecViewer fails.
  • Now run sudo OrbbecViewer, which succeeds, and start streaming the RGB.
  • Now IORegistryExplorer will show that UVCAssistant has released the device, and OrbbecViewer has it open.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions