- Edited
I can read neither the device acceleration, the rotation speed, nor the rotation vector from a connected Oak4 S, but I do receive the magnetometer measures. If I enable MAGNETOMETER_RAW
alone or with some other quantity, I do receive messages, but only the magnetometer values are filled. Otherwise, if I enable only ACCELEROMETER
or other measurements not related to the magnetometer, the output queue blocks indefinitely.
I updated both the Luxonis OS to 1.15.0 and the DepthAI SDK to 3.0.0rc3.
So my questions are:
- I know you are still finalizing the software stack, but our application needs the IMU data to run. Would there be a way to receive at least the raw acceleration, just for testing purposes?
- Is there some documentation about all quantities that are provided by the IMU on the Oak 4?
Minimal reproducible example:
import depthai as dai
with dai.Device() as device:
print(f'Camera {device.getProductName()}, MXID {device.getDeviceId()}')
print(f"IMU type: {device.getConnectedIMU()}, firmware version: {device.getIMUFirmwareVersion()}")
with dai.Pipeline() as pipeline:
imu = pipeline.create(dai.node.IMU)
imu.enableIMUSensor([dai.IMUSensor.ACCELEROMETER, dai.IMUSensor.MAGNETOMETER_RAW], 60)
imu.setBatchReportThreshold(10)
imu.setMaxBatchReports(10)
imu_output_queue = imu.out.createOutputQueue(maxSize=128, blocking=False)
pipeline.start()
while pipeline.isRunning():
imu_batch: dai.IMUData = imu_output_queue.get()
if len(imu_batch.packets) <= 0:
continue
data = imu_batch.packets[0]
print(f'{data.acceleroMeter.x:.3f} {data.acceleroMeter.y:.3f} {data.acceleroMeter.z:.3f} {data.acceleroMeter.accuracy}')
print(f'{data.magneticField.x:.3f} {data.magneticField.y:.3f} {data.magneticField.z:.3f} {data.magneticField.accuracy}')
Output:
Camera OAK4-S-W, MXID 761681342
IMU type: accel, firmware version: 0.45.0
0.000 0.000 0.000 Accuracy.UNRELIABLE
14.400 -27.300 -29.250 Accuracy.HIGH
0.000 0.000 0.000 Accuracy.UNRELIABLE
12.150 -28.800 -31.500 Accuracy.HIGH