GithubHelp home page GithubHelp logo

Comments (4)

MartyG-RealSense avatar MartyG-RealSense commented on May 22, 2024

Hi @Starblazer75 The impression that I get from the code is that when there are two cameras attached the script cannot distinguish between them as separate RealSense and non-RealSense devices.

The RealSense SDK is able to access RealSense and non-RealSense cameras simultaneously if the non-RealSense camera is designated as a Platform Camera. You can test this in the RealSense Viewer tool when both cameras are attached by clicking the Add Source button at the top of the Viewer's options side-panel and selecting the USB camera from a menu drop-down.

If the USB camera is successfully recognized by Add Source then you can display the RGB streams from the RealSense camera and the non-RealSense camera side by side.

There are not many examples of implementing Platform Camera recognition in Python though unfortunately, other than some code from a pyrealsense2 device handling script called realsense_device_manager.py that determines whether or not the camera is a Platform Camera by reading the identification name of the camera to see whether it contains the words 'platform camera'.

https://github.com/IntelRealSense/librealsense/blob/master/wrappers/python/examples/box_dimensioner_multicam/realsense_device_manager.py#L45

from librealsense.

Starblazer75 avatar Starblazer75 commented on May 22, 2024

When I try turning on any stream of the Platform Camera on realsense-viewer, it gives this error:

30/04 15:28:48,689 INFO [129723605150912] (synthetic-stream-gl.cpp:80) Initializing rendering, GLSL=0
30/04 15:28:48,689 INFO [129723605150912] (synthetic-stream-gl.cpp:89) 0 GPU objects initialized
30/04 15:28:48,729 INFO [129723605150912] (context.cpp:336) Found 2 RealSense devices (mask 0xff)
30/04 15:28:48,746 INFO [129723605150912] (rs.cpp:2697) Framebuffer size changed to 1850 x 1016
30/04 15:28:48,746 INFO [129723605150912] (rs.cpp:2697) Window size changed to 1850 x 1016
30/04 15:28:48,746 INFO [129723605150912] (rs.cpp:2697) Scale Factor is now 1
30/04 15:28:49,040 INFO [129723605150912] (context.cpp:336) Found 1 RealSense devices (mask 0xfe)
30/04 15:28:49,775 WARNING [129722531096128] (sensor.cpp:1291) Failed to add Backlight Compensation control for RGB Camera
30/04 15:28:49,783 WARNING [129722531096128] (sensor.cpp:1291) Failed to add Brightness control for RGB Camera
30/04 15:28:49,801 WARNING [129722531096128] (sensor.cpp:1291) Failed to add Contrast control for RGB Camera
30/04 15:28:49,821 WARNING [129722080020032] (messenger-libusb.cpp:42) control_transfer returned error, index: 100, error: Success, number: 0
30/04 15:28:49,829 WARNING [129722531096128] (sensor.cpp:1291) Failed to add Exposure control for RGB Camera
30/04 15:28:49,848 WARNING [129722531096128] (sensor.cpp:1291) Failed to add Gamma control for RGB Camera
30/04 15:28:49,866 WARNING [129722531096128] (sensor.cpp:1291) Failed to add Hue control for RGB Camera
30/04 15:28:49,885 WARNING [129722531096128] (sensor.cpp:1291) Failed to add Saturation control for RGB Camera
30/04 15:28:49,893 WARNING [129722531096128] (sensor.cpp:1291) Failed to add Sharpness control for RGB Camera
30/04 15:28:49,911 WARNING [129722531096128] (sensor.cpp:1291) Failed to add White Balance control for RGB Camera
30/04 15:28:49,912 WARNING [129722080020032] (messenger-libusb.cpp:42) control_transfer returned error, index: 100, error: Success, number: 0
30/04 15:28:49,930 WARNING [129722531096128] (sensor.cpp:1291) Failed to add Enable Auto Exposure control for RGB Camera
30/04 15:28:49,931 WARNING [129722080020032] (messenger-libusb.cpp:42) control_transfer returned error, index: 200, error: Success, number: 0
30/04 15:28:49,949 WARNING [129722531096128] (sensor.cpp:1291) Failed to add Enable Auto White Balance control for RGB Camera
30/04 15:28:53,377 WARNING [129723605150912] (device-model.cpp:437) Exception caught trying to detect presets: cannot parse device name from 'Platform Camera'
30/04 15:29:06,085 INFO [129723605150912] (sensor.cpp:1594) Request: YUYV Color,
Resolved to: YUYV Color,
Segmentation fault

A side note is that I am now using an x86 computer with Ubuntu 22.04, and when running realsense-viewer without sud o permissions, it gives an error that says it failed to set power state. This was a common problem for me, so I just gave the librealsense source file root permissions for it to keep working. Is this a potential problem?

I will keep working on a solution and let you know if I find anything

from librealsense.

Starblazer75 avatar Starblazer75 commented on May 22, 2024

Turns out to be a USB bandwidth problem. Not sure why some of the other errors were happening, but the specific one that I am worried about works fine when lowering the quality of the frames. Sorry about that, because it was only happening with the realsense camera I didn't think to modify the working cameras.

from librealsense.

MartyG-RealSense avatar MartyG-RealSense commented on May 22, 2024

It's no problem at all. I'm pleased to hear that you diagnosed the problem. Thanks very much for the update!

from librealsense.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.