IMU Overview
Accelerometer
The accelerometer detects the instantaneous acceleration of the camera. The data provided by the accelerometer determines whether the camera is getting faster or slower, in any direction, with a precise value in meters per second squared (m/s²).
When an accelerometer is static, it is still measuring an acceleration of 9.8m/s² which corresponds to the force applied by the Earth’s gravity. This force has always the same direction, from the camera to the center of the earth. The gravity allows us to compute the camera’s absolute inclination and detect events like free falls.
Gyroscope
A gyroscope measures the angular velocity of the camera in degrees per second (deg/s). When combined with the accelerometer, both sensors can estimate the orientation of the camera at a high frequency.
Output Data
The following information is accessible from the camera sensor stack:
Using the API
Accessing the IMU data can be done through the SensorsData class. Data is stored in the class SensorsData::IMUData which amongst others contains the accelerometer and gyroscope values.
You can retrieve IMU data with the following code:
Pose
One of the key reasons for having an accelerometer and gyroscope in the camera is that their data can be fused to estimate camera orientation. The accelerometer provides gravity orientation, while the gyroscope estimates the rotation applied to the camera. Fused at high frequency, the combination of both sensors provides a robust orientation estimation.
IMU pose can be retrieved in imu_data.pose.
Code Example
For a code example, check out the Getting Sensor Data tutorial.

