Hello. I needed some help in communicating the Pixhawk with the raspberry pi. I have successfully set up the wireless connection using this link (https://ardupilot.org/dev/docs/making-a-mavlink-wifi-bridge-using-the-raspberry-pi.html). This was done so that I can remove the pi from my drone (and make it lighter). The drone also has an RPLidar A1 which was connected to the pi initially but now my only option is for it to be connected to the pixhawk.
I am planning to control the drone using a python file (localizing will be done after reading the lidar data). I can connect the lidar to the pixhawk using the following connection diagram in this link (https://ardupilot.org/copter/docs/common-rplidar-a2.html). My question is, how do I send the data read (of the lidar) from the pixhawk in my python file (I am using dronekit to control it).
Thank you very much