-
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
Driver for VL53L1x #16055
Driver for VL53L1x #16055
Conversation
Given the relatively huge number of registers and the poorly documented nature of this device did you consider leaving the ST ultra lite driver mostly intact and writing a simple wrapper to make it use PX4 I2C within a typical module? |
I decided this will be not comfortably and excessively for code. The most functions repeat standard functional any I2C device (read, write). All settings registry stored in VL51L1X_DEFAULT_CONFIGURATION and they don't have need to change them. I actually followed the guide UM2510:
|
It's not too much code, and I'm not worried about the I2C functions. What I don't particularly like is all the registers and bits that as far as I can tell are undocumented. Anyway, my gripe is with ST and this device, thanks for your effort. Can you comment on testing and share a test log if you have one (https://logs.px4.io/)? I'm happy to merge this if it's otherwise working. |
EKF2_HGT_MODE - set to use range sensor. And I look at the plot 'distance sensor'. May be have errors in setup, or need check some thing, tell me. |
It appears to be working, although clearly not as well as other common range finders. Perhaps not bad for a $4 sensor... For your setup I would suggest using range aid (EKF2_RNG_AID) rather than EKF2_HGT_MODE and then make sure you tune the noise and gate appropriately for this sensor. Thanks @shizacat |
@shizacat FYI your git commit is missing your email address. |
Note, for regular users to actually make use of this we'll need to add a parameter to actually start it (eg SENS_EN_VL53L1X). |
Driver for distance sensor: vl53l1x
The second attempt
Single commit from #15565