Distance measurement, with Rasberry and laser

Hey Guys,

Me and a couple of folks are builing a drone that keeps it’s distance from a wall.
for this we used two lasers with who we can acruatly measure the distance from the wall.
The calculation is done by a Raspberry connected to the Pixhawk over Telemetry 2.

My problem is how to implement the distance and YAW information into the pixhawk.

Has anybody an Idea how to implement data from the raspberry/telemetry ?
and add a new sensor? Or take the sonar_code and turn the coordinates?
That’ll be nice.

Assuming you haven’t read these links already you should find them helpful

python.dronekit.io/guide/copter/ … ty-control


I am currently working on implementing a collision avoidance system using a raspberry pi and pixhawk, the problem I have is now that I have this initial setup, and successfully can communicate using GPIO and telemetry ports, how to actually pipe the velocity commands to the Pixhawk automatically with the distance detection warning code we already have written in python on the Pi. If you have any info on this please let me know but I am going to keep searching.