Hello,
I am at the moment just trying to learn mavlink specifically on my 3dr Solo. I am trying to communicate with the Solo on my laptop, my laptop is acting as the controller "WiFi AP". I have a custom program which sends commands to it or at least tries to and I am not sure if my commands are working.
Now my thought process is if I have a parser that works and is able to see responses from commands I send or if I can understand the traffic that is being sent to my laptop I will not be so blind. My specific question is, somewhere out there is there a simple, light and custom program that can parse mavlink messages?
I know this question has sort of been asked before but the code I have seen so far is not light weight, is outdated or simply does not work. Or any advice or comments on how I can achieve my goal as efficiently as possible would be much appreciated as I have been struggling with this for quit some time.
R
Joe
Replies
I guess you have seen this ? http://qgroundcontrol.org/dev/mavlink_onboard_integration_tutorial
also, be sure to take a look at mavproxy code.
My experience learning mavlink and drone stuff in general is everything is kind of all over the place. I was hoping there would be a one stop shop for learning this stuff quickly. I will take a look at mavproxy. Thanks for the input Andre and Francisco.
You need to feed it with the message set from Solo which you can found here: https://github.com/3drobotics/ardupilot-solo/blob/master/libraries/...
The message set you sent me seems a little odd. For one thing, the solo I am using does not even have a go pro. Wouldn't I be better off using this link https://github.com/mavlink/mavlink/blob/master/message_definitions/...?
The message set is like a language, both have to not only recognize the same "words" but have the same meaning to them. It doesn't matter if you do something with the "words", but when you exchange words they better mean the same thing. The Solo language is in the link I sent you. You can try to use other message sets but they aren't guaranteed to work. The one you are linking is, like the name says, a common set to MAVLink. If you want to do a project that interfaces with general MAVLink devices that's good, but you will be missing some messages from Ardupilot devices.
Hey Francisco,
I am trying to fallow your advice. My short-term goal is to just decode mavlink messages from my controller or Drone across a UDP link using your idea and print them to standard output.
What I have done so far is I ran the python pymavlink.tools.mavgen code generator using the 3dr message set you advised and now I have a very large python file which includes the enums, message ids, etc. Unfortunately the file is almost 14,000 lines long and a little hard to fallow. I found an example encode/decode message script https://www.samba.org/tridge/UAV/pymavlink/unpacked/examples/mavtes... here. It does not just work for me yet but my question is if all I want to do is get,decode, and print mavlink messages to my laptop terminal am I going in the right direction or am I missing something? I would hate to spend a lot more time working on this just to find out I am totally off.
If all I have to do is continue to debug and modify that example script using my newly generated python code to get this to work then I will continue to do that. I also am curious if you have any other comments or suggestions on how I can make this work.
Thanks again for your help,
Joe
That specific example may be outdated, I'm not sure. You do have more examples in the repo: https://github.com/mavlink/mavlink/tree/master/pymavlink/examples
You are going in the right way, but if you don't want to mess with this low-level stuff maybe you should look at Dronekit (dronekit.io) which is at a higher level and also has a python interface. There's even a binding specific for Solo (https://github.com/dronekit/dronekit-python-solo) that builds on top of the general Dronekit - which means you need both.
And did you had a look at dev.3dr.com?