Are somebody had succeeded to upload DroneKit commands from a python script (on the GCS computer) via mavlink to the drone?


#1

Hi here, i was searching for a way to use my GCS like so: execute a python program with some cool futures and send the commands via a mavlink to the drone to execute them.

For example : i wrote a prog to control the drone with keyboard keys; to connect to the drone and connect my script i use these commands :

screen -dm mavproxy.py --master /dev/ttyUSB0 --out=127.0.0.1:14550 --out=127.0.0.1:5762
(ttyUSB0 is the telemetry module on GCS)
/usr/bin/python pythonscript.py --connect 127.0.0.1:5762

On SITL everything works like i want but on the steel it’s another story
IRL the connection works, drone initialisation and some prints works = the drone broadcast with my terminal on GCS.
But the program stuck on the arm_and_takeoff() ; he can not arm lol
So like a see everybody launch their scripts from a SSH session or on booth, I wonder if it is even possible
thanks for reading guys xD


#2

you mean like this?

https://ardupilot.org/planner/docs/using-python-scripts-in-mission-planner.html


#3

yo Jax,
It seems like to work on an other library than dronekit (sry i forgot to mention it), i wanna find a way to use scripts thrue a connection port which i open with mavproxy.py --master /dev/ttyUSB0 --out…
It will be so much convenient
but didn’t find any good result on the net

my work is very similar to his :


BUT it only work on sitl X(

#4

I will wait to see… you clearly have some good knowledge and maybe something will turn up. you could pose question to mavproxy discussion forum.


closed #5