Simple Wall Avoidance using Lidar

Hi All, I’m a college student undertaking a project and would like some advice.

As stated above, I’m trying to get a drone with a PX4 and two Teraranger LiDARs to perform very simple wall avoidance. i.e. the drone even with no user input would self correct away from walls. With one mounted vertically for ground clearance checking and one mounted to do 360 horizontal sweeps. As this is for indoor use GPS is not a thing.

I’ve surmised that there are several different hardware configurations to approach this problem:

  1. Use only the Pixhawk and directly modify the flight control code, Position/Attitude Controller, etc. to respond to the LiDARs also hooked up to the Pixhawk
  2. Use a companion computer(RasPi 2 in my case) and interface with PX4 using macros and write a ROS package to do this
  3. Similar to 2 but instead use DroneKit to interface with PX4 instead

Could anyone opine on which option you feel would be most appropriate for the tasks I’m trying to accomplish? Any feedback would be most welcome :slight_smile:

Option #2 gave us the best results. However, we used an Odroid XU4 as a companion computer instead of the Raspberry Pi.