[mf]Copter/General[/mf]
APM:Copter, Plane and Rover communicate via MAVLink protocol, which is mentioned in the general description of the APM and various manual pages.
If you google for MAVLink, you find this: qgroundcontrol.org/mavlink/start
If you have specific question about the implementation, please post them either to this MAVLink subforum (one topic per question, please) or if you want to develop something like a ground control station, you might want to join the developer mailing list.
[quote=“StefanG”][mf]Copter/General[/mf]
APM:Copter, Plane and Rover communicate via MAVLink protocol, which is mentioned in the general description of the APM and various manual pages.
If you google for MAVLink, you find this: qgroundcontrol.org/mavlink/start
If you have specific question about the implementation, please post them either to this MAVLink subforum (one topic per question, please) or if you want to develop something like a ground control station, you might want to join the developer mailing list.[/quote]
I have begun to read and try to learn more about this same subject … I think.
I’m trying to learn and understand if the APM can be controlled in real time using the MAVLink protocol? I’ve read the protocol docs, and am still not quite clear if it is only a “program and let it go fly” model, or if there is a way that I can actually write my software to send MAVLink commands in real time to the APM?
Here is my simple use case (and maybe this is already a standard feature?):
I want to be able to have a GPS on me (I am carrying it)
I want to have my drone take off, and control it to a fixed altitude
I then want my software to read my GPS position, and command the drone to fly to a GPS position relative to me.
As I then begin to move/walk/ride I want the drone to constantly stay that relative distance and altitude from me.
So this is a form of “follow me” … but I want to make the controller that I can mount on my bike, with some very specific controls (joysticks) on the handle bars. These controls would allow me to control several key aspects of the relative flight.
Again … being new to this … maybe all of this is already possible and done?
If not, then I’m wanting to understand if I’m researching the right direction in thinking that I could stream a set of “goto GPS position” commands to the drone at a high rate.
Doing a little more research last night, and this morning, I’m slowly gaining more insight into the various systems, and figured that I would post some progress updates here:
I found several references to “Follow Me!” flight mode. It really does appear that this is what I am looking for … although I will have to modify the controlling code extensively.
I now know that Follow Me! is using “Follow Me mode uses the APM:Copter dynamic waypoint feature and MAVLink telemetry commands.” and so I now need to explore the ground station software to see where and how the exact sequences of commands are being sent in this mode.
My goal is to allow the user on the ground to easily shift the “dynamic waypoint” to be some relative offset from the user on the ground, and allow the user to change this in real time. This also means that I have to take into account the direction/bearing that the user is moving, to keep the UAV at the proper relative position.
In addition to the UAV position, I want to allow for setting the direction/bearing that the UAV is pointing to allow for dynamic camera/image control.
Lastly, I’ll explore adding support for locking certain aspects of the dynamic waypoint offsets. This would allow, for example, a way to have the UAV always north of me a certain offset no matter what direction I am traveling. Likewise, allowing the UAV direction/bearing to be fixed, or always pointed as some GPS location would allow it to be flown and follow while always keeping some target in view.