◆ SimpleIMUFusion()
EIGEN_MAKE_ALIGNED_OPERATOR_NEW xrt_fusion::SimpleIMUFusion::SimpleIMUFusion |
( |
double |
gravity_rate = 0.9 | ) |
|
|
inlineexplicit |
- Parameters
-
gravity_rate | Value in [0, 1] indicating how much the accelerometer should affect the orientation each second. |
◆ getAngVel()
Eigen::Vector3d const& xrt_fusion::SimpleIMUFusion::getAngVel |
( |
| ) |
const |
|
inline |
Get the angular velocity in body space.
References handleGyro().
◆ getCorrectedWorldAccel()
Eigen::Vector3d xrt_fusion::SimpleIMUFusion::getCorrectedWorldAccel |
( |
Eigen::Vector3d const & |
accel | ) |
const |
|
inline |
Use this to obtain the residual, world-space acceleration in m/s/s not associated with gravity, after incorporating a measurement.
- Parameters
-
accel | Body-relative acceleration measurement in m/s/s. |
References MATH_GRAVITY_M_S2.
◆ getPredictedQuat()
Eigen::Quaterniond xrt_fusion::SimpleIMUFusion::getPredictedQuat |
( |
timepoint_ns |
timestamp | ) |
const |
|
inline |
Get the predicted orientation at some point in the future.
Here, we do not clamp the delta-t, so only ask for reasonable points in the future. (The gyro handler math does clamp delta-t for the purposes of integration in case of long times without signals, etc, which is OK since the accelerometer serves as a correction.)
Referenced by getRotationMatrix().
◆ getQuat()
Eigen::Quaterniond xrt_fusion::SimpleIMUFusion::getQuat |
( |
| ) |
const |
|
inline |
Get the current state orientation.
◆ getRotationMatrix()
Eigen::Matrix3d xrt_fusion::SimpleIMUFusion::getRotationMatrix |
( |
| ) |
const |
|
inline |
◆ getRotationVec()
Eigen::Vector3d xrt_fusion::SimpleIMUFusion::getRotationVec |
( |
| ) |
const |
|
inline |
Get the current state orientation as a rotation vector.
◆ handleAccel()
bool xrt_fusion::SimpleIMUFusion::handleAccel |
( |
Eigen::Vector3d const & |
accel, |
|
|
timepoint_ns |
timestamp |
|
) |
| |
|
inline |
Process an accelerometer report.
- Parameters
-
accel | Body-relative acceleration measurement in m/s/s. |
timestamp | Nanosecond timestamp of this measurement. |
- Returns
- true if the report was used to update the state.
◆ handleGyro()
bool xrt_fusion::SimpleIMUFusion::handleGyro |
( |
Eigen::Vector3d const & |
gyro, |
|
|
timepoint_ns |
timestamp |
|
) |
| |
|
inline |
Process a gyroscope report.
- Note
- At startup, no gyro reports will be considered until at least one accelerometer report has been processed, to provide us with an initial estimate of the direction of gravity.
- Parameters
-
gyro | Angular rate in radians per second, in body space. |
timestamp | Nanosecond timestamp of this measurement. |
- Returns
- true if the report was used to update the state.
Referenced by getAngVel(), and imu_fusion::imu_fusion_incorporate_gyros().
◆ postCorrect()
void xrt_fusion::SimpleIMUFusion::postCorrect |
( |
| ) |
|
|
inline |
◆ valid()
bool xrt_fusion::SimpleIMUFusion::valid |
( |
| ) |
const |
|
inlinenoexcept |
The documentation for this class was generated from the following file: