The PulsedLight rangefinder or Lidar is a low-cost optical distance measurement solution with a 40m range under most operating conditions, low power consumption, and small form factor. This sensor can be purchased from these distributors and then technical info can be found here.

This rangefinder is only supported running APM:Copter or APM:Plane 3.3 or higher (as well as Rover 2.49 or higher).

Connecting Lidar to Erle-Brain

Use one of the I2C bus connection exposed in Erle-Brain (v1.x or v2) to attach the Lidar:



To be sure that the device is working properly, check that Lidar's I2C address appears in the bus. In order to do so, execute:

sudo i2cdetect -r 1

You should see the address 0x62printed out:



Setting parameters up in APM

Set the RNGFND_MAX_CM parameter to 4000 (40m). This parameter represents the maximum distance in centimeters that the LiDAR is reliable over — when ignoring “0” distance readings in the driver, a value of 4000 should work well in almost all conditions.

RNGFND_MIN_CM should be set to 20cm. Below that distance you will still get readings, but they may be inaccurate (the optics can start to introduce parallax error if the sensor picks up signal from specular reflections rather than directly from a return signal).



Testing the sensor

Distances read by the sensor can be seen in the APM Planner’s Flight Data screen’s Status tab.



or in Graph Screen:




More information at APM site