- Edited
Hi,
For the OAK-1 POE I receive the following error usually after 30 min to 12 hours of script execution.
Traceback (most recent call last):
File "runoak.py", line 118, in inference
inRgb = qRgb.tryGet()
RuntimeError: Communication exception - possible device error/misconfiguration. Original message 'Couldn't read data from stream: 'rgb' (X_LINK_ERROR)'
Is there a recommended approach to dealing with this error, such as restarting the pipeline as shown below?
device = dai.Device(pipeline, device_info)
device.startPipeline()
The documentation https://docs.luxonis.com/en/latest/pages/tutorials/getting-started-with-poe/ mentions insufficient power supply as a possible culprit - is there a decent way to troubleshoot this?
The pipeline I am using is below:
pipeline = dai.Pipeline()
# Define sources and outputs
cam = pipeline.createColorCamera()
nn = pipeline.createMobileNetDetectionNetwork()
xoutFrame = pipeline.createXLinkOut()
xoutNN = pipeline.createXLinkOut()
xoutFrame.setStreamName("rgb")
xoutNN.setStreamName("nn")
# Properties
cam.setPreviewKeepAspectRatio(True)
cam.setPreviewSize(300, 300)
cam.setInterleaved(False)
cam.setResolution(dai.ColorCameraProperties.SensorResolution.THE_1080_P)
cam.setImageOrientation(dai.CameraImageOrientation.ROTATE_180_DEG)
# Define a neural network
nn.setBlobPath(self.nnPath)
nn.setConfidenceThreshold(0.7)
nn.setNumInferenceThreads(2)
nn.input.setBlocking(False)
# Linking
cam.preview.link(xoutFrame.input)
cam.preview.link(nn.input)
nn.out.link(xoutNN.input)
The queues I have set are:
qRgb = device.getOutputQueue(name="rgb", maxSize=4, blocking=False)
qDet = device.getOutputQueue(name="nn", maxSize=4, blocking=False)