vectr-ucla / direct_lidar_inertial_odometry

[IEEE ICRA'23] A new lightweight LiDAR-inertial odometry algorithm with a novel coarse-to-fine approach in constructing continuous-time trajectories for precise motion correction.
MIT License
521 stars 101 forks source link

Why not estimate gravity value directly #48

Open VRichardJP opened 1 month ago

VRichardJP commented 1 month ago

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 anymore

What do you think?

VRichardJP commented 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_);
      }