Would I run mavproxy command in my python code?

before I used dronekit to control drone where the dronekit installed in rasberry pi, but them said that dronekit was not supported by community, so I want to find a better open software instead of dronekit, my friend told me mavproxy is a good solution, as I know, mavproxy is a gcs, is depend on command line run in console, how can I use mavproxy in my python code to control drone? does the mavproxy have API function for invokeing

MAVProxy uses plugin modules for much of it’s functionality. There’s not a documented API as such, but it’s worth looking at the development guide at http://ardupilot.github.io/MAVProxy/html/development/index.html and the source code on Github.

Just use dronekit. It works fine and is supported.

thanks, I used to post some questiones in dronekit forum, and no guys reply it, some friended told me that dronekit was out of date, no more supported it. so I am confused.

thanks a lot, Stephen, you mean I can’t use mavproxy in myself python code?

You would need to put your code into MAVProxy, in the form of a module.

Somewhat related… I am also working on some ideas for MAVProxy

How does this work? How does MAVProxy handle the extra code from the module? I am a bit of a newbie here, but have some programming experience. Do we just put our code in the module? Or do we have to add specific code to it so the main script know how to handle the module?
Sorry for all the questions


MAVProxy will pick up any modules in the “modules” folder. The module’s filename must start with “mavproxy_” too.

There’s a basic template of a MAVProxy module at http://ardupilot.github.io/MAVProxy/html/development/mavcustmod.html. Just put your code in there. The key is that MAVProxy will call the def mavlink_packet(self, m): of your module function any time it receives a packet .

Got it!! So basically every time a Mavlink packet comes in it will run the code in all the modules specified?

Yep, every loaded module gets every mavlink packet.

I want to control my Rasberry pi attached to orange cube telemetry2 connection with my radio herelink telemetry on telemetry1. Is it possible to ssh into the pi over the herelink telemetry so that I can run drone kit commands . I cannot find any resources on how to communicate to the pi over telemetry. I have seen tutorials to connect over WiFi and 4g but I think radio telemetry has more reliable range. It would be great if you can guide me in the right direction.

Raj Patel

That is not possible. You need to use WLAN for OpenSSH connection.