aau-cns / mars_lib

MaRS: A Modular and Robust Sensor-Fusion Framework
Other
258 stars 34 forks source link

Problems about Chi2 rejection #5

Closed HouChentripleg closed 1 year ago

HouChentripleg commented 1 year ago

Thanks for your work.

HouChentripleg commented 1 year ago

I find a very strange problem about Chi2 rejection. I use the pose sensor config to integrate IMU data and slam pose, the default choise of Chi2 rejection is off and it works fine. But when I turn it on and set the significance level being 0.05 and the dof being 6, the report shows a very high X2 calculation result compring with the ucv value of 12.59, which seems to be very strang to me. Looking forward to your reply:)

Chris-Bee commented 1 year ago

Hello @HouChentripleg, the X2 value depends on the residual of the sensor update and its variance. In order to cause a high X2 value, either the variance of the residual is too narrow or the residual is too high.

Is the residual for this particular update as you would expect it?

If this is happening right after starting the filter, then one possible issue could be that the initial states are not initialized correctly, and thus rejected.

HouChentripleg commented 1 year ago

I try to adjuct the initial core state covariance in pose_config.yaml file, after setting them with high values, the initial pose measurement pass the Chi2 test. But as time goes on, the X2 value becomes higher(about 300-400 compared with the ucv of 12.59) and the corresponding pose measurement gets rejected, later there is even no prior sensor state in the buffer to do sensor update. Should I continue to adjust the parameters in pose_config.yaml(how to set the core state covariance and pose state covariance?) or add some more distinct random noise to the data to test the Chi2?

Chris-Bee commented 1 year ago

That makes sense. If all measurements get rejected, then at some point, there is no reliable measurement/state for the prior state.

The initial core state and initial calibration state covariance need to be set according to your uncertainty of the state values that you use for initialization. Uncertainty of the initial measurement used for initialization or uncertainty of the calibration, e.g., Pose sensor w.r.t. IMU.