OAK-D Lite Camera — Basic Setup

RoboFoundry
7 min readMay 24, 2022

--

I just received my OAK-D Lite camera after a couple of weeks of wait and I’m really excited to check it out and wanted to share my experience with folks who may be interested. It is reasonably priced compared to the Intel Realsense or Zed cameras. This Lite version does not come with an IMU built-in so if you are thinking of using it in robotics, you’ll have to add a separate IMU sensor. I found this chart hidden under comparison with Realsense which indicates that the flagship version of OAK-D has the IMU built-in but OAK-D Lite version does not. You can also check the comparison between two versions here.

Also, I chose the fixed focus version as I’m planning to use it in robots. They have a comparison on the product description and it explains which one you should use depending on the use case. It says “Fixed-Focus is recommended for heavy-vibration applications (e.g., drones, lawnmowers, bikes w/out suspension, etc.”. Here is the auto vs fixed comparison on their site.

Another thing to note is OAK-D Lite version was only available on their website, even though they do have Luxonis Amazon store, it was not listed there otherwise I would have definitely ordered via Amazon instead of creating yet another e-commerce account.

I watched this short video from youtube which was very helpful to understand what was needed to set it up.

Here are some pictures of my camera, I ordered it with a bumper thingy to protect it as well. The camera came very elegantly packaged in its box. However, the envelop it came in was ripped at the top, I’m assuming since it came from Hong Kong and went through customs check, someone must have opened to make sure it was consistent with description of package. I wish they had chosen a box rather than an envelop to ship it in to make sure it was safe and did not get damaged if it got banged around during shipping. After I opened it and held it in my hand, I was really surprised to see how lightweight it was. It would really not add any significant amount of weight to a robot even if it was a really small robot and it would add so many amazing capabilities for that little amount of weight.

I tried to setup the OAK-D Lite camera in a few different combinations.

  • Ubuntu 20.04 Linux bare metal — worked well and got it up and running in less than 10 mins
  • Windows 10 — worked well and it was fairly quick to setup
  • Windows 11 — did not work [ran into several errors and kept crashing]
  • Ubuntu 20.04 running on Windows 11 WSL2 — did not work, could not recognize the camera at hardware level

Ubuntu bare metal setup

I was afraid that the Ubuntu setup will be very difficult but to my surprise, I went to their site and followed the link that said — if you have a new OAK-D camera go here and followed the instructions to do the setup manually.

Hardware hookup is as simple as it gets — just get a USB-C cable and plug it into camera and the other end into your laptop/desktop.

Update Feb 2024 — there has been a small update lately when I tried to use the same setup again recently I got an error message:

RuntimeError: Device already closed or disconnected: Input/output error

The reason for this is the software seems to expect a USB3 cable [the one that has blue at the bottom of bigger end of connector as shown here. In order to avoid this error see the demo command with additional -usbs usb2 switch and the error will resolve.

After following few commands below including last couple of them to setup the udev rule so the OS recognizes the camera properly, I was able to launch the demo script and here are a few screenshots from how it looks on various screens on the demo app.

$ apt-get install python3-pip python3-venv$ git clone https://github.com/luxonis/depthai.git$ cd depthai$ python3 -m venv myvenv
$ source myvenv/bin/activate
$ pip install -U pip
# for linux run these two commands to add udev rule to setup usb device correctly
$ 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
# install dependencies
$ python3 install_requirements.py
# finally run the demo script
$ python3 depthai_demo.py
# if you get an error e.g. RuntimeError: Device already closed or disconnected: Input/output error, run the demo with following command to switch to usb2 mode as you may be using usb2 cable$ python3 depthai_demo.py -usbs usb2

Just a little heads up — first time you launch the demo script it downloads the ssd file and it can take sometime so be patient. I was about to get impatient when it finished and the app screen finally came up.

Windows 10 Setup

The windows 10 setup was the easiest. Just download the windows installer and run it, it takes a while to download everything, but once its done just connect the camera with USB-C cable with your laptop/desktop and launch the DepthAI app you just installed and it should come the same as seen in the screenshots above.

One thing to keep in mind is if you change any of the settings on any of the tabs like AI or depth etc. you have to click Apply and Restart button for the new settings to take effect. I did not realize that initially and I was wondering why my settings didn’t take effect when I changed from the default mobilenet-ssd to openpose2 for example but once I clicked the apply and restart button it took effect. Again, each time you choose a different CNN model it will check in cache locally and if its not there it will download it so it can take sometime.

This is a really initial review and I have not explored all the options the camera has to offer and it seems like this tiny little package does a LOT, AI, depth perception with many different algorithms and so many different settings.

Windows 11

I tried downloading the same windows setup file as I did for Windows 10 assuming it will be forward compatible but it did not work. It threw a bunch of errors in the terminal window in background and crashed and shutdown each time I tried to launch it. So I don’t think the installer is compatible with Windows 11 unless I was doing something wrong.

Ubuntu 20.04 on Windows 11 WSL2

I am really excited to know that Windows 11 now supports Linux GUI applications and you can launch an app in Ubuntu running in WSL2 mode and you can see the GUI app showing up as if you ran it from Windows. I was hopeful that this scenario will work for the DepthAI app but the WSL2 does not recognize the USB devices like a first class linux bare metal machine would and I ran into errors where it did not recognize the camera. I guess this is not a problem with OAK-D camera or its software, its just a limitation on WSL2 Linux. I did some basic searches to see to see if there was something of a workaround but some of the suggestions were to recompile your own WSL2 and I did not want to go down that route so I gave up.

Overall, I have nothing but great things to say about the OAK-D Lite camera — the picture quality is amazingly clear, the depth perception and object detection seems to work out of the box with several models available to choose from and many different settings to tweak.

Compared to what I had to go through for getting the Raspberry Pi camera working with OpenCV, this was a breeze and pleasure to work with.

The only not so good feedback I have is not really for camera but for the “bumper case”. Although, it is stretchy, I can’t say it is the most elegant bumper case and it doesn’t fits very well on the camera. I would have preferred it to be a combo of hard and soft case like what we have these days for phone cases. It’s a bit overpriced for a fancy rubber band. But lets not judge the really nice camera by bumper thingy!!

Next, I want to hook this camera up with a robot and ROS2 setup to see how it can do visual Odometry. I hope integrating with ROS2 is not as difficult but I’ll report back on that in another article.

--

--