mrsp / imu_ekf

A ROS C++ node that fuses IMU and Odometry
67 stars 20 forks source link

what's T_B_A & T_B_G means? #5

Closed ryanyej closed 2 years ago

ryanyej commented 2 years ago

I found T_B_A&T_B_G have 17 vectors, shouldn't last 5 vectors be 4 vectors like 0,0,0,1? BTW, what does these 2 matrix means?

mrsp commented 2 years ago

Hello Ryan

T_B_A and T_B_G represent the affine transformations from accelerometer to base_link and gyro to base_link respectively.

You are right it should have been a 16 vector to represent a homogeneous matrix, check this code https://github.com/mrsp/serow/blob/dde406ccd22fbcbf81d888b75bb787a40d12fb0b/src/humanoid_ekf.cpp#L141 for more details since this repo have not been maintained for a long time.

Finally for the case of linear accelerations and angular velocities (which are vectors) only the rotation part of the transformation is needed to transform these vectors from their local frame to the base_link frame.

ryanyej commented 2 years ago

Hi Stylianos, thank you for the quick response. Very good demo through. I guess it would be more closer to the true status if using real-time sensor covariance for Q &R matrix.

mrsp commented 2 years ago

You can specify the IMU measurements noise and biases noise in the configuration file and the filter automatically builds the Q (Process noise) covariance which for the IMU is assumed to be constant over time and is a valid assumption in practice.

Regarding the R (Measurement noise) for example Visual Odometry or Kinematic Odometry noise, it is assumed to be constant for simplicity. Nevertheless, the code would require minimal modification to associate a time-varying measurement noise with each measurement. For example fill in the matrix R from the odometry msg covariance.