• Community
  • Mobile OAK-D with Raspberry Pi questions

I've successfully used OAK-D attached to a MacBook. My goal now is to mount the OAK-D on a mobile rover, where the OAK-D would be attached to a Raspberry Pi. I have a number of questions about such a system.

  • I assume I need to use a Pi 4B to achieve the maximum processing power. True? I realize the choice depends on what the Pi is doing for CV and AI and everything else. For sure the Pi would also be the overall brains, e.g., controlling motors and monitoring any sensors, at least an IMU. I'd prefer to err on the side of having too much processing power than too little.
  • How much memory would be necessary for the Pi to support the OAK-D, etc.? I assume a minimum of 4GB, but I guess 8GB might be needed. That said, when doing "real stuff", there would be no development tools or desktop running, only whatever processes/threads would be needed for CV, AI, and rover control.
  • I use PyCharm on macOS. I see that it is supposed to run on Raspberry Pi OS as well, but that would require running the desktop as well. Has anyone had experiences, good or bad? In theory, I could develop on my MacBook and push the code to the Pi if necessary.
  • Does anyone have any suggestions for mounting the OAK-D on a mobile robot? In particular, how does it get secured using the tripod screw? I've found some possibilities that are for GoPro, but there could be something more appropriate. Also, would the answers be any different for an OAK-D Lite. I may have that in my hands before I get to the point of actually mounting an OAK model.
  • I think I can find a power bank that would power both the Pi4 and the OAK-D. Is there any reason not to take that approach?

Thanks for any input.

    Hello gregflurry !

    • Yes, it depends on what Pi would be doing. AI would probably run completely on the device, for CV (eg. generic blob detection) it would be faster to prototype in openCV on the Pi.
    • Again, depends on what Pi would be doing. You can use OAK-D with RPi Zero (500MB RAM) and just stream metadata from the device (eg. spatial locations) and do some light business logic on the Pi. If you need to do any additional streaming, displaying, or matrix calculations, Pi Zero probably isn't suited.
    • I am unsure. You could also setup some SSH environment (I believe VS code supports it), so when you would start your project, code would get transferred to RPI and started.
    • There are quite a few tripod mounts available, eg this one. You could also 3D print your own mount, if you have access to a printer.
    • Yes, a 10000mah powerbank could power both devices for quite a few hours. Approximate power consumption of OAK-D is 4W and for RPi, 0.5-5W I believe (depends on workload).

    Thanks, Erik

    8 days later

    Fantastic thread, exactly what I want to know. Still not clear the version, once Erik makes reference to Pi Zero. It seems to me, that PI 4 4GB should be more than OK for final university project. Would buy without hesitance the 8GB, but due to shortage the prices are crazy here in Europe. for a normal project, would the 4GB be good enough or will it limit too much?

    gregflurry How much memory would be necessary for the Pi to support the OAK-D, etc.? I assume a minimum of 4GB, but I guess 8GB might be needed. That said, when doing "real stuff", there would be no development tools or desktop running, only whatever processes/threads would be needed for CV, AI, and rover control.

    • erik replied to this.

      I can't answer the question myself yet. I was able to acquire an 8GB Pi 4B at a somewhat reasonable price, tho I had to buy a kit. I installed the latest 32 bit Raspberry Pi OS. I got DepthAI running (with a bit of difficulty; you might search for my post on the subject in Discord). I've used the system as a laptop (keyboard and monitor). I don't have plans to use it that way, so I did only limited testing (rob_preview.py), and it seemed to run roughly the same speed as my Mac. I next tried rgb_preview.py using VNC over wifi. Not good; maybe 1-2 FPS. It think the answer to your question is that it depends on what you plan to do with the system and how.

      I've read that (a) the 32 bit OS can only address 4GB, and (b) the 64 bit OS works well at least for a headless environment and is faster, and can use all 8GB. I'm hoping to do some experiments to determine how much memory gets consumed by various pieces of the system and will report. Possibly here and in Discord.

      Hello Flisboa , so as @gregflurry mentioned, it depends on what you are trying to run. If you would just like to stream metadata (eg. spatial coordinates) somewhere, RPI Zero is sufficient. If you want to do some OpenCV computation/matrix calculations/heavy NN output decoding/image streaming, RPI Zero probably isn't the best idea.
      Thanks, Erik