I'm fighting to understand IMU calibration and I discovered something during my attempts. It seems to me that all accelerometer output mode correspond to a left-handed coordinate system.
Here's the code I used to print the accelerometer values:
#!/usr/bin/env python3
"""
Record 1s of accelerometer data in one IMU configuration and print the average.
Usage: python3 imu_config_snapshot.py {raw,uncalibrated,calibrated} [--axis AXIS]
"""
import argparse
import statistics
from datetime import timedelta
import depthai as dai
SENSORS = {
"raw": dai.IMUSensor.ACCELEROMETER_RAW,
"uncalibrated": dai.IMUSensor.ACCELEROMETER_UNCALIBRATED,
"calibrated": dai.IMUSensor.ACCELEROMETER_CALIBRATED,
}
REPORT_RATE_HZ = 100
DURATION_S = 1.0
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("mode", choices=sorted(SENSORS), help="accelerometer configuration to record")
parser.add_argument("--axis", default="", help="text to print at the beginning of the output line")
args = parser.parse_args()
prefix = f"{args.axis} " if args.axis else ""
samples = []
with dai.Device() as device:
print(f"Connected to {device.getDeviceInfo().name}")
with dai.Pipeline(device) as pipeline:
imu = pipeline.create(dai.node.IMU)
imu.enableIMUSensor(SENSORS[args.mode], REPORT_RATE_HZ)
imu.setBatchReportThreshold(1)
imu.setMaxBatchReports(10)
imu_queue = imu.out.createOutputQueue(maxSize=50, blocking=False)
pipeline.start()
deadline = dai.Clock.now() + timedelta(seconds=DURATION_S)
while pipeline.isRunning() and dai.Clock.now() < deadline:
imu_data = imu_queue.get(timeout=timedelta(seconds=1))
if imu_data is None:
break
for packet in imu_data.packets:
a = packet.acceleroMeter
samples.append((a.x, a.y, a.z))
if not samples:
print(f"{prefix}No samples received.")
else:
xs, ys, zs = zip(*samples)
magnitudes = [(x**2 + y**2 + z**2) ** 0.5 for x, y, z in samples]
print(
f"{prefix}{args.mode.upper()}: n={len(samples)} "
f"mean=({statistics.fmean(xs):+.3f}, {statistics.fmean(ys):+.3f}, {statistics.fmean(zs):+.3f}) m/s^2 "
f"|a|_mean={statistics.fmean(magnitudes):.3f} m/s^2"
)
When I compare the accelerometer values to my expectations, I get 2 correct axes out of 3, which can only mean that the IMU coordinates are in a left-handed system.
I join the illustration in pictures. This is also confirmed by this topic: https://discuss.luxonis.com/d/5625-orientation-of-imu-in-different-oak-models.



Thanks for clearance.