depthai-core icon indicating copy to clipboard operation
depthai-core copied to clipboard

Monitor Thread Issue with Oak d poe cameras

Open apollollopa opened this issue 1 year ago • 0 comments

I have tested multiple oak d poe cameras on different poe power sources and have had the same issue. I want to run this script daily and on 4k resolution. I have tested the script with 1080p and it seems to work way longer but still in the end it fails with the same script.

When running the script with 4k option It tends to last anywhere from 10 seconds to 30 mins. while running the script in 1080. I see times from 30s - a couple hours. it varies everytime.

I have updated the depthai version as well as the bootloader. I have also tried factory resetting. I checked with debugging to see if the cpu was maxing out, And that was not the problem.

2022-08-09_17-16 2022-08-09_17-16_1 2022-08-10_12-03 2022-08-10_12-04 devicemanager

These are the errors I receive.

[2022-08-11 10:39:29.836] [warning] Monitor thread (device: 18443010814EF50F00 [192.168.70.57]) - ping was missed, closing the device connection RuntimeError: Communication exception - possible device error/misconfiguration. Original message 'Couldn't read data from stream: 'Image' (X_LINK_ERROR)'

Here is the code I was testing on.

import depthai as dai
import time
 
pipeline = dai.Pipeline()
 
camera = pipeline.create(dai.node.ColorCamera)
videoEncoder = pipeline.create(dai.node.VideoEncoder)
imageOutput = pipeline.create(dai.node.XLinkOut)
 
imageOutput.setStreamName("Image")
 
camera.setImageOrientation(dai.CameraImageOrientation.ROTATE_180_DEG)
camera.setBoardSocket(dai.CameraBoardSocket.RGB)
camera.setResolution(dai.ColorCameraProperties.SensorResolution.THE_4_K)
videoEncoder.setDefaultProfilePreset(camera.getFps(), dai.VideoEncoderProperties.Profile.MJPEG)
 
camera.video.link(videoEncoder.input)
videoEncoder.bitstream.link(imageOutput.input)
 
# 
info = dai.DeviceInfo('192.168.70.57')
 
with dai.Device(pipeline, info, maxUsbSpeed=dai.UsbSpeed.SUPER_PLUS) as device:
  imageQueue = device.getOutputQueue(name="Image", maxSize=1, blocking=True)
  device.setLogLevel(dai.LogLevel.DEBUG)
  device.setLogOutputLevel(dai.LogLevel.DEBUG)
 
  while True:
    imageFrame:dai.ImgFrame = imageQueue.get()
    print(imageFrame.getSequenceNum())
    time.sleep(0.001)


apollollopa avatar Aug 11 '22 15:08 apollollopa