How can the startup demo on the RPi Compute Edition be disabled?

Delete the autostart file:

rm /home/pi/.config/autostart/runai.desktop

ImportError: No module named ‘depthai’

This indicates that the depthai was not found by your python interpreter. There are a handful of reasons this can fail:

  1. Is the Python API installed? Verify that it appears when you type:

    python3 -m pip list | grep depthai
  2. Are you using a supported platform for your operating system? If not, you can always install from source:

    cat /etc/os-release

Why is the Camera Calibration running slow?

Poor photo conditions can dramatically impact the image processing time) during the camera calibration. Under normal conditions, it should take 1 second or less to find the chessboard corners per-image on an RPi but this exceed 20 seconds per-image in poor conditions. Tips on setting up proper photo conditions:

  • Ensure the checkerboard is not warped and is truly a flat surface. A high-quality option: print the checkerboard on a foam board.

  • Reduce glare on the checkerboard (for example, ensure there are no light sources close to the board like a desk lamp).

  • Reduce the amount of motion blur by trying to hold the checkerboard as still as possible.

[Errno 13] Permission denied: ‘/usr/local/lib/python3.7/dist-packages/…’

If python3 -m pip install fails with a Permission denied error, your user likely doesn’t have permission to install packages in the system-wide path. Try installing in your user’s home directory instead by adding the --user option. For example:

python3 -m pip install depthai --user

More information on Stackoverflow.

DepthAI does not show up under /dev/video* like web cameras do. Why?

The USB device enumeration could be checked with lsusb | grep 03e7 . It should print:

  • 03e7:2485 after reset (bootloader running)

  • 03e7:f63b after the application was loaded

No /dev/video* nodes are created.

DepthAI implements VSC (Vendor Specific Class) protocol, and libusb is used for communication.

Intermittent Connectivity with Long (2 meter) USB3 Cables

  • We’ve found that some hosts have trouble with USB3 + long cables (2 meter). It seems to have something do do with the USB controller on the host side.

  • Other hosts have no problem at all and run for days (tested well over 3 days on some), even with long cables (tested w/ a total length of a bit over 8 feet). For example, all Apple computers we’ve tested with have never exhibited the problem.

  • Ubuntu 16.04 has an independent USB3 issue, seemingly only on new machines though. We think this has to do w/ Ubuntu 16.04 being EOLed prior or around when these new machines having hit the market. For example, on this computer (here) has rampant USB3 disconnect issues under Ubuntu 16.04 (with a 1 meter cable), but has none under Ubuntu 18.04 (with a 1 meter cable).

So unfortunately we discovered this after we shipped with long USB3 cables (2 meter cables) with DepthAI units.

So if you have see this problem with your host, potentially 3 options:

  1. Switch to a shorter USB3 cable (say 1 meter) will very likely make the problem disappear. These 1 meter (3.3 ft.) cables are a nice length and are now what we ship with DepthAI USB3 variants.

  2. Force USB2 mode with --force_usb2 option (examples below). This will allow use of the long cable still, and many DepthAI usecases do not necessitate USB3 communication bandwidth - USB2 is plenty.

  3. Upgrade from Ubuntu 16.04 to Ubuntu 18.04.

Forcing USB2 Communication

If you are having trouble with communication with DepthAI/OAK, forcing USB2 can sometimes resolve the issue.

python3 --force_usb2

Or, the shorter form:

python3 -fusb2

We’ve also seen an unconfirmed issue of running Ubuntu-compiled libraries on Linux Mint. If running on not Ubuntu 18.04/16.04 or Raspbian, please compile DepthAI from source.

Failed to boot the device: 1.3-ma2480, err code 3

This error often can occur if the udev rules are not set on Linux. This wil coincide with depthai: Error initializing xlink

To fix this, set the udev rules using the commands below, unplugging depthai and replugging it into USB afterwards.

echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="03e7", MODE="0666"' | sudo tee /etc/udev/rules.d/80-movidius.rules
sudo udevadm control --reload-rules && sudo udevadm trigger

And in some cases, these were already set, but depthai was plugged in the entire time, so Linux could not reset the rules.

So make sure to unplug, and replug-in depthai after having run these.

Got questions?

We’re always happy to help with code or other questions you might have.

CTRL-C Is Not Stopping It!

If you are trying to kill a program with CTLR-C, and it’s not working, try CTRL-instead. Usually this will work.

Is Your Raspberry Pi Locking Up?

The Raspberry Pi has a max limit of 1.2A across all its USB ports, and depthai/megaAI/OAK can take up to 1A (at max power, usually closer to 500mA).

So if you are seeing lockups, it could be that you are over this 1.2A limit as a result of the total power of the USB devices drawing from the Pi. Using a powered hub can prevent this, or powering fewer other things off of the Pi over USB.