Raspberry and Pixhawk

In the setup where you control a drone using raspberry pi and dronekit and scripts, I have a couple of questions:
1- In flight, with telemetry connected to pixhawk and raspberry connected to the telemetry 2, can I send scripts from the ground?

2- In the same setup from last question, can I do image processing with raspberry or does it have to be connected to serial 4/5?

3-If these precious scenarios aren’t possible, making a mavlink wifi bridge with raspberry and having another raspberry in the drone for image processing is a solution?

No. You’ll need a separate connection to the Raspberry Pi, like ssh or remote desktop.

Yes, you can. No need for an additional connection to serial 4/5. If you’re running multple scripts or programs that need to interact with the MAVLink telemetry stream, you’ll likely need a telemetry router like mavlink-router, MAVProxy or Rpanion-server to split the telemetry stream.

@stephendade

  1. Okay, now I know that mission planner can run python scripts, but can I use dronekit with mission planner? I read that you can add libraries to mission planner(https://ardupilot.org/planner/docs/using-python-scripts-in-mission-planner.html), does that include dronekit?

  2. If I want, I place the raspberry with the drone connected with pixhawk, with a scripted uploaded so that when the system starts, the script starts running. What kind of condition do I have to write so that the system allows input from a rc transmitter, and after the pilot finishes their input, it remembers their last position before the input and resumes mission?

  3. I am also a little confused about all the ways you can control the autopilot using a companion computer and how to connect them with a ground station with mission planner. you can :

    3.1 You can just use the companion computer for operation that require extra processing power, like computer vision.
    3.2 Before the flight, you can upload the script in the companion computer and when you start the drone, starts running the script.
    3.3 If you dont require extra processing power, you can just send script from mission planner for example, or use other software, like mavproxy.
    3.4 You can make a MAVLink WiFi bridge using the Raspberry Pi, one of the uses for video transmission, but I don’t quite understand how it does work, other than that telemetry can’t handle the data from video transmission, and I don’t know other uses of this particular setup.

Mission Planner and Dronekit are separate software. You won’t be able to run Dronekit within Mission Planner.

Mission Planner doesn’t send the script to the vehicle. The script is run from within Mission Planner on the ground station.

The Rasberry Pi is just a Wifi Access Point. You connect your computer/laptop to it and you’ll be able to receive the telemetry and video streams (you’ll need specific software for this - like APSync or Rpanion-server).