Ok, now I am trying to synchronize four IMX378 cameras.
I followed the instructions on this page, specifically
However, I am getting the following error
[194430109153DF1200] [1.2] [4.790] [system] [critical] Fatal error. Please report to developers. Log: 'Fatal error on MSS CPU: trap: 00, address: 00000000' '0'
Traceback (most recent call last):
File "/home/antoine/Pollen/ReachyV2_vision/examples/example.py", line 78, in <module>
data, latency, ts = ffcw.get_data()
File "/home/antoine/Pollen/ReachyV2_vision/ffc_wrapper/ffc_wrapper.py", line 184, in get_data
pkts[cam] = self.queue[cam].get()
RuntimeError: Communication exception - possible device error/misconfiguration. Original message 'Couldn't read data from stream: 'CAM_A' (X_LINK_ERROR)'
Here is a minimal example that yields that error
import depthai as dai
import cv2
stringToCam = {
"CAM_A": dai.CameraBoardSocket.CAM_A,
"CAM_B": dai.CameraBoardSocket.CAM_B,
"CAM_C": dai.CameraBoardSocket.CAM_C,
"CAM_D": dai.CameraBoardSocket.CAM_D,
}
pipeline = dai.Pipeline()
cams = {}
for cam_id in stringToCam.keys():
cam_node = pipeline.createColorCamera()
cam_node.initialControl.setManualFocus(135)
cam_node.setBoardSocket(stringToCam[cam_id])
cam_node.setResolution(dai.ColorCameraProperties.SensorResolution.THE_1080_P)
cam_node.setFps(30)
cam_node.setIspScale(2, 3) # 720p
cam_node.setImageOrientation(dai.CameraImageOrientation.ROTATE_180_DEG)
cam_node.setInterleaved(False)
# If I remove this, it works
if cam_id == "CAM_A":
cam_node.initialControl.setFrameSyncMode(dai.CameraControl.FrameSyncMode.OUTPUT)
else:
cam_node.initialControl.setFrameSyncMode(dai.CameraControl.FrameSyncMode.INPUT)
out = pipeline.createXLinkOut()
out.setStreamName(cam_id)
cam_node.isp.link(out.input)
cams[cam_id] = cam_node
config = dai.Device.Config()
config.board.gpio[6] = dai.BoardConfig.GPIO(
dai.BoardConfig.GPIO.OUTPUT, dai.BoardConfig.GPIO.Level.HIGH
)
device = dai.Device(config)
device.startPipeline(pipeline)
queue = {}
for cam_id in cams.keys():
queue[cam_id] = device.getOutputQueue(cam_id, maxSize=30, blocking=True)
while True:
for cam_id in cams.keys():
frame = queue[cam_id].get().getCvFrame()
cv2.imshow(cam_id, frame)
if cv2.waitKey(1) == ord("q"):
break
Any thoughts ?
Thanks !