From 2e7cd0ad90c402c1484a8647f96aff89b581500c Mon Sep 17 00:00:00 2001 From: asahtik Date: Tue, 5 Dec 2023 21:36:55 +0100 Subject: [PATCH 1/7] Bump core --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 8d45d32a8..419cfd235 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 8d45d32a89ec9138f60e18e18dd8f5246650d1fb +Subproject commit 419cfd235d313e83e6b9013839447200b9f18ac0 From 56ef6d80c66a1096cbfa2fd5b6975a8aaf086f94 Mon Sep 17 00:00:00 2001 From: Matevz Morato Date: Thu, 7 Dec 2023 01:22:19 +0100 Subject: [PATCH 2/7] Add an example --- depthai-core | 2 +- examples/Sync/imu_video_synced.py | 59 +++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 examples/Sync/imu_video_synced.py diff --git a/depthai-core b/depthai-core index 419cfd235..ef06fd654 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 419cfd235d313e83e6b9013839447200b9f18ac0 +Subproject commit ef06fd6544440470f1d5c146ab4e2ec50c085031 diff --git a/examples/Sync/imu_video_synced.py b/examples/Sync/imu_video_synced.py new file mode 100644 index 000000000..7fbede660 --- /dev/null +++ b/examples/Sync/imu_video_synced.py @@ -0,0 +1,59 @@ +import depthai as dai +import numpy as np +import cv2 +from datetime import timedelta + +device = dai.Device() + +imuType = device.getConnectedIMU() +imuFirmwareVersion = device.getIMUFirmwareVersion() +print(f"IMU type: {imuType}, firmware version: {imuFirmwareVersion}") + +if imuType != "BNO086": + print("Rotation vector output is supported only by BNO086!") + exit(0) + +pipeline = dai.Pipeline() + +color = pipeline.create(dai.node.ColorCamera) +imu = pipeline.create(dai.node.IMU) +sync = pipeline.create(dai.node.Sync) +xoutImu = pipeline.create(dai.node.XLinkOut) +xoutImu.setStreamName("imu") + +xoutGrp = pipeline.create(dai.node.XLinkOut) +xoutGrp.setStreamName("xout") + +color.setCamera("color") + +imu.enableIMUSensor(dai.IMUSensor.ROTATION_VECTOR, 120) +imu.setBatchReportThreshold(1) +imu.setMaxBatchReports(10) + +sync.setSyncThreshold(timedelta(milliseconds=10)) +sync.setSyncAttempts(-1) + +color.video.link(sync.inputs["video"]) +imu.out.link(sync.inputs["imu"]) + +sync.out.link(xoutGrp.input) + + +with device: + device.startPipeline(pipeline) + groupQueue = device.getOutputQueue("xout", 3, True) + while True: + groupMessage = groupQueue.get() + imuMessage = groupMessage["imu"] + colorMessage = groupMessage["video"] + print() + print("Device timestamp imu: " + str(imuMessage.getTimestampDevice())) + print("Device timestamp video:" + str(colorMessage.getTimestampDevice())) + latestRotationVector = imuMessage.packets[-1].rotationVector + imuF = "{:.4f}" + print(f"Quaternion: i: {imuF.format(latestRotationVector.i)} j: {imuF.format(latestRotationVector.j)} " + f"k: {imuF.format(latestRotationVector.k)} real: {imuF.format(latestRotationVector.real)}") + print() + cv2.imshow("video", colorMessage.getCvFrame()) + if cv2.waitKey(1) == ord("q"): + break From 0af0fc77b6d2dd87ec51eec502cee7a300fbd181 Mon Sep 17 00:00:00 2001 From: Matevz Morato Date: Thu, 7 Dec 2023 01:48:00 +0100 Subject: [PATCH 3/7] [RVC2 FW] Update FW with depthai-shared develop --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index ef06fd654..d60e20338 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit ef06fd6544440470f1d5c146ab4e2ec50c085031 +Subproject commit d60e20338014ad1c401b903afe32a3ac3e0f7021 From aa7e8fb989d9d3b0e2803988779f7dc129d02f2d Mon Sep 17 00:00:00 2001 From: Matevz Morato Date: Thu, 7 Dec 2023 15:56:24 +0100 Subject: [PATCH 4/7] Update core with stability fixes for timesyncing --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index d60e20338..00a5c5c32 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit d60e20338014ad1c401b903afe32a3ac3e0f7021 +Subproject commit 00a5c5c32cc2d2e4534ecda4fb0e1ae262c3806b From a4c687e0a38ce8852359adaf82f580b34954330f Mon Sep 17 00:00:00 2001 From: asahtik Date: Fri, 8 Dec 2023 13:03:37 +0100 Subject: [PATCH 5/7] Test of bl fix --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 8d45d32a8..e8e004862 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 8d45d32a89ec9138f60e18e18dd8f5246650d1fb +Subproject commit e8e004862c70516c1102ef40a86dbf7405e0e5c2 From 0c00a67080825c8ec3fc9e62c1fc75a96e0bf332 Mon Sep 17 00:00:00 2001 From: Matevz Morato Date: Mon, 11 Dec 2023 15:55:03 +0100 Subject: [PATCH 6/7] Update core --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index a8a470227..cf7e7e0c0 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit a8a470227ad798629609f088414153f7fc90b034 +Subproject commit cf7e7e0c0bbcb6cd50ddfb9f5902afa1998a23a1 From e50e92aad709e649673a01630b1bc1daa0d4586a Mon Sep 17 00:00:00 2001 From: Matevz Morato Date: Mon, 11 Dec 2023 20:50:36 +0100 Subject: [PATCH 7/7] Update core to develop --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index cf7e7e0c0..7930da4ea 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit cf7e7e0c0bbcb6cd50ddfb9f5902afa1998a23a1 +Subproject commit 7930da4ea455f1fa82e768f4ede581bafd10d9a8