Open VRichardJP opened 1 month ago
If anyone is interested, this is how I have implemented here:
Eigen::Vector3f grav_vec (0., 0., this->gravity_);
if (this->gravity_estimate_) {
// Estimate gravity magnitude
this->gravity_ = (accel_avg - this->state.b.accel).norm();
grav_vec = Eigen::Vector3f (0., 0., this->gravity_);
}
In DLIO, local gravity value is a fixed parameter and can be used to estimate the initial orientation/bias of the robot.
However, most IMU sensors do measure and report gravity, for example something like this:
acc={x=0.1, y=0.2, z=9.76}
. Thus the gravity value can be calibrated automatically like so:gravity = (avg_acc - initial_bias).norm())
, and it is not necessary to set the gravity value anymoreWhat do you think?