Hi travis_riggs
Can you paste the cam_test.py terminal output here?
Thanks,
Jaka
Hi travis_riggs
Can you paste the cam_test.py terminal output here?
Thanks,
Jaka
jakaskerl There is no script in the depthai
repo called cam_test.py
. The only script that is close to that is tests/guided_manual_test.py
, which just repeatedly starts the depthai_demo.py script in various modes, but it gets exactly the same errors that I posted above and then reports "Success!" at the end (even though nothing was successful).
Hi travis_riggs
Clone the depthai-python repo which has the script and other utilities, as well as examples.
Thanks,
Jaka
Thank you for the reply.
I cloned it and it appears to successfully build and install....
python3 -m pip install .
Defaulting to user installation because normal site-packages is not writeable
Processing /home/travis/src/depthai-python
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: depthai
Building wheel for depthai (pyproject.toml) ... done
Created wheel for depthai: filename=depthai-2.22.0.0.dev0+236e7ec1b8ac2c7573d980f45efe90e9b3df812f-cp310-cp310-linux_x86_64.whl size=10469558 sha256=c55b6e7395b5949dacdd7a360970d3b5601e9fec87bb2c9ec37dad24bc5d75b4
Stored in directory: /home/travis/.cache/pip/wheels/2a/3d/86/f4bcd1b369e97e84ca7ee874b8428bcf470da91836fd2f4795
Successfully built depthai
Installing collected packages: depthai
Attempting uninstall: depthai
Found existing installation: depthai 2.22.0.0.dev0+236e7ec1b8ac2c7573d980f45efe90e9b3df812f
Uninstalling depthai-2.22.0.0.dev0+236e7ec1b8ac2c7573d980f45efe90e9b3df812f: Successfully uninstalled depthai-2.22.0.0.dev0+236e7ec1b8ac2c7573d980f45efe90e9b3df812f
Successfully installed depthai-2.22.0.0.dev0+236e7ec1b8ac2c7573d980f45efe90e9b3df812f
But, when I try to run cam_test.py
, I get a qt error related to xcb
:
python3 utilities/cam_test.py
QObject::moveToThread: Current thread (0x5565305d4be0) is not the object's thread (0x5565308a3af0).
Cannot move to target thread (0x5565305d4be0)
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/travis/.local/lib/python3.10/site-packages/cv2/qt/plugins" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl.
Stack trace (most recent call last):
#28 Object "[0xffffffffffffffff]", at 0xffffffffffffffff, in
#27 Object "python3", at 0x55652f207ac4, in _start
#26 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f4aace5fe3f, in __libc_start_main
#25 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f4aace5fd8f, in
#24 Object "python3", at 0x55652f207bcc, in Py_BytesMain
#23 Object "python3", at 0x55652f231c3d, in Py_RunMain #22 Object "python3", at 0x55652f240a42, in _PyRun_AnyFileObject
#21 Object "python3", at 0x55652f240d47, in _PyRun_SimpleFileObject
#20 Object "python3", at 0x55652f241864, in
#19 Object "python3", at 0x55652f23a96a, in
#18 Object "python3", at 0x55652f241b17, in #17 Object "python3", at 0x55652f214c55, in PyEval_EvalCode
#16 Object "python3", at 0x55652f11f175, in #15 Object "python3", at 0x55652f128759, in _PyEval_EvalFrameDefault
#14 Object "python3", at 0x55652f13a4eb, in _PyFunction_Vectorcall #13 Object "python3", at 0x55652f1290e6, in _PyEval_EvalFrameDefault #12 Object "python3", at 0x55652f1306cb, in _PyObject_MakeTpCall #11 Object "/usr/lib/python3/dist-packages/PyQt5/sip.cpython-310-x86_64-linux-gnu.so", at 0x7f4a880ce8b8, in #10 Object "/home/travis/.local/lib/python3.10/site-packages/PyQt5/QtWidgets.abi3.so", at 0x7f4a79106ffa, in #9 Object "/home/travis/.local/lib/python3.10/site-packages/PyQt5/QtWidgets.abi3.so", at 0x7f4a79106f1c, in #8 Object "/home/travis/.local/lib/python3.10/site-packages/PyQt5/Qt5/lib/libQt5Widgets.so.5", at 0x7f4a78767aa8, in QApplicationPrivate::init() #7 Object "/home/travis/.local/lib/python3.10/site-packages/PyQt5/Qt5/lib/libQt5Gui.so.5", at 0x7f4a7956accb, in QGuiApplicationPrivate::init() #6 Object "/home/travis/.local/lib/python3.10/site-packages/PyQt5/Qt5/lib/libQt5Core.so.5", at 0x7f4a80aa4fe2, in QCoreApplicationPrivate::init() #5 Object "/home/travis/.local/lib/python3.10/site-packages/PyQt5/Qt5/lib/libQt5Gui.so.5", at 0x7f4a795682ac, in QGuiApplicationPrivate::createEventDispatcher() #4 Object "/home/travis/.local/lib/python3.10/site-packages/PyQt5/Qt5/lib/libQt5Gui.so.5", at 0x7f4a79567f9f, in QGuiApplicationPrivate::createPlatformIntegration() #3 Object "/home/travis/.local/lib/python3.10/site-packages/PyQt5/Qt5/lib/libQt5Core.so.5", at 0x7f4a808929bb, in QMessageLogger::fatal(char const*, ...) const #2 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f4aace5e7f2, in abort #1 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f4aace78475, in raise #0 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f4aacecca7c, in pthread_kill Aborted (Signal sent by tkill() 308978 1000) [1] 308978 IOT instruction (core dumped) python3 utilities/cam_test.py
cmake version 3.22.1
Unfortunately, I think this error is completely unrelated to the OAK-D W camera. I tried running this with my OAK-D Pro and got the same crash.
Hi travis_riggs
Yes, I thought so.
https://discuss.luxonis.com/d/1832-oak-d-lr-support/4
Thanks,
Jaka
travis_riggs Instead of running python3 cam_test.py
, could you try running python3 cam_test.py -rs
, which should skip the qt requirement (no GUI), and just use opencv?
That is a much better proposal.
Here is the output:
$ python3 utilities/cam_test.py -rs
Enabled cameras:
rgb : color
left : mono
right : mono
camd : color
DepthAI version: 2.21.2.0
DepthAI path: /home/travis/.local/lib/python3.10/site-packages/depthai.cpython-310-x86_64-linux-gnu.so
[1944301071E4722700] [1.2] [1.435] [ColorCamera(9)] [error] Camera not detected on socket: 3
[1944301071E4722700] [1.2] [1.436] [MonoCamera(7)] [error] Camera not detected on socket: 2
[1944301071E4722700] [1.2] [1.436] [MonoCamera(5)] [error] Camera not detected on socket: 1
[1944301071E4722700] [1.2] [1.437] [ColorCamera(3)] [error] Camera not detected on socket: 0
Connected cameras:
USB speed: SUPER
IR drivers: []
Cam: rgb left right camd [host | capture timestamp]
FPS: 0.00| 0.00 0.00| 0.00 0.00| 0.00 0.00| 0.00
It opened 4 windows: rgb, left, right, and camd. They all showed a black rectangle with a white background, like this:
Note that this is running 2.21.2.0, which is the version that depthai_demo.py
wants. Earlier, I was trying to run with 2.22.0. Does 2.21.2 support the OAK-D W?
I am hesitant to go through some of those uninstall/reinstall steps because, at the moment, I at least have something working for the OAK-D Pro. I can run depthai_demo.py and the ros2 examples to evaluate my OAK-D Pro camera. Before, while going through some of the troubleshooting steps of messing with my dependencies to get the Wide camera to work, it broke my ability to run the OAK-D Pro.
travis_riggs this does seem strange, it could be a hardware issue. Could you please contact support@luxonis.com, so we can inspect the device in our office? We will send a replacement device asap.
erik Yes, I will. Thank you very much.
@erik "#p10668 I just emailed support.
Hello here from Japan. We bought two cameras from a retailer and we seem to have the same kind of issue. Only mono cameras are working on the oak-D PRO WIDE.
Camera worked on the initial pipeline we tried and since then we have nothing. One thing is that we were using the camera in multi-threading and the issue might be related to a non-clean exit ? However if it is software related, I would supposed it would have been fixed by unplugging the camera
We tried using the device_manager to reset our devices but it seems to only reset the calibration.
Running the cam_test here are our logs
Enabled cameras:
rgb : color
left : mono
right : mono
camd : color
DepthAI version: 2.22.0.0
DepthAI path: /Users/enea.debollivier/dev/aif_internal_oak_d_camera/depthai-python/.venv/lib/python3.11/site-packages/depthai.cpython-311-darwin.so
/Users/enea.debollivier/dev/aif_internal_oak_d_camera/depthai-python/utilities/cam_test.py:284: DeprecationWarning: Use constructor taking 'UsbSpeed' instead
with dai.Device(*dai_device_args) as device:
[184430109160AC0F00] [1.1.4] [0.768] [ColorCamera(9)] [error] Camera not detected on socket: 3
Connected cameras:
-socket CAM_A : IMX378 4056 x 3040 focus:auto - COLOR
-socket CAM_B : OV9282 1280 x 800 focus:fixed - MONO
-socket CAM_C : OV9282 1280 x 800 focus:fixed - MONO
USB speed: SUPER
IR drivers: [('LM3644', 2, 99)]
Cam: rgb left right camd [host | capture timestamp]
FPS: 0.00| 0.00 28.12| 28.01 28.12| 28.01 0.00| 0.00
To test I built the C++ version of the code from the develop branch but did not have more success.
We also tried to run our own pipeline with the debug mode.
USB speed: UsbSpeed.HIGH
[184430109160AC0F00] [1.1.4] [1.852] [system] [info] Memory Usage - DDR: 35.31 / 340.34 MiB, CMX: 2.40 / 2.50 MiB, LeonOS Heap: 22.74 / 77.23 MiB, LeonRT Heap: 3.73 / 41.14 MiB
[184430109160AC0F00] [1.1.4] [1.852] [system] [info] Temperatures - Average: 46.40C, CSS: 46.68C, MSS 46.00C, UPA: 46.90C, DSS: 46.00C
[184430109160AC0F00] [1.1.4] [1.852] [system] [info] Cpu Usage - LeonOS 13.95%, LeonRT: 5.61%
[184430109160AC0F00] [1.1.4] [2.853] [system] [info] Memory Usage - DDR: 35.31 / 340.34 MiB, CMX: 2.40 / 2.50 MiB, LeonOS Heap: 22.74 / 77.23 MiB, LeonRT Heap: 3.73 / 41.14 MiB
[184430109160AC0F00] [1.1.4] [2.853] [system] [info] Temperatures - Average: 46.85C, CSS: 47.35C, MSS 46.00C, UPA: 46.90C, DSS: 47.13C
[184430109160AC0F00] [1.1.4] [2.853] [system] [info] Cpu Usage - LeonOS 10.70%, LeonRT: 1.21%
We tried to use the camera on a mac and a jetson but on both it was not working.
Important to note. Running this C++ example worked example/video_mobilenet. So I suppose that it is directly related to the color camera itself.
As we bought through a japanese retailer we will try to return the camera to them. But as we had this issue twice, It might be interesting investigating it.
Thanks for your help
Hi EneaDEBOLLIVIER , this unfortunately looks like a hardware issue, could you please contact support@luxonis.com together with your post, so we can replace the device asap?
Hi,
I had the same issue of Camera not detected on socket
and Erik helps me
The solution is to update depthai version:
pip3 install depthai==2.22.0.0.dev0+874b317ab526d91dde84b68d756334a338d4da58 --extra-index-url
https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local
And run again the depthai-python/utilities/cam_test.py script
In addition I created a distilled code for connecting the two rgb cameras and save one image from each camera, maybe it will be useful for someone, just as a sanity check:
import cv2
import time
import time
import depthai as dai
# Params
target_path = 'PUT YOUR TARGET PATH FOR SAVING THE IMAGES HERE'
cam_list = ['rgb', 'camd']
cam_socket_opts = {
'rgb' : dai.CameraBoardSocket.CAM_A,
'camd' : dai.CameraBoardSocket.CAM_D,
}
# Start defining a pipeline
pipeline = dai.Pipeline()
control = pipeline.createXLinkIn()
control.setStreamName('control')
cam = {}
xout = {}
streams = []
tofConfig = {}
for c in cam_list:
xout[c] = pipeline.createXLinkOut()
xout[c].setStreamName(c)
streams.append(c)
cam[c] = pipeline.createColorCamera()
cam[c].isp.link(xout[c].input)
cam[c].setBoardSocket(cam_socket_opts[c])
control.out.link(cam[c].inputControl)
print(f'Camera {cam_socket_opts[c]} connected')
# Pipeline is defined, now we can connect to the device
device = dai.Device.getDeviceByMxId('')
dai_device_args = [pipeline]
if device[0]:
dai_device_args.append(device[1])
with dai.Device(*dai_device_args) as device:
q = {}
for c in streams:
q[c] = device.getOutputQueue(name=c, maxSize=1, blocking=False)
# Save frames
print('Save one image from each camera')
for c in streams:
time.sleep(2.2) # wait for camera set up
try:
pkt = q[c].tryGet()
frame = pkt.getCvFrame()
cv2.imwrite(f'{target_path}/{c}.jpg', frame)
except Exception as e:
print(e)