ElettraSciComp / witmotion_IMU_ros

ROS wrapper for the family of IMU sensor devices manufactured by Witmotion Ltd.
MIT License
30 stars 40 forks source link

wt901 sensor covariance #21

Closed zejiekong closed 1 year ago

zejiekong commented 1 year ago

Hi, how is the accelerometer, gyroscope ... covariance matrix obtained for the wt901 sensor? As shown in the wt901.yml config file. Thank you.

twdragon commented 1 year ago

@zejiekong you can use the dedicated controller application for this sensor. Its documentation is still WIP but it has a comprehensive help message printed by -h key. The covariance in the case of these sensors is the only noise variance detection experiment, so the procedure looks like the following:

  1. Place the serial attached sensor on the robot turned on and standing still (the best variant for mobile robots), or just place it on a mechanically stable surface;
  2. Set up the desired polling rate and measurement frequency with correspondence to the port baudrate;
  3. Run the controller application with --covariance option: rosrun witmotion_ros witmotionctl-wt901 --covariance
  4. Hold the sensor still for from 15 to 45 seconds to collect the data;
  5. Stop the controller application, then it will print the covariance calculated by the collected data and its noise.

The existing defaults are obtained exactly in this way repeating the experiment from 3 to 7 tries, then averaging the measurements.

zejiekong commented 1 year ago

Thank you very much for the explanation !

zejiekong commented 1 year ago

What methods would you recommend to remove the noise and bias from the witmotion imu if it is possible?

twdragon commented 1 year ago

@zejiekong the sensors have their own implementation of the Kalman filter (at least, Witmotion Ltd. declares it), so the attempts to eliminate the noise with some kind of smart filtering likely will provoke filter dissipation. I can recommend exchanging the measurement frequency for precision and making the accumulation register with loopback-based deviation calculation via the known existing noise covariance.

zejiekong commented 1 year ago

Hi, what do you mean by exchanging the measurement frequency for precision?

twdragon commented 1 year ago

@zejiekong just using several subsequent measurements from the sensor to reformulate new IMU ROS message with refined values

zejiekong commented 1 year ago

Also, I see there is a CalculateAccelerationBias method in the wt901-uart.cpp file. Does that calculate the accelerometer bias stability? And what does the SetAccelerationBias method do?

twdragon commented 1 year ago

@zejiekong they are convenience methods to set up the constant biases on the linear accelerometer via controller application. The functionality is partially described here, but the documentation is still WIP. These methods do not calculate stability biases or noise covariance.