Hi guys,

I am trying to stream and synchronize the output of the cameras (RGBD) using the following example https://github.com/luxonis/depthai-experiments/blob/master/gen2-syncing/host-multiple-OAK-sync.py, but I am not able to get any reliable output (most of the time nothing is being returned check_sync returns false).

My pipeline is defined as follows:

    camRgb = pipeline.create(dai.node.ColorCamera)
    camLeft = pipeline.create(dai.node.MonoCamera)
    camRight = pipeline.create(dai.node.MonoCamera)
    stereo = pipeline.create(dai.node.StereoDepth)

    camRgb.setFps(5)    
    camLeft.setFps(5)
    camRight.setFps(5)

    xoutRgb = pipeline.create(dai.node.XLinkOut)
    xoutDepth = pipeline.create(dai.node.XLinkOut)

    for monoCam in (camLeft, camRight):
        monoCam.setResolution(resolution_depth["res"])

    camRgb.setResolution(resolution_rgb["res"])
    camRgb.setPreviewSize(resolution_rgb["w"], resolution_rgb["h"])

    stereo.setDefaultProfilePreset(dai.node.StereoDepth.PresetMode.HIGH_DENSITY)
    stereo.initialConfig.setMedianFilter(median)

    stereo.setRectifyEdgeFillColor(0)
    stereo.setLeftRightCheck(False)
    stereo.setExtendedDisparity(True)
    stereo.setSubpixel(False)
    
    if depth_alignment:
        stereo.setLeftRightCheck(True)
        stereo.setDepthAlign(dai.CameraBoardSocket.CAM_A)

    if alpha is not None:
        stereo.setAlphaScaling(alpha)
        config = stereo.initialConfig.get()
        config.postProcessing.brightnessFilter.minBrightness = 0
        stereo.initialConfig.set(config)

    xoutRgb.setStreamName("rgb")
    xoutDepth.setStreamName("depth")

    camRgb.preview.link(xoutRgb.input)
    camLeft.out.link(stereo.left)
    camRight.out.link(stereo.right)
    stereo.depth.link(xoutDepth.input)

Am I defining something wrong? I don't think that network bandwidth is an issue as I use 5 FPS with a 1Gbps switch.

Hubert

    As I set FPS to 5,

    # if time_diff <= timedelta(milliseconds=math.ceil(500 / SELECTED_FPS)):
    if time_diff <= timedelta(milliseconds=math.ceil(500/5)):
       matching_frames.append(1)
       break

    hubbla most of the time nothing is being returned check_sync returns false

    This would imply that perhaps the diff is not set correctly, so if the timedelta falls differently each time, it might get ignored by the matching and possibly deleted. Change the threshold to see if it makes a difference. Also add more print statements to see what each step does and why it doesn't work as expected.

    Thanks,
    Jaka