Navigation using LIDAR and Raspberry Pi

I am attempting to use a LIDAR module along with a Raspberry Pi to create a self-navigating rover because GPS waypoints are not accurate enough for my project. My rover uses a pixhawk which is connected to the Raspberry Pi via the Telem 2 port. This project will, for the most part, involve driving 50-100m in (mostly) straight lines, so I don’t need any dramatic steering control. So far, I am able to use MAVLink commands from the Pi to talk to the rover, but I can’t figure out how I can write a module/script that will perform the navigation. Using python, I’ve written a basic program on the Pi that takes the real-time LIDAR readings and calculates the angle that the rover should drive in order to avoid obstacles. I want to incorporate this into an algorithm that allows autonomous navigation.

I am interested in learning more about possible methods that I could use to get the self-navigation to work.

So far, I’ve looked into creating a new flight mode using an obstacle-avoidance approach, using the LIDAR algorithm to command the rover to turn when necessary, and writing a script that will make the rover go forwards as long as an obstacle is not detected. If anyone has any tips or recommendations for how I should go about implementing this feature, I would really appreciate it. Thanks!

Would the python scripting interface help? … n-planner/

Thanks, Grant.