Beginning tests using Mavlink

Hello,

I was unsure of the correct forum to post this discussion and I figured unassigned fit the bill, please let me know if I should move this.

Recently I have been working on a school project to control the APM from a second arduino board.  I have begun looking at the mavlink library as I plan to read mavlink packets from the telemetry port, and place my own packets on the telemetry port as though a radio were receiving data from the ground station.  To begin I decided I would follow the tutorial posted here: http://qgroundcontrol.org/dev/mavlink_arduino_integration_tutorial on basic arduino/mavlink interaction.  Unfortunetely I was unable to get very far as the provided source for receiving packets doesn't seem to work for me.  Has anyone been able to get this example, or a similar basic example working? 

my problem seems to be including the mavlink library itself.  When I use #include <mavlink.h> or #include "../mavlink/include/mavlink.h" (which points to my libraries folder in my sketchbook) the file isn't found or included.  However I've noticed that if I add another include such as "#include <FastSerial.h>" then mavlink.h file is suddenly found but I receive other issues about overriden functions in the FastSerial library.

All that I really want to do is be able to read Mavlink packets from the telemetry port and get data from them such as current gps position and roll/pitch/yaw, so basically the data which would be available in the mission planner software if using telemetry radios.  If anyone has been able to do something similar and have any suggestions, or tips on getting this working then please let me know.

Thanks,

Ben

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

Join diydrones

Email me when people reply –

Replies

  • Same problem 2016 now, arduino can get nothing from apm telemetry port..anyone already know why please share here.
  • Please how did you solve this problem as i am having the exact same issue at the moment

    Thank you.

  • Hi,

    I wanted to create a Mavlink2Spektrum telemetry module where an Arduino captures the mavlink data and sends it via a TM1000 (Spektrum telemetry I²C).

    However I'm struggling to get the Mavlink decoding working on my Arduino UNO or Nano
    I started of from this source JD-IOBoard --> Mavlink

    The problem is that I can't seems not receiving anything from the APM (on telemetry port)

    When I hook up a 3DR radio all is fine and port is working.

    I'm running the demo program in debug option which should allow me to see some data.

    The only thing I see is that the Arduino is sending rate requests but nothing comes back.

    Any hint is welcome :-)

  • It sounds like I am having a similar problem to all of you.

    Has anyone successfully been able to read an MAVLINK message off of their device yet without picking up the heartbeat message? Was using some version of the ArduinoMAVlink library useful in the end?

    Any help would be greatly appreciated

    Best,

    Julia

    It sounds like I am having a similar problem to all of you.

  • Hi! Without reading every reply i would have a look at the minim osd extra code here: http://code.google.com/p/minimosd-extra/source/browse/#svn%2Ftrunk

    It makes extensive use of mavlink (of course) and the sourcecode is not so long. I think it should be a good starting point of an working example, wich is not too hard to understand/browse through.

    Cheers

    Kraut Rob

  • Changing the ID didn't seem to make a difference. However, I did add one line "delay(1000);" so that the heartbeat packet was only send every second and not at loop rate. This seemed to fix everything. I tested it on the pro mini as well as an Mega 2560. All looks well. :)

  • Hey guys. I have been trying to get a simple MAVLink test running on an Arduino Pro Mini. One would think this would be a little bit easier to do. I tried the arduino integration tutorial provided by qgroundcontrol.org and it seems to be very outdated. So I took that example and updated it with mavlink version 1.0.x and everything compiles now and QGroundControl will recognize the device. The problem is I can only stay connected for a few seconds at best. Not sure what the problem is. My project is on github at https://github.com/alaney/arduino-mavlink. If anyone can figure out what my problem is please let me know. I will keep working on it as well and post any updates.

  • I've found this https://groups.google.com/forum/?fromgroups=#!topic/qgroundcontrol/K_8FIQVGqaU which seems to be someone having the exact same issue.  He seemed to be able to solve it by updating his mavlink library to a new one provided here: https://github.com/pixhawk/mavlink/zipball/master however the link is dead.  Does anyone have any idea where I can find this updated library now? including the same mavlink library used by the APM code by gave me more errors than the one provided on the q ground control website.

    With my current fastserial library and mavlink include, I only get one error which is " conflicting return type specified for 'virtual void FastSerial::write(uint8_t)'" so I went into the fastserial library and changed the return type to size_t and was again hit with some errors from the example code.  Then I copied/pasted the code from that google groups discussion provided by the third post, and was able to compile and read data from the serial port, however the data I am seeing is garbage in the form of: "ULdÈ UMdÈ (UNdÈ UUOdÈ ~UPdÈ GeUQdÈ laURdÈ"  I am unsure of what is causing this new issue and would appreciate any help figuring it our.

    Google Groups
    Google Groups allows you to create and participate in online forums and email-based groups with a rich experience for community conversations.
  • Im working on a similar project and have also been finding it hard to implement mavlink with arduino (im currently using a nano with two softwareserial ports to address a GPS chip and XBEE antenna)

    I'm aiming to send nav waypoints to the APM to allow for gps following

    if anyone can help this would be extremely useful

    Regards, Matt

    • Hi, i'm working on a similar project, and i can't manage finding a working example to start with, any help with that !?

This reply was deleted.

Activity