Hi again guys, You may know me from my previous thread http://diydrones.com/forum/topics/hoperf-trp-project-targeting-marcin-krawczyk
This time I'm doing something "Non-Malicious"
I'd like to send commands via Arduino to the USART telemetry port on the APM.
1. I want to be able to have a GPS on me (I am carrying it)
2. I want to have my drone take off, and control it to a fixed altitude
3. I then want my software to read my GPS position, and command the drone to fly to a GPS position relative to me.
4. As I then begin to move 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.
Thoughts?
Replies
you should look at http://python.dronekit.io as the docs are useful, but in simplicity start with http://mavlink.org
Hi Bill, I have extensivley looked through the mavlink doc's and it just gives me a headache :(
Just a quick question though, Can i use PuTTy (Serial//UART) to directly send mavlink commands?
If not, then why? and if it's because it runs in some other language like binary then why cant i send those binary bits?
Confusing??? It is for me :D
~Jack
It's an efficient binary machine to machine protocol. ;)
see http://qgroundcontrol.org/dev/mavlink_arduino_integration_tutorial
this is the binary bits http://qgroundcontrol.org/mavlink/start#packet_anatomy
the messages https://pixhawk.ethz.ch/mavlink/#HEARTBEAT
the code https://github.com/mavlink/mavlink
if you want just the headers to get started just pull it from ardupilot https://github.com/diydrones/ardupilot/tree/master/libraries/GCS_MA...
Okay, Thank's so i can't just have a function, Say Serial.Write("MAVLINK COMMAND";); And have it run on a button press?
you can as long as the bit in quotes represents the a binary mavlink message that starts with 0xFE, correct format and ends with the correct CRC. The headers for MAVLink make that easy to create
Okay Thanks!!
I think thier is a mavlink custom code generator in python somewhere or is their a global sheet of already pre-made Mavlink Commands?
See "Previous Comment"
Come on, don't make me come over there! :-p
Okay Lol...
I looked through ALL of those links, I certainly can achieve what i want to (Hopefully) With them however i'm looking for an easy route i suppose that's why i ask if their is any pre made binary commands? I had a look at the headers page too however it is confusing how one would go about writing a binary command.
Thanks ~Jack