Using LIDAR to avoid obstacles
Would you like to go for a walk on a golf course blindfolded? No? Me neither, and it's probably not good to just set a rover to run around blind either. But vision and object recognition takes a lot more computing power than we're budgeted for on this machine. So, what's the next best thing to vision? SONAR or LIDAR. Unfortunately, SONAR (just like a bat finds insects using sound waves to calculate the distance to obstacles) is considered passé for Pixhawk, and thus the implementation is quite wonky. There are I2C sonar devices, but they don't work very well (if at all) with Pixhawk 2.1 and the latest Ardupilot firmware. So, we're going to use LIDAR instead. LIDAR rangefinders use light waves (instead of sound) to calculate the distance to objects.
LIDAR 101
LIDAR simply uses a light wave to send out, bounce off objects, and then looks for it to return. Since light travels at 299,792,458 m/s, all the LIDAR module has to do is measure the time it takes to return...