-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect use of covariance in distance-sensor uORB topic #9861
Comments
Just curious: The sensor driver only publishes the raw data, why isn't the data processing and judgment done by ekf, because ekf is more clear about what it needs. |
The large varying data we get from the sonar sensor under certain conditions which this check will detect is a failure mode specific to that type of sensor which is why I would rather not have it in the ekf2 module. We may also be able to use the noise variance internal to the EKF to set the observation noise variance, but this is yet to be determined. |
@priseborough Could you send a PR that renames that field and initializes it with a sane value for all sensors? Happy to assist there, but changing makes total sense, yes. |
@LorenzMeier @priseborough it probably makese sense to sync with mavlink/mavlink#917 |
I have a branch which can be rebased and submitted as a PR when #9865 is merged See: |
Is this issue relate to my experience with sonar? |
Still relevant |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
done in #11520 |
The uORB distance sensor topic incorrectly contains a covariance field:
https://github.com/PX4/Firmware/blob/master/msg/distance_sensor.msg#L7
The issue is that you cannot have a covariance for a single measurement because a covariance is a measure of the amount of correlation between two random variables. For a single variable, the correct name to use is 'variance' which should have units of m^2
An inspection of the various publishers of this message shows that all but one are publishing a 0 value. The ulanding distance sensor driver is populating it as if it is a variance with units of m^2 using a fixed value.
The distance_sensor message needs to be corrected so that it:
A 'noise_variance' calculated from the data can be used by the sensor driver to determine if the sensor data is invalid. Sonar sensors are prone to very noisy data under certain circumstances and a noise variance validity test, spike rejection filter and median select filter should be available for each distance sensor.
The text was updated successfully, but these errors were encountered: