-
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
drivers: Accept entire distance sensor signal strength range #22365
base: main
Are you sure you want to change the base?
drivers: Accept entire distance sensor signal strength range #22365
Conversation
Very open for discussion on philosophy on how this value should be chosen. |
The parameters where introduced here: #12756 |
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there: https://discuss.px4.io/t/px4-community-q-a-november-22-2023/35324/1 |
Communitiy Q&A call: Let's open the full sensor quality range on the driver level but add a quality threshold downstream at the EKF to make sure it can be tuned for the particular sensor and use case. As a reference it should be similar to |
Do we want the default value to be accepting the entire range or still have the threshold at 70/255? |
For now it should still default to the current behaviour (ekf2 takes it unless 0/invalid), but someone with this newer lidarlite can start setting it if truly necessary.
|
Before this commit many valid measurements were discarded as the signal strength was lower than 70/255. Based on our experiments we have only seen outlier measurements when the signal strength is identically equal 0. Furthermore outliers are removed in the terrain estimator making it not that critical if some outliers are not picked up here.
The lower cap on sensor quality is moved from the driver to the EKF2. The default value is chosen to be the same as was previously in the driver, 70/255 ~= 27
8f655cf
to
059a52b
Compare
From flight test with the new parameter. |
I think the PR is ready for a new review |
Solved Problem
The reason for this commit is that we had a flight where the distance sensor was in practice disabled for large parts of the flight as the signal strength being read from the sensor was lower than 70/255 which is today's threshold. Looking at the sensor data itself we see that there were a lot of measurements with good quality that should not have been discarded.
See for example this section here where all data is discarded for more than 20 seconds even thought the sensor data is perfect

To explore where the limit should be, we set the minimal signal strength to 0 so that the signal strength is directly mapped to
distance_sensor/signal_quality
What we saw from our experiments were that we only had outlier measurements where the signal strength was 0. Any non zero values corresponded to a good measurement. See comments below for plots
Looking at the datasheet we have the following documentation: https://static.garmin.com/pumac/LIDAR-Lite_v3HP_Instructions_EN.pdf

So signal strength is already capped with a lower threshold calculated based on the noise floor. From this its not unreasonable that all non-zero measurements are likely good.
Furthermore, at least for the terrain estimator, its not a problem if outliers are not removed at this step, as there already is outlier detection there. Is this also the case if the distance sensor is used directly in the EKF?
Changelog Entry
For release notes:
Test coverage
Flying again in the same location where the problem was first observed yielded good result where the distance sensor was used and no bad measurements were accepted.
Context
Related links, screenshot before/after, video