• DepthAI
  • OAK-D-IoT-75 with raspberry pi.

Hi Erik Thanks for your response. Right now even a simple code where i am just displaying video from Right Mono Camera is not working. It is giving both of the above errors on Jetson Nano. Below is the given code.

import cv2

pipeline = dai.Pipeline()
cam = pipeline.create(dai.node.MonoCamera)
cam.setBoardSocket(dai.CameraBoardSocket.RIGHT)
cam.setFps(6)
cam.setResolution(dai.MonoCameraProperties.SensorResolution.THE_800_P)

xoutRight = pipeline.create(dai.node.XLinkOut)
xoutRight.setStreamName('right')
cam.out.link(xoutRight.input)

with dai.Device(pipeline) as device:
    qRight = device.getOutputQueue(name="right", maxSize=4, blocking=False)
    while True:
        inRight = qRight.get()
        if inRight is not None:
            cv2.imshow("right", inRight.getCvFrame())
        if cv2.waitKey(1) == ord('q'):
            break`
  • erik replied to this.

    Hi msee19018 , what's the USB mode used (this example logs it in terminal)? Are you using USB2 cable? Could you also try the same code with the same cable/OAK on a laptop/PC?
    Thanks, Erik

    I am using the cable that i got with the device. It is usb3 and when i run the above mentioned code it prints out Usb speed: SUPER on both my PC and jetson nano. Even this script crashes after printing for a little time.

    • erik replied to this.

      msee19018 Interesting.. I suspect it's the low FPS issue, could you try commenting out that line? If it is, I will also report it to firmware devs so they can have a look at it.
      Thanks, Erik

      Hi Erik, I tried using high FPS but even that did not solve the problem. I tried the same code again with Jetson Nano after rebooting the Nano and to my surprise it started working. Now the situation is the same code works with Nano on oak-d device and it does not work with RPi 4. It gives same error segmentation fault and bus error. The code I am referring to is the long code that i pasted above. It has a script node then a neural network node and then finally again a script node to post process networks output. Basically I am using CRNN to recognize digits from pre-defined positions from frames of Mono camera. Can you please suggest a solution?
      Another thing that might help you is if i connect oak-d with my PC and then again connect it with my Nano. It starts giving the same errors i think this is what happened last time that is why it stopped working with Nano. But now I am connecting it only with Nano from the beginning and it is working fine. But the same solution does not work with RPi. I finally need to deliver solution with RPi. So please look into it?

      • erik replied to this.

        Hello msee19018 ,
        From our previous communication, I am not sure if you are using the preconfigured RPi image that we provide. As there are quite a few things you have to be mindful of when installing all the required packages so DepthAI works as expected. Could you please confirm that?
        Thanks, Erik

        Hi Erik, I am using these pre configured images. I would try this now can you tell which one I should download? I Have oak-d-iot-75?

        • erik replied to this.

          Hi msee19018 , Probably the latest OAK_CM4_POE version, so V8.
          Thanks, Erik

          4 days later

          Hi Erik I did that, I burned the above mentioned image on my SD card. It worked for a couple of times but then again it started giving the error. I have pasted the pic of error below. It is different from above errors(bus error and segmentation fault). So at least that problem is gone. Can you please look what is causing this problem?

          • erik replied to this.

            Hi msee19018 , could you first try running depthai_demo application and copy the log? My first assumption would be that you are using USB2 instead of USB3 cable, which causes the app to crash.
            Thanks, Erik

            No that is not the case. The cable is same which I was using earlier. It prints speed: Super if I use rgb_preview example, that you mentioned above. I will use depthai_demo. Another thing is as i mentioned above it worked a couple of times on same code.

            • erik replied to this.

              Here are some more explanation and photos of error. As i have mentioned above it works some times too. I have found out that if I turn on my RPi (after shutting it down for sometime) the script starts working and it works fine for some time before it starts giving the error after that nothing works on RPi even the simplest scripts. I do not know why it works after resting RPi for some time. I was working on it yesterday after it started giving me the error I turned off RPi and I turned it on just now and it again worked for like an hour and then again it started giving the error and right now nothing works on RPi and the RPi is giving a pretty detailed error I have pasted its photos below. It was giving same error yesterday too. Please have a look.

              • erik replied to this.

                Hello msee19018 , Which version of the depthai library are you currently using? It looks like it's a special version from all the verbose logging.

                It is the same version that came with the prebuilt image. Its version is 2.13.3.0.dev. I have also attached the screen shoot.

                • erik replied to this.

                  Hi msee19018 , Could you try updating depthai to the latest version? 2.13 is a bit old, and we might have fixed this issue already in updates.
                  THanks, Erik

                    Hi Erik, I updated my depthai module but it did solve the problem. It is still giving same problem. First I updated it to 2.14 version of depthai, in this case error was the one like in the image above where it says "RuntimeError: Communication exception - possible device error/misconfiguration".
                    Then I updated the depthai to latest version 2.15.4.0 and it again started giving the Bus error. Here is the screen shoot from RPi.

                    7 days later

                    Hi msee19018 ,
                    Could you please confirm the following:

                    1. OAK-D IOT is powered externally with a power source
                    2. OAK-D IOT is connected to the RPi with the USB 3 cable, and when running device.getUsbSpeed() it returns SUPER
                    3. RPiis sufficiently powered
                    4. You are using one of the code samples
                    5. You are using latest preconfigured RPi OS (CM4-POE-V8.7z)
                      Thanks, Erik

                    Hi Erik, Yeah all of the above are correct. There is one thing that i want to tell. If I start with simple codes like rgb_preview it works fine. But when I run my own code and it starts giving above errors. After this nothing works not even the simple code samples.

                    • erik replied to this.