I recently acquired an OAK-D CM4 device. However, I can only run the depthai-demo.py script when connected via VNC to the Raspberry Pi CM4. Whenever I attempt to run it through the DepthAI app on Windows, I encounter the "no DepthAI device found" error. I'm wondering if there is a solution to this issue.
OAK-D CM4
- Edited
Hi NickNikzad ,
Due to how the device is designed (VPU connected directly to CM4), it's not possible to connect to the VPU from your computer. So you always need to connect to the CM4 to access VPU, just like having RPi + OAK, you'd need to connect to RPi and then connect to OAK from RPi.
erik Thanks for your response. How about the OAK-D CM4 PoE camera model? Does it have a similar design and limitation in terms of the direct connection between VPU and CM4?
- Edited
Hi NickNikzad , yes, the same applies. So you have to SSH into the CM4 and then access the VPU. See here: https://docs.luxonis.com/projects/hardware/en/latest/pages/DM2097.html#poe-for-rpi-not-oak
Thanks erik
erik when I ssh into CM4 using -x tag and try to run any examples it gives opencv related errors.
AnshumanFauzdar did you reflash the OS on the CM4? If so, it seems some libraries weren't correctly installed.
erik This example is working fine on CM4 itself, when I SSH through windows OS it shows the errors as mentioned in screenshot.
AnshumanFauzdar Does opencv work correctly (the imshow part) on your windows?
- Edited
Hi AnshumanFauzdar
Not sure about Windows, but at least on MacOS the x11 is enabled using -X and not -x.
Thanks,
Jaka
jakaskerl Thanks for the suggestion but still with -X I am facing same issue.
Hi AnshumanFauzdar
I see, GTK backend issue is usually related to x11, but might be a bad display mapping as well, not sure for your specific case. Could you please check opencv/opencv18461 if any solution works for you?
Thanks,
Jaka
jakaskerl Hey, I solved the issue by following the instructions on the issue. I edited the .bashrc and added the following in the last line export DISPLAY=:0.0.
But I want the GUIs to run on my windows, the demo is running on the raspberry pi GUI instead of launching on the windows side.
Hi AnshumanFauzdar
What about using putty ? To my knowledge it should support x11 forwarding (there should be a checkbox to enable it), while the regular command prompt might not support it directly.
Thanks,
Jaka
jakaskerl I tried putty and also ran Xming server on windows to enable X11 forwarding but still there is no GUI on putty or cmd.
Hi AnshumanFauzdar
I'm not sure the GUI is going to work with X11 forwarding then. Could you try with a simple example (like rgb_preview) to check if standard CV frames go through? If this works, then I guess the forwarding does not support GUI.
Thanks,
Jaka
jakaskerl I tried the examples, its executing on the pi itself and there is no GUI forwarding.
- Edited
Hi AnshumanFauzdar
I'm a bit confused as to what you are really doing here. I don't think you shoud VNC into the pi if you wish to forward the display.
I think that since adding the export DISPLAY=:0.0.
you are telling the scripts to use PI as the display, so when you also VNC, the x11 won't work properly.
Could you try maybe disabling the DISPLAY, exiting the VNC and running the example (rgb_preview) with -X?
Thanks,
Jaka