Function ouster::sdk::algorithm::plumb_imu¶
Defined in File plumb.h
Function Documentation¶
-
nonstd::optional<core::Matrix4dR> ouster::sdk::algorithm::plumb_imu(const core::FrameSet &frames)¶
Level the body frame from IMU data.
Averages the valid accelerometer samples of the frame from the sensor whose IMU reports the highest fraction of valid samples, breaking ties by sample count and then lowest index; a single valid sample is enough when nothing better exists (FW 3.2+ IMU profiles; legacy IMU packets are not supported). Each sample is first derotated into the frame of the first sample by integrating the gyro, so rotation during the frame does not smear the average direction. The anchor sensor and the gravity direction it measured are logged.
Both
LidarFrameandCameraFrameframes are considered: any frame carrying the IMU fields (IMU_ACC/IMU_GYRO/IMU_TIMESTAMP/IMU_STATUS) participates. Each frame uses its info’ssensor_to_bodyandimu_to_sensor_transform(bothSensorInfofields) to rotate the estimate into the body frame. Both kinds take these fromsensor_info; a camera’simu_to_sensor_transformdefaults to identity (IMU coincident with the camera frame) unless calibrated.- Parameters:
frames[in] Frame set to sample; typically the first of a stream. Each frame’s extrinsics rotate the estimate into the body frame.
- Returns:
Rotation-only correction to left-multiply onto the current orientation, taking the measured gravity direction to +Z; empty when no sensor has usable IMU data.