Help Trying To Build Custom Mavlink Parser on Laptop

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

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

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.  

  • I'm not sure what programming language you are using but the MAVLink project itself has a generator for C/C++ and Python: http://qgroundcontrol.org/mavlink/generator

    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/...?

      mavlink/mavlink
      Marshalling / communication library for drones. Contribute to mavlink/mavlink development by creating an account on GitHub.
      • 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

          https://www.samba.org/tridge/UAV/pymavlink/unpacked/examples/mavtest.py
This reply was deleted.

Activity

DIY Robocars via Twitter
May 15
DIY Robocars via Twitter
May 14
DIY Robocars via Twitter
May 13
DIY Robocars via Twitter
RT @f1tenth: Say hi to our newest #F1TENTH creation for @ieee_ras_icra next week in Philly. It’s going to be huge! 😎 🔥 @AutowareFdn @PennEn…
May 13
DIY Robocars via Twitter
May 11
DIY Robocars via Twitter
May 8
DIY Robocars via Twitter
RT @SmallpixelCar: Noticed my car zigzagged in last run. It turned out to be the grass stuck in the wheel and made the odometry less accura…
May 8
DIY Robocars via Twitter
RT @SmallpixelCar: Test my car. RTK GPS worked great. Thanks @emlid for their support. https://t.co/EkQ6qmjmWR
May 8
DIY Drones via Twitter
RT @chr1sa: @kane That's @diydrones circa 2009. Still have a box of those Canon cameras that we used to strap into planes, just like this.…
May 3
DIY Robocars via Twitter
RT @chr1sa: Our next @diyrobocars race is going to be outside at a real RC racetrack in Fremont on May 28. Fully autonomous racing, head-to…
Apr 30
DIY Robocars via Twitter
RT @f1tenth: Our Spring 2022 F1TENTH course @PennEngineers is coming to an end with a head-to-head race as a big finale. So proud of our st…
Apr 26
DIY Robocars via Twitter
RT @DanielChiaJH: I wrote a thing! Throughout the development of my @diyrobocars car I've been using @foxglovedev Studio to visualize and d…
Apr 23
DIY Robocars via Twitter
RT @SmallpixelCar: My new car for high speed. Low body, everything ( @NVIDIAEmbedded Jetson Xavier NX, @emlid RTK GPS, IMC) under the deck…
Apr 23
DIY Robocars via Twitter
Apr 21
DIY Robocars via Twitter
RT @f1tenth: F1TENTH Race training setup @PennEngineers for our upcoming ICRA2022 @ieee_ras_icra competition. @OpenRoboticsOrg @IndyAChalle…
Apr 21
DIY Robocars via Twitter
RT @fatcatFABLAB: Proud to be hosting a restarted DIY Robocars NYC Meetup April 26. Come by if you want to talk about and race self-driving…
Apr 17
More…