Skip to content
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

AP_RangeFinder: Add minimum distance to the effective distance determination for VL53L1X #22833

Conversation

muramura
Copy link
Contributor

@muramura muramura commented Feb 5, 2023

#22769 Related.

Make it so that distances less than the manufacturer's warranty distance do not accumulate.
The manufacturer sets the minimum distance at 4 cm.
In this process, the value is not 1cm.

Datasheet:
https://www.pololu.com/file/0J1506/VL53L1X.pdf

Copy link
Contributor

@khancyr khancyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minimum ranging distance The minimum ranging distance is 4 cm. Under this minimum distance, the sensor will detect a target, but the measurement will not be accurate. PAGE 16
Indeed.
I don't think that is a big deal as 4cm is already in the "I will crash zone" for a drone, but nice to have.

@rmackay9
Copy link
Contributor

rmackay9 commented Feb 6, 2023

One issue with this though is that if the range finder is at a very short range for a few seconds its state will become "NoData" and will show as unhealthy on the HUD. The current behaviour in latest is that it will become OutOfRangeLow.

A solution to the above problem would be to add new counters for out-of-range-high and out-of-range-low and use those back in the update() to determine what status to set.

Are we sure that this is the cause of the offset?

@muramura
Copy link
Contributor Author

muramura commented Feb 8, 2023

Will the failure be resolved 100% just by entering this judgment? "I think it will be partially resolved." Devices have an effective range. It is NO GOOD to use values ​​not guaranteed by the manufacturer.

@khancyr
Copy link
Contributor

khancyr commented Feb 17, 2023

The question is what does the rangefinder return under 4cm ? if that is something random in 0 - 4cm our driver is fine and we can trust the OutOfRangeLow.
If the data is random, as we can have in sonar shadow, then the range won't be in 0 - 4cm and our driver have an issue as we will bring wrong data in since we are using an average sampling (of 4values).
@muramura can you confirm what the sensor is reading under 4cm ?

@khancyr
Copy link
Contributor

khancyr commented Feb 17, 2023

ok I have check on some forum, value under 4cm are wrong but caped. So we are fine. (https://forum.bitcraze.io/viewtopic.php?t=4241)

@rmackay9 any objection to close this as this don't bring improvements nor solve the issue tagged ?

@khancyr khancyr added ClosePending and removed BUG labels Feb 17, 2023
@rmackay9
Copy link
Contributor

@khancyr, thanks for looking into this. I'm happy closing this.

@peterbarker
Copy link
Contributor

Closing per tag and Randy's approval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants