Servers by jDrones

Understanding Architecture with Companion Computer and Dronekit-Python

Let’s consider the following scenario:

A UAV has a companion computer (CC) connected via UART. By running on the CC, is it possible to set the --out parameter to define the IP_ADDRESS/PORT to whom telemetry is redirected. A GCS having that IP_ADDRESS can connect to the CC by initializing the vehicle object using DroneKit. Via the instance vehicle, it is possible to access lots of properties and methods, for example, to check the current battery level or navigate to a certain position.

Let’s suppose the code running on the GCS has to perform some actions based on external triggers. For example, the CC has a camera onboard. When a certain object is recognized, the UAV needs to stop any movement to take a photo or eventually return-to-home

In my understanding, any action performed using a dronekit-python script is running locally on the GCS. If the link is lost, no reaction is possible because the GCS doesn’t know what happened.

This is not ideal because the benefits of having a CC are lost. I assume I’m doing something wrong or I simply forgot to consider some basics.

The goal would be to have a script to perform some actions, which is located on the UAV. Via GCS only high level instructions should be sent, for example start running or stop it.

What is the preferred architecture to accomplish that?

Thanks! Emanuel

1 Like

Usually the dronekit scripts on the CC do all the work. The GCS is only for monitoring. I have no clue why you are running the scripts on the GCS

That’s why I’m asking :grimacing: :grimacing: basically, how would you start a script on the CC? If I run dronekit on the GCS, I can take-off/land or upload a mission that will be executed by the UAV, by executing it on the GCS after the object vehicle is created. But let’s assume the script is on the CC … how do you run it or stop it? Is it correct to SSH into the CC in order to run it or what?

One example: we run a mongoose webserver linked to dronekit or mavros.
The result is that we connect to that webserver and controll the drone with a browser. It is not simple, but it is also not rocket science. and it works.

Servers by jDrones