I’m new here and I’m planning to start a new project with Ardupilot (Copter). For this project I’m planning to use an APM 2.6 (the Arduino mega based in). I would need to plan a mission (waypoints) through Mavlink protocol (I’ve read a lot about that but I’m slightly confused about how it really works). My idea is to put and Arduino or a Raspberry Pi on board in order to communicate through serial port to the APM 2.6 and send the Mavlink commands in order to plan missions.
MAVLink (https://github.com/mavlink/mavlink) has a number of interfaces to popular programming languages (C, C#, Python, Java, Javascript). So it’d be easiest to start with that interface and build your code on top of that.
I’ve been playing a little with the Mavlink protocol and Python, but I’m not able to use it properly. The steps I’ve done are the following.
I’ve downloaded the code available on the link stephendade gave me (https://github.com/mavlink/mavlink).
-I’ve run the mavgenerate.py and I’ve generated a Python code. As far as I know, the Pyhton library to create the Mavlink commands to later send through serial port to the APM.
Now I find the code enormous and I don’t really know how to use it in order to (for example) add a new waypoint.
If there’s something wrong in what I’ve said please feel free to correct me.
I was planning to use Python as a first introduction to the MAVLink protocol for its simplicity. Later I would like to use C because I want to put onboard some kind of Atmega board (firstly Arduino, later my own). But I’m gonna take a look to dronekit.
Can anybody help me using the MAVLink library above? In Python or in C doesn’t matter.
Reading the documentation of dronekit I’ve just realised that maybe I’ve misunderstood the whole scenario. The scenario I have in mind is to have onboard an APM 2.8 and a Raspberry or Arduino (depends on if I’m able to master the MAVLink protocol in C or in Python [PLEASE I NEED HELP HERE]), but I don’t want to send the MAVLink commands from a computer on the ground. This second board (Arduino or Raspberry) has to be the one which decides which is the next waypoint and send the MAVlink command to the APM 2.8.