Open weidezhang opened 4 years ago
This is a simple first-order exponential smoothing filter which slowly pulls the value of gravity_vector_
towards the value of imu_linear_acceleration
. It is usually used when your measurements are noisy (like imu_linear_acceleration
are), but you want to follow the moving average of those measurements.
thanks. i guess it also assumes the imu_linearacceleration is mostly due to gravity instead of motion ? // Change the orientation so that it agrees with the current // gravityvector. const Eigen::Quaterniond rotation = Eigen::Quaterniond::FromTwoVectors( gravityvector, orientation.conjugate() * Eigen::Vector3d::UnitZ()); orientation = (orientation_ * rotation).normalized();
@ojura do you know why we need to adjust the orientation to the gravity vector ? isn't those the same thing or different ?
ments are noisy (like
imu_linear_ac
void ImuTracker::Advance(const common::Time time) { CHECKLE(time, time); const double deltat = common::ToSeconds(time - time); const Eigen::Quaterniond rotation = transform::AngleAxisVectorToRotationQuaternion( Eigen::Vector3d(imu_angularvelocity deltat)); orientation = (orientation_ rotation).normalized(); *gravityvector = rotation.conjugate() gravityvector;** time_ = time; }
Every imu measure step,the gravity vector is converted its frame,is it right? If there is a filter for imu acc data,it should be filtered in robot imu frame or in earth frame.But the frame in this is always transformed between robot imu body frame and earth frame.
ments are noisy (like
imu_linear_ac
void ImuTracker::Advance(const common::Time time) { CHECKLE(time, time); const double deltat = common::ToSeconds(time - time); const Eigen::Quaterniond rotation = transform::AngleAxisVectorToRotationQuaternion( Eigen::Vector3d(imu_angularvelocity deltat)); orientation = (orientation_ rotation).normalized(); *gravityvector = rotation.conjugate() gravityvector;** time_ = time; }Every imu measure step,the gravity vector is converted its frame,is it right? If there is a filter for imu acc data,it should be filtered in robot imu frame or in earth frame.But the frame in this is always transformed between robot imu body frame and earth frame.
I just want to konw why alhpa equals exp(-delta_t/im_gravity_timeconstant) ???
Hi, I'm still confused about how gravity vector was updated in IMU tracker's AddIMULinearAccelerationObservation function.
gravityvector = (1. - alpha) gravityvector + alpha imu_linear_acceleration;
As far as I understand, gravity_vector represents the gravitational direction in tracking frame. confused about why imu_linear_acceleration can add with gravity_vector ? what does the result mean ?