• DepthAI
  • Not able to run a demo script on Raspberry pi for OAK-1

I'm trying to access OAK-1 and run the demo script from deapthai repo.
But it always fails with an exception.
Tried it on macOS, works perfectly.

Below is the exception:
pi@raspberrypi:/depthai $ python3 depthai_demo.py -usbs usb2
Using depthai module from: /home/pi/.local/lib/python3.7/site-packages/depthai.cpython-37m-arm-linux-gnueabihf.so
Depthai version installed: 2.15.2.0
qt5ct: using qt5ct plugin
Setting up demo...
Available devices:
[0] 1844301091FD340E00 [X_LINK_UNBOOTED]
Floating point exception
Error while running demo script... Command '"/usr/bin/python3" depthai_demo.py -usbs usb2 --noSupervisor --guiType qt' returned non-zero exit status 136.
Waiting 5s for the device to be discoverable again...
Setting up demo...
Available devices:
[0] 1844301091FD340E00 [X_LINK_UNBOOTED]
USB Connection speed: UsbSpeed.HIGH
Disabling depth...
No previews available, adding defaults...
Enabling low-bandwidth mode due to low USB speed... (speed: UsbSpeed.HIGH)
Traceback (most recent call last):
File "depthai_demo.py", line 1081, in <module>
runOpenCv()
File "depthai_demo.py", line 1071, in runOpenCv
demo.run_all(confManager)
File "depthai_demo.py", line 129, in run_all
self.run()
File "depthai_demo.py", line 295, in run
self.device.startPipeline(self.pm.pipeline)
depthai.XLinkReadError: Couldn't read data from stream: '__rpc_main' (X_LINK_ERROR)
Stopping demo...
=== TOTAL FPS ===
Error in atexit.run_exitfuncs:
Traceback (most recent call last):
File "depthai_demo.py", line 359, in stop
self.
pv.closeQueues()
File "/home/pi/depthai/depthai_sdk/src/depthai_sdk/managers/preview_manager.py", line 100, in closeQueues
for queue in self.outputQueues:
AttributeError: 'PreviewManager' object has no attribute 'outputQueues'

  • erik replied to this.

    Hello chetan ,
    Sorry for the inconvenience. Could you try running python3 depthai_demo.py -gt cv to force OpenCV visualization? It looks like an issue with QT GUI in the log, maybe some required package wasn't installed when you installed dependencies.
    I would also suggest using our preconfigured RPi images, as they are tried & tested.
    Thanks, Erik

      erik Yes, i tried it with the arguments you suggested, it still fails with the same reason. Is it some kind of power issue while using with RPI ? I can hear the click on the camera and immediately fails.

      • erik replied to this.

        chetan That could be an issue as well. Just no I notice the Floating point exception, I believe we already fixed that issue. Could you update the depthai repo, so git pull to get the latest verson of the depthai_demo?
        Thanks, Erik

          erik Tried it, still the same issue. Pulled latest from the repo .
          depthai.XLinkReadError: Couldn't read data from stream: '__rpc_main' (X_LINK_ERROR)
          Also there are two repos, depthai and depthai-python. Which one should i use?

          • erik replied to this.

            chetan Could you try a different USB3 cable? That's usually the reason for this error. You can use the depthai_demo inside depthai repo, or examples from depthai-python.
            Thanks, Erik