I just decided to try out my OAK-D-WiFi model on a MacBook Pro. When following the tutorial, I only got an rgb window with a realtime video feed and model-generated labels, but the document says

If you’re using OAK-D, it will also display depth window, that will show the depth projection calculated from left & right camera images by DepthAI.

I have tried python3 depthai_demo.py -cam left and python3 depthai_demo.py -cam right. Both commands execute without error, but again, they only produce rgb videos instead of a depth map.

In order to troubleshoot the issue myself, I hacked the demo script with

diff --git a/depthai_helpers/config_manager.py b/depthai_helpers/config_manager.py
index 7568244..80d95c4 100644
--- a/depthai_helpers/config_manager.py
+++ b/depthai_helpers/config_manager.py
@@ -230,6 +230,7 @@ class ConfigManager:
         device_info = device.getDeviceInfo()
         cams = device.getConnectedCameras()
         depth_enabled = dai.CameraBoardSocket.LEFT in cams and dai.CameraBoardSocket.RIGHT in cams
+        depth_enabled = True

         if not depth_enabled:
             if not self.args.disable_depth:

and now I'm getting the following error

$ python3 depthai_demo.py
Using depthai module from:  /Users/nalzok/.local/lib/python3.9/site-packages/depthai.cpython-39-darwin.so
Depthai version installed:  2.10.0.0.dev+7a0749a61597c086c5fd6e579618ae33accec8df
Available devices:
[0] 14442C10418059D700 [X_LINK_UNBOOTED]
USB Connection speed: UsbSpeed.HIGH
Enabling low-bandwidth mode due to low USB speed... (speed: UsbSpeed.HIGH)
Creating MJPEG link for ColorCamera node and color xlink stream...
Creating MJPEG link for StereoDepth node and disparity xlink stream...
[14442C10418059D700] [15.750] [system] [error] Attempted to start Mono Right camera - NOT detected!

How do I get the depth map?

It looks like the right camera (from the board’s perspective) is disconnected. Can you share a picture of the board?

    Brandon Sure, here it is

    I don't think the camera is at fault, though. With the flags -cam left and -cam right I can confirm both cameras are working because I can see my hand when I wave it above each lens.

    Weird. Let me try to reproduce. Might be a bug in the demo app.

      Brandon Here is a little more information for your reference. I did the following change to the demo script

      diff --git a/depthai_helpers/config_manager.py b/depthai_helpers/config_manager.py
      index 7568244..9635047 100644
      --- a/depthai_helpers/config_manager.py
      +++ b/depthai_helpers/config_manager.py
      @@ -228,8 +228,11 @@ class ConfigManager:
      
           def adjustParamsToDevice(self, device):
               device_info = device.getDeviceInfo()
      +        print(device_info)
               cams = device.getConnectedCameras()
      +        print(cams)
               depth_enabled = dai.CameraBoardSocket.LEFT in cams and dai.CameraBoardSocket.RIGHT in cams
      +        depth_enabled = True
      
               if not depth_enabled:
                   if not self.args.disable_depth:

      and the output is

      $ python3 depthai_demo.py
      Using depthai module from:  /Users/nalzok/.local/lib/python3.9/site-packages/depthai.cpython-39-darwin.so
      Depthai version installed:  2.10.0.0.dev+7a0749a61597c086c5fd6e579618ae33accec8df
      Available devices:
      [0] 14442C10418059D700 [X_LINK_UNBOOTED]
      USB Connection speed: UsbSpeed.HIGH
      <depthai.DeviceInfo object at 0x11b0568b0>
      [<CameraBoardSocket.RGB: 0>, <CameraBoardSocket.LEFT: 1>]
      Enabling low-bandwidth mode due to low USB speed... (speed: UsbSpeed.HIGH)
      Creating MJPEG link for ColorCamera node and color xlink stream...
      Creating MJPEG link for StereoDepth node and disparity xlink stream...
      [14442C10418059D700] [49.701] [system] [error] Attempted to start Mono Right camera - NOT detected!

      Looks like the software only "thinks" there are two cameras on board.

      Sorry about the trouble here.

      The default depthai_demo.py works for me w/out problem on my unit. So not a demo app bug AFAICT.


      We can send you a new unit to debug. Something seems off with the unit that you have. My guess is that there is a connection issue that is partial. Specifically - I think MIPI is working but I2C connectivity is not. One thing you could try is disconnecting the FFC on the right camera and then reconnecting it.

      Also I'm curious to see if this works for you now:
      https://docs.luxonis.com/projects/api/en/latest/samples/depth_preview/#depth-preview

      Also by popular request we're making an enclosure for OAK-D-IoT (formerly OAK-D-WiFi). The one above is an initial prototype. The tooling should be done in November in which case we can get you one.

      We should have made these in the first place... lesson learned. (Why OAK-D-Lite here will come with an enclosure).

      Thoughts?

      Thanks and sorry again about the trouble,
      Brandon

        Oh and if a replacement is in order (because of the camera issue or the other thread about WiFi access), please shoot us an email at support@luxonis.com and we'll get you taken care of.

        Thanks,
        Brandon

        Brandon Yeah, it would be great if you could send me a replacement unit. Can you also send me a tripod with it? By the way, if you happen to have a spare enclosure prototype that is not in use, I would love to receive one too. I'm willing to pay for the tripod, the enclosure, and the transportation fee.

        I got an error when running python3 install_requirements.py, i.e. Failed to build opencv-python. Here are the last few lines of the error log

          [443/1092] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/io/zero_copy_stream_impl.cc.o
          FAILED: 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/io/zero_copy_stream_impl.cc.o
          /opt/local/bin/c++ -DHAVE_PTHREAD=1 -I/private/var/folders/m4/7my6q_kj6pxgzb1b7pxyhp0h0000gn/T/pip-install-_d12blhc/opencv-python_0ea44ee671014bde9e335d27d16ba66e/_skbuild/macosx-10.14-x86_64-3.9/cmake-build/3rdparty/ippicv/ippicv_mac/icv/include -I/private/var/folders/m4/7my6q_kj6pxgzb1b7pxyhp0h0000gn/T/pip-install-_d12blhc/opencv-python_0ea44ee671014bde9e335d27d16ba66e/_skbuild/macosx-10.14-x86_64-3.9/cmake-build/3rdparty/ippicv/ippicv_mac/iw/include -isystem /private/var/folders/m4/7my6q_kj6pxgzb1b7pxyhp0h0000gn/T/pip-install-_d12blhc/opencv-python_0ea44ee671014bde9e335d27d16ba66e/opencv/3rdparty/protobuf/src -isystem /private/var/folders/m4/7my6q_kj6pxgzb1b7pxyhp0h0000gn/T/pip-install-_d12blhc/opencv-python_0ea44ee671014bde9e335d27d16ba66e/_skbuild/macosx-10.14-x86_64-3.9/cmake-build -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Winit-self -Wpointer-arith -Wuninitialized -Wno-delete-non-virtual-dtor -Wno-comment -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -fvisibility=hidden -fvisibility-inlines-hidden -Wno-deprecated -Wno-missing-declarations -Wno-shadow -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-sign-compare -Wno-sign-promo -Wno-undef -Wno-ignored-qualifiers -Wno-extra -Wno-unused-function -Wno-unused-const-variable -Wno-invalid-offsetof -Wno-suggest-override -Wno-implicit-fallthrough -Wno-array-bounds -O3 -DNDEBUG  -DNDEBUG -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.14 -fPIC -std=c++11 -MD -MT 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/io/zero_copy_stream_impl.cc.o -MF 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/io/zero_copy_stream_impl.cc.o.d -o 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/io/zero_copy_stream_impl.cc.o -c /private/var/folders/m4/7my6q_kj6pxgzb1b7pxyhp0h0000gn/T/pip-install-_d12blhc/opencv-python_0ea44ee671014bde9e335d27d16ba66e/opencv/3rdparty/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc
          In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:90:0,
                           from /opt/local/include/gcc7/c++/cwchar:44,
                           from /opt/local/include/gcc7/c++/bits/postypes.h:40,
                           from /opt/local/include/gcc7/c++/iosfwd:40,
                           from /opt/local/include/gcc7/c++/ios:38,
                           from /opt/local/include/gcc7/c++/ostream:38,
                           from /opt/local/include/gcc7/c++/iostream:39,
                           from /private/var/folders/m4/7my6q_kj6pxgzb1b7pxyhp0h0000gn/T/pip-install-_d12blhc/opencv-python_0ea44ee671014bde9e335d27d16ba66e/opencv/3rdparty/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc:42:
          /opt/local/lib/gcc7/gcc/x86_64-apple-darwin18/7.5.0/include-fixed/stdio.h:222:7: error: conflicting declaration of 'char* ctermid(char*)' with 'C' linkage
           char *ctermid(char *);
                 ^~~~~~~
          In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/unistd.h:525:0,
                           from /private/var/folders/m4/7my6q_kj6pxgzb1b7pxyhp0h0000gn/T/pip-install-_d12blhc/opencv-python_0ea44ee671014bde9e335d27d16ba66e/opencv/3rdparty/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc:36:
          /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_ctermid.h:26:10: note: previous declaration with 'C++' linkage
           char    *ctermid(char *);
                    ^~~~~~~
          [444/1092] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/io/tokenizer.cc.o
          [445/1092] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/descriptor.pb.cc.o
          [446/1092] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/message.cc.o
          [447/1092] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/map_field.cc.o
          [448/1092] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/descriptor.cc.o
          ninja: build stopped: subcommand failed.
            File "/private/var/folders/m4/7my6q_kj6pxgzb1b7pxyhp0h0000gn/T/pip-build-env-92i_6n5_/overlay/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 593, in setup
              cmkr.make(make_args, env=env)
            File "/private/var/folders/m4/7my6q_kj6pxgzb1b7pxyhp0h0000gn/T/pip-build-env-92i_6n5_/overlay/lib/python3.9/site-packages/skbuild/cmaker.py", line 504, in make
              raise SKBuildError(

        I guess there is some issue with my environment. Will try to figure that out later.

          nalzok

          Thanks for the heads up. Not immediately sure on the OpenCV build bit here. But our team can probably help better debug on Discord, here. I don't know how to fix such things, but the team does.

          I think we do have one last prototype - I'll check. If so, I'll also see if we can just pre-assemble it with an OAK-D-IoT and ship w/ tripod. And thanks for the offer - no problem for us to send. Thanks for testing/using.

          Will circle back. Oh also could you shoot me your shipping address and phone number over email to support@luxonis.com and reference this thread.

          That way when our logistics is online on Monday we should be good to ship it out.

          Thanks again,
          Brandon

            Brandon This is embarrassing, but it just comes to me that I in fact ordered three OAK-D-IoT units on Backerkit and gifted two of them to my friends to play with. You can check the order history on BackerKit with the email address I used to contact you yesterday (it's sunq**********0825@icloud.com).

            Since the three units come in the same package, I suspect they underwent the same manufacturing deflection or mechanical shock during the shipping process. I'm contacting them to see if their units have hardware issues as well. Do you have some sort of hardware self-check script or checklist I can send them?