IMU (intertial measurement unit) node can be used to receive data from the IMU chip on the device. Our OAK devices use either:
BNO085 (datasheet here) 9-axis sensor, combining accelerometer, gyroscope, and magnetometer. It also does sensor fusion on the (IMU) chip itself. We have efficiently integrated this driver into the DepthAI.
BMI270 6-axis sensor, combining accelerometer and gyroscope
. The IMU chip is connected to the RVC over SPI.
How to place it¶
Inputs and Outputs¶
┌──────────────┐ │ │ │ │ out │ IMU ├─────────► │ │ │ │ └──────────────┘
For BNO086, gyroscope frequency above 400Hz can produce some jitter from time to time due to sensor HW limitation.
Maximum frequencies: 500 Hz raw accelerometer, 1000 Hz raw gyroscope values individually, and 500Hz combined (synced) output. You can obtain the combined synced 500Hz output with
imu.enableIMUSensor([dai.IMUSensor.RAW_ACCELEROMETER, dai.IMUSensor.RAW_GYROSCOPE], 500).
List of devices that have an IMU sensor on-board:
When enabling the IMU sensors (
imu.enableIMUSensor()), you can select between the following sensors:
Here are descriptions of all sensors:
Available IMU sensors. More details about each sensor can be found in the datasheet:
ACCELEROMETER_RAW : Section 2.1.1
Acceleration of the device without any postprocessing, straight from the sensor. Units are [m/s^2]
ACCELEROMETER : Section 2.1.1
Acceleration of the device including gravity. Units are [m/s^2]
LINEAR_ACCELERATION : Section 2.1.1
Acceleration of the device with gravity removed. Units are [m/s^2]
GRAVITY : Section 2.1.1
Gravity. Units are [m/s^2]
GYROSCOPE_RAW : Section 2.1.2
The angular velocity of the device without any postprocessing, straight from the sensor. Units are [rad/s]
GYROSCOPE_CALIBRATED : Section 2.1.2
The angular velocity of the device. Units are [rad/s]
GYROSCOPE_UNCALIBRATED : Section 2.1.2
Angular velocity without bias compensation. Units are [rad/s]
MAGNETOMETER_RAW : Section 2.1.3
Magnetic field measurement without any postprocessing, straight from the sensor. Units are [uTesla]
MAGNETOMETER_CALIBRATED : Section 2.1.3
The fully calibrated magnetic field measurement. Units are [uTesla]
MAGNETOMETER_UNCALIBRATED : Section 2.1.3
The magnetic field measurement without hard-iron offset applied. Units are [uTesla]
ROTATION_VECTOR : Section 2.2
The rotation vector provides an orientation output that is expressed as a quaternion referenced to magnetic north and gravity. It is produced by fusing the outputs of the accelerometer, gyroscope and magnetometer. The rotation vector is the most accurate orientation estimate available. The magnetometer provides correction in yaw to reduce drift and the gyroscope enables the most responsive performance.
GAME_ROTATION_VECTOR : Section 2.2
The game rotation vector is an orientation output that is expressed as a quaternion with no specific reference for heading, while roll and pitch are referenced against gravity. It is produced by fusing the outputs of the accelerometer and the gyroscope (i.e. no magnetometer). The game rotation vector does not use the magnetometer to correct the gyroscopes drift in yaw. This is a deliberate omission (as specified by Google) to allow gaming applications to use a smoother representation of the orientation without the jumps that an instantaneous correction provided by a magnetic field update could provide. Long term the output will likely drift in yaw due to the characteristics of gyroscopes, but this is seen as preferable for this output versus a corrected output.
GEOMAGNETIC_ROTATION_VECTOR : Section 2.2
The geomagnetic rotation vector is an orientation output that is expressed as a quaternion referenced to magnetic north and gravity. It is produced by fusing the outputs of the accelerometer and magnetometer. The gyroscope is specifically excluded in order to produce a rotation vector output using less power than is required to produce the rotation vector of section 2.2.4. The consequences of removing the gyroscope are: Less responsive output since the highly dynamic outputs of the gyroscope are not used More errors in the presence of varying magnetic fields.
ARVR_STABILIZED_ROTATION_VECTOR : Section 2.2
Estimates of the magnetic field and the roll/pitch of the device can create a potential correction in the rotation vector produced. For applications (typically augmented or virtual reality applications) where a sudden jump can be disturbing, the output is adjusted to prevent these jumps in a manner that takes account of the velocity of the sensor system.
ARVR_STABILIZED_GAME_ROTATION_VECTOR : Section 2.2
While the magnetometer is removed from the calculation of the game rotation vector, the accelerometer itself can create a potential correction in the rotation vector produced (i.e. the estimate of gravity changes). For applications (typically augmented or virtual reality applications) where a sudden jump can be disturbing, the output is adjusted to prevent these jumps in a manner that takes account of the velocity of the sensor system. This process is called AR/VR stabilization.