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ā¦
Hi,
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.
Interestingly I tested a LidarLitev3HP yesterday with the regular driver and found that itās update rate was very slow. Iāll try again with this PR from @nghiajenius
Thanks for the report. So it is most likely an issue with the driver. There have been some changes made in the sensor so we need to test and then merge the PR from @nghiajenius.
Iāve got a couple of events happening next week so I donāt think this fix will get into 3.6.0 but hopefully we can get it into a āpoint releaseā ā¦ i.e. Copter-3.6.1ā¦
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!
Thanks for the driver update! Unfortunately Iām already using all my pwm outputs, so I need to get it working on I2C. Iāll try to bench test it on Plane today and let you know how it goes.
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!