• Video Window Does not render

erik

Hi Erik,

One last thing I decided to try before the calibration was to set this up on my MacBook Pro running Ventura 13.3.1 (a). So when I ran the depthai_demo.py script, the RGB camera still showed no video, just like the Raspberry PI, but I feel like I got more output that may help determine what is going on with the RGB camera. I am trying to rule out of this is a physical or configuration issue with the OAK-D Lite. See below:

(base) Brians-MacBook-Pro:depthai brianhouse$ python3 depthai_demo.py

Using depthai module from:  /Users/brianhouse/.local/lib/python3.9/site-packages/depthai.cpython-39-darwin.so

Depthai version installed:  2.20.2.0

Setting up demo...

Available devices:

[0] 184430100149620E00 [X_LINK_UNBOOTED]

USB Connection speed: UsbSpeed.SUPER

/Users/brianhouse/.local/lib/python3.9/site-packages/depthai_sdk/previews.py:186: RuntimeWarning: invalid value encountered in cast

  dispFrame = (dispFrame * 255. / dispIntegerLevels).astype(np.uint8)

Stopping demo...

=== TOTAL FPS ===

  File "/Users/brianhouse/Luxonis/depthai/depthai_demo.py", line 656, in run

    self.instance.run_all(self.conf)

  File "/Users/brianhouse/Luxonis/depthai/depthai_demo.py", line 133, in run_all

    self.run()

  File "/Users/brianhouse/Luxonis/depthai/depthai_demo.py", line 317, in run

    self.loop()

  File "/Users/brianhouse/Luxonis/depthai/depthai_demo.py", line 373, in loop

    self._pv.prepareFrames(callback=self.onNewFrame)

  File "/Users/brianhouse/.local/lib/python3.9/site-packages/depthai_sdk/managers/preview_manager.py", line 148, in prepareFrames

    packet = queue.tryGet()

RuntimeError: Communication exception - possible device error/misconfiguration. Original message 'Couldn't read data from stream: 'color' (X_LINK_ERROR)'

    jakaskerl

    Yes all scripts referencing the right and left mono cameras work perfect. Just the RGb does nothing.

    Specifically I have been trying to compare and contrast the rgbpreview.py (that does nothing, generates no errors but does not even render a black window) and mono_preview.py that does work. I am trying to debug these variables in pycharm:

    xoutLeft = pipeline.create(dai.node.XLinkOut)

    According to the hellow world example provided in the documentation, this is where the camera gets 'added' whether it be RGB or Monjo. I am trying to figure out what is different with the camera that works and the one that doesnt.

    Anything specific I could look at to determine where the issue may lie.

    I was looking at the connection attribute but is says 'None' for the value for both cameras so that is not a good indicator why one would work and one would not. Any variable specifically I could set a debug 'watch' to shed more light on this?

      Hi BrianHouse
      I feel like the XLink for color just isn't sending frames to a queue correctly. When reading from the rgb queue with .get() the script probably blocks, since there is no frame to be read and .get() is a blocking function.
      I believe since you are running all the latest versions of software, it might be a hardware fault.

      Could you:

      • try to run the pipeline graph tool to see where the stream stops
      • try the same script with the same camera and usb cable on a PC to confirm

      Thanks,
      Jaka

        jakaskerl

        Here is the output from first running mono_preview.py which does work:

        (base) Brians-MacBook-Pro:examples brianhouse$ pipeline_graph run "python3 MonoCamera/mono_preview.py"

        Pipeline schema retrieved

        Program exited.

        0. MonoCamera.out (10) -> XLinkOut.in (2)

        1. MonoCamera.out (6) -> XLinkOut.in (1)

        Here is the output from rgb_preview.py which does not work:

        (base) Brians-MacBook-Pro:examples brianhouse$ pipeline_graph run "python3 ColorCamera/rgb_preview.py"

        Pipeline schema retrieved

        Program exited.

        0. ColorCamera.preview (8) -> XLinkOut.in (1)

        • erik replied to this.

          Hi BrianHouse ,
          We apologize for taking this long to debug.. Could you just try the last thing, the cam_test.py, and copy the terminal output? My guess is that ColorCam is connected, but will stream 0 FPS, which means the cable isn't properly connected on the PCBA. In such case, we will replace the device asap.
          Sorry again!

            erik

            Are there other modules I am going to need"?

            (base) Brians-MacBook-Pro:tests brianhouse$ python3 cam_test.py 

            Traceback (most recent call last):

              File "cam_test.py", line 45, in <module>

                import cam_test_gui

            ModuleNotFoundError: No module named 'cam_test_gui'

            (base) Brians-MacBook-Pro:tests brianhouse$ 

            also I noticed it has a lot of options which ones do you want me to run?

              BrianHouse

              ok, I figured out all the dependencies. I have Camera Test working. I guess I take all the defaults to the prompts and 'connect' to the device"?

                BrianHouse

                Here is the output:

                (base) Brians-MacBook-Pro:tests brianhouse$ python3 cam_test.py 

                Enabled cameras:

                    rgb : color

                   left : mono

                  right : mono

                   camd : color

                DepthAI version: 2.21.2.0

                DepthAI path: /Users/brianhouse/Library/Python/3.8/lib/python/site-packages/depthai.cpython-38-darwin.so

                [184430100149620E00] [20.4.2] [0.989] [ColorCamera(8)] [error] Camera not detected on socket: 3

                [184430100149620E00] [20.4.2] [0.990] [MonoCamera(6)] [error] OV7251 only supports THE_480_P/THE_400_P resolutions, defaulting to THE_480_P

                [184430100149620E00] [20.4.2] [0.990] [MonoCamera(4)] [error] OV7251 only supports THE_480_P/THE_400_P resolutions, defaulting to THE_480_P

                Connected cameras:

                 -socket RGB   : IMX214 4208 x 3120 focus:auto  - COLOR

                 -socket LEFT  : OV7251  640 x  480 focus:fixed - MONO

                 -socket RIGHT : OV7251  640 x  480 focus:fixed - MONO

                USB speed: SUPER

                IR drivers: []

                Cam:      rgb           left          right         camd     [host | capture timestamp]

                FPS:   0.00|  0.00  30.15| 30.01  30.16| 30.01   0.00|  0.00Exiting cleanly

                  5 days later

                  How long did it take to get your replacement?

                  Another one with the same issue. Super frustrating way to run support on a forum!

                  PS C:\Users\Adam\source\repos\depthai-python\utilities> python cam_test.py

                  Enabled cameras:

                  rgb : color

                  left : mono

                  right : mono

                  camd : color

                  DepthAI version: 2.21.2.0

                  DepthAI path: C:\Users\Adam\AppData\Roaming\Python\Python311\site-packages\depthai.cp311-win_amd64.pyd

                  [1844301071BC600E00] [1.3] [0.713] [ColorCamera(8)] [error] Camera not detected on socket: 3

                  [1844301071BC600E00] [1.3] [0.713] [MonoCamera(6)] [error] OV7251 only supports THE_480_P/THE_400_P resolutions, defaulting to THE_480_P

                  [1844301071BC600E00] [1.3] [0.714] [MonoCamera(4)] [error] OV7251 only supports THE_480_P/THE_400_P resolutions, defaulting to THE_480_P

                  Connected cameras:

                  -socket RGB : IMX214 4208 x 3120 focus:auto - COLOR

                  -socket LEFT : OV7251 640 x 480 focus:fixed - MONO

                  -socket RIGHT : OV7251 640 x 480 focus:fixed - MONO

                  USB speed: SUPER

                  IR drivers: []

                  Cam: rgb left right camd [host | capture timestamp]

                  FPS: 0.00| 0.00 30.00| 30.01 30.00| 30.01 0.00| 0.00Communication exception - possible device error/misconfiguration. Original message 'Couldn't read data from stream: 'rgb' (X_LINK_ERROR)'

                  Exiting cleanly

                    AdamShortland

                    Hi Adam,

                    I have not received it yet. I also asked them for tracking info which I have not received yet.

                    Brian