From 7ea333aa5119de1795502591a4add6b5677aa50c Mon Sep 17 00:00:00 2001 From: SzabolcsGergely Date: Sat, 19 Feb 2022 12:27:44 +0200 Subject: [PATCH 1/3] Add device monotonic timestamp to IMU reports --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 5a1e6338c..83d2c03e1 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 5a1e6338c18f607dffe5004a98993a3d00ef1b13 +Subproject commit 83d2c03e19a5ff273de451daed0f0df235aa926f From ac3fd23458cce910040f53f4cc48b973571f0f31 Mon Sep 17 00:00:00 2001 From: SzabolcsGergely Date: Sat, 19 Feb 2022 13:07:25 +0200 Subject: [PATCH 2/3] Add python bindings --- depthai-core | 2 +- src/DatatypeBindings.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 83d2c03e1..7b3598b2b 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 83d2c03e19a5ff273de451daed0f0df235aa926f +Subproject commit 7b3598b2b339fb71524574e3a67493b6a9ccd37e diff --git a/src/DatatypeBindings.cpp b/src/DatatypeBindings.cpp index bd78fd400..61cb3e8f0 100644 --- a/src/DatatypeBindings.cpp +++ b/src/DatatypeBindings.cpp @@ -503,6 +503,7 @@ void DatatypeBindings::bind(pybind11::module& m, void* pCallstack){ .def_readwrite("sequence", &IMUReport::sequence) .def_readwrite("accuracy", &IMUReport::accuracy) .def_readwrite("timestamp", &IMUReport::timestamp) + .def_readwrite("tsDevice", &IMUReport::tsDevice) ; From f58d6b1876e03df2746ff4500368f18c0f3eed4b Mon Sep 17 00:00:00 2001 From: SzabolcsGergely Date: Tue, 22 Feb 2022 14:31:34 +0200 Subject: [PATCH 3/3] Modify IMU example: GYRO at 400 hz to avoid spikes --- depthai-core | 2 +- examples/IMU/imu_gyroscope_accelerometer.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/depthai-core b/depthai-core index a4e134120..f7cb4088f 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit a4e134120f8f73ad1f70d946ddb71f51cb91846f +Subproject commit f7cb4088f781b043e1442aaada3d23440480149a diff --git a/examples/IMU/imu_gyroscope_accelerometer.py b/examples/IMU/imu_gyroscope_accelerometer.py index eba03cc7c..097091eaa 100755 --- a/examples/IMU/imu_gyroscope_accelerometer.py +++ b/examples/IMU/imu_gyroscope_accelerometer.py @@ -14,8 +14,11 @@ xlinkOut.setStreamName("imu") -# enable ACCELEROMETER_RAW and GYROSCOPE_RAW at 500 hz rate -imu.enableIMUSensor([dai.IMUSensor.ACCELEROMETER_RAW, dai.IMUSensor.GYROSCOPE_RAW], 500) +# enable ACCELEROMETER_RAW at 500 hz rate +imu.enableIMUSensor(dai.IMUSensor.ACCELEROMETER_RAW, 500) +# enable GYROSCOPE_RAW at 400 hz rate +imu.enableIMUSensor(dai.IMUSensor.GYROSCOPE_RAW, 400) +# it's recommended to set both setBatchReportThreshold and setMaxBatchReports to 20 when integrating in a pipeline with a lot of input/output connections # above this threshold packets will be sent in batch of X, if the host is not blocked and USB bandwidth is available imu.setBatchReportThreshold(1) # maximum number of IMU packets in a batch, if it's reached device will block sending until host can receive it