OAK-D on Raspberry Pi Zero: Version not Satisfied open3d==0.10.0.0
I wonder if this is actually the same error, even though this is on the Jetson instead:
https://github.com/luxonis/depthai/issues/309
Hi 5M1Sec ,
Sorry about the delay. I think we know what this is now. Can you try running the following?
python3 -c "import cv2; import numpy as np; blank_image = np.zeros((500,500,3), np.uint8); cv2.imshow('s', blank_image); cv2.waitKey(0)"
I think the OpenCV install either didn't go through or was corrupted.
If this does not show a window, please run this command:
sudo curl -fL http://docs.luxonis.com/_static/install_dependencies.sh | bash
Thanks,
Brandon
- Edited
Brandon
I ran the first command via ssh both with and without connecting a HDMI monitor.
The first command throws an error:
">>> import cv2
import numpy as np
blank_image = np.zeros((500,500,3), np.uint8)
cv2.imshow('s', blank_image); cv2.waitKey(0)
Unable to init server: Could not connect: Connection refused
(s:960): Gtk-WARNING **: 21:22:34.771: cannot open display:"
Importing CV2 doesn't throw an error. After running the second command, I still receive the same error.
I'm wondering if there is something wrong with the python install perhaps, or perhaps the SD-card.
Invoking Python3 seems no problem.
Ah! So over SSH a different version of OpenCV is required I think. Or you would need to ssh in with X-Forward enabled.
Otherwise OpenCV will not know how to open the display.
So opencv-headless I think is what enables straight-up SSH use, but I'm not 100% sure actually. You could also do X-Forwarding instead (with your current OpenCV install), but I also don't immediately know.
The sure-fire way to test is to hook a mouse/keyboard and see if that example OpenCV is working directly on the display, not over SSH, but just from mouse/keyboard control to start.
Thoughts?
Thanks,
Brandon
Brandon Sorry for the late reply.
The Pi zero only has two micro-usb ports. I used one for power source and anther for OAK-D. So I did a VNC control over the HDMI monitor. I still recive the same error. Since I can not diagnose where is the problem. I think a script printing the detection objects in OAK-D to the terminal would be great for eliminating the factor.
Hi 5M1Sec ,
I have been able to reproduce this on the Pi Zero. It is specific to the Pi Zero. We have since been trying to figure out what exactly is going wrong on the Pi Zero, specifically. We have several of the team now having ordered Pi Zero and waiting for them to arrive.
Sorry about the delay - more details here: https://github.com/luxonis/depthai/issues/324
Thanks,
Brandon
We figured it out. We actually have to build a custom image for Pi Zero because it is ARMv6 instead of ARMv7 (like the rest of the Pis).
https://github.com/luxonis/depthai/pull/329
So technically this version should work. Would you mind giving it a shot 5M1Sec ?
Brandon I tried it by typing the following commands:
sudo curl -fL http://docs.luxonis.com/_static/install_dependencies.sh | bash
git clone https://github.com/luxonis/depthai.git
python3 install_requirements.py
python3 depthai_demo.py -rgbf 5
Somehow I am still getting the same error.
Sidenote, the detection for armv7 for installing open3d should also include armv6.
- Edited
5M1Sec
After git clone, you have to do:
git checkout origin/pi_zero_wheel
It's not yet merged into main. Awaiting confirmation.
Open3d is optional, and not installed on raspberry pis.
GergelySzabolcs Brandon Thank you. I see. It works now!
Thank you for circling back!
GergelySzabolcs I had to do a "git fetch" before the git clone.