As an attempt to use the new Lidar Lite v3HP from Garmin for my indoor localization project with PocketPilot, I have modified the existing lidar driver to make it compatible with this new rangefinder. Besides new features, this model has changed the sensor reading method:
The continuous mode in V3 is removed, it goes back to two-step taking-reading approach
New configuration registers for faster measurements
@nghiajenius Thats really great that you added the new functionality. Are you planning on a Pull Request on ArduPilot ?
According to Garmin you can get up to 1.5kHz scan rate with this mode… I am thinking of a scanning Lidar here…hum… 1 deg accuracy at 4 RPM…
Thanks for your comment. Yes, I want to make a Pull request on ArduPilot for this driver.
At 1.5kHz, it can be used for scanning, but it requires continuously polling the busy flag and very small acquisition count settings, which affects accuracy. So, I think that this application needs a different micro-controller to handle and feed the result to Ardupilot.
Yes I agree, actually I was diverging a little, but that could be an interesting use case for the Pocket because of the PRU and the QEP can act as an accurate motor control with encoder feedback … so many projects, so little time
Oh sure, it can be a useful application for the Pocketbeagle, I’ll try to evaluate the update rate limit of this sensor first because I quite doubt about its accuracy at 1.5kHz. Actually I really appreciate your effort on the PocketPilot project, and I want to add my small contribution to it too. Thank you.
As far as I know, the current library only supports LidarLite V3, not V3HP. The V3HP requires us to send a measure command periodically to obtain new values, and it doesn’t have continuous mode as V3.
Therefore, if you want to use LidarLite V3HP, you can either use PWM connection or modify the source code as my PR here (it hasn’t been merged yet): https://github.com/ArduPilot/ardupilot/pull/9169. The library is shared between platforms, so I think you can use it on plane as well.
Thanks Randy so much for helping me test this driver, although I have carefully tested it myself and it could reach 50Hz update rate, more evaluation is very helpful for a stable driver. Hope to see my PR merged soon!
I’ve bench tested the updated lidar drivers, and it works very well!
I fly a electric plane, with flaps etc (hence so many pwn outputs), gps, airspeed sensor, and lidar to help with landing. I used to use a TFMini, but its range was so limited that it hardly helped at all. I’m hoping the LidarLite will help me get a more accurate flare and softer landing.
I’m very happy to know that the driver works well on plane too. Thanks for daring to test my code! I have tested it in my quadcopter but I have no experience in plane. Did you use the Cube as your flight controller?
Thanks for the heads up, I have set the parameters to ignore the Lidar below 0.5m since it’s committed to the landing by that stage anyway.
So we flew the new Lidar last week, it worked a treat! The lidar activated nice and early in the glide slope, which means the flare was accurate to ensure a gentle landing. Much much better than with the TFMini.
@rmackay9 What needs to happen before this PR can be merged into the master firmware?
I’m so happy to know that you had a successful flight! I have followed up with reviewers and fulfilled all change requests to match Ardupilot standard, so I also hope that it will be eventually merged soon!