Copter-GCS now supports MAVLink

3689415633?profile=original

At long last, I finally beat MAVLink into Java submission. I wasn't able to find any MAVLink bindings for Java (needed by android), so I ended up using JNI and wrote a MAVLink wrapper. It works nicely and makes using MAVLink very easy. Its available for download here. I've included both the "common" and the "pixhawk" messages.

 

As you see above, I've added a HUD mode.

 

I've uploaded the new copy of the GCS for easy download or through the Android Market (search copter-gcs). Of course the source is available through SVN


I am focused on Copters, as that is what I fly, but with MAVLink support, the copter-gcs is now also useful for ArduPilotMega. I loaded the APM code on my quad (minus the props :-) ), and was able to see / tune track just fine with it. The only thing missing is that the PID tuning widgets I have are currently only setup for the copter. The next version I expect will have the APM pids added in. For now you can just use the Parameters view to set anything you like:

 

3689415780?profile=originalWhen you make a change, just hit the button next to is to save it.

That's about the news for now. I will be working on Mission Planning and some clean-up next.

 

If anyone has any problems, let me know. Same thing if there is a feature missing (no promises though).

So far USB host mode for tablets (connect XBee directly) and Wifi links have been requested, although i'm not sure when/if they will make it in.

E-mail me when people leave their comments –

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

Join diydrones

Comments

  • Hi,

    I am new in this branch, so sorry for my mistakes

    I try to use your app but it crashes when it try send data to copter

    code looks good, mavlink is ok (I think so), android device is Nexus S ...

    what confuse me, that AqGcs app works properly with my copter

    What you think? issue connected with MavLink or did I do something wrong?

    Best Regards,

    NN

  • Hi Bart,
    First of all congratulations for your very good job.

    Last days i have been testing Android x86 (Ice Cream Sanwitch) in my Acer Aspire One D150, it seems to work very well, the work haven't finished yet beacuse the spansh keyboard isn't completly funcional but is not a problem because the screen keyboard has not problem.

    After that preamble I would explain my idea.
    I would like to use your aplication in the NetBook with ICS as GCS conecting to APM2 througt 3DR Radio connected by the USB port in the NetBook.

    The version of your aplication that i have tested complain about the USB connection when I try to configure.

    Reading the post I see that the USB suport is desabled.
    Do you have a prevision for a working USB support?
    Do you think is possible to use my proposed scenary?

    Best regards,
        Miguel.

  • @Jani,

    The correct protocol is MAVLink using version 9 on arducopter 2.6.

    Someone has tested the app for me using MAVLink 1.0, but I cannot do so myself yet, as I am still flying a 1280 board. Work is crazy for the past and next few months, so although at some point I will test it all (and have time to fly again), it might be a while.

    Sorry,

    Bart

  • Hi Dries,

    Yes, I know this problem. But I didn't found a solution.

    I think something goes wrong in decode function.

    But for this is no source avalible, so I moved to qt + qgroundcontrol.

    Peter

  • To be honest, I have only ever used the library on android, building it using "ndk-build" in the android NDK. I haven't touched it in awhile though. I've not had this build error come up before.

    Bart.

  • Hi Bart,

    It seems that I have some problems with Thread-Safe function.

    Are you interested on my code? Then I will send it to you, Maybe you have a idear.

    Thanks Peter

  • Bart, for the moment, I let the thread running and close the comport, and let the Thread sleep a liitle bit.

    I think this should working.

    Now I would compile the JMavLink for Linux, for Windwos it is working.

    Do you have a syntax for compiling the library with g++/gcc ?

    Thanks

    Peter

  • Hi peter. The cpp is autogenerated using a script I wrote. If the messages are OK it is likely an Error with unloading and reloading the jni lib. Ive only eber tested on the phone thoiugh and witbout the receive thread stopping. If I recall right, receivedbyte is the only incoming function I created.

    I'm away for holidays ATM so I don't have the code in front of me. If you want to send the Java. File I can see if something pops out at me. An error trace would be usefully too.

    Bart.
  • Bart,

    If I start the thread the first time, the decoding is working fine (tested 10min).

    For decoding I use only MAVLink.receivedByte, no other function in this thread.

    If the Thread started again, after some telegrams, I get a error.

    If I use a other function instead receivedByte, I can start & stop the Thread always. There is no problem.

    Could it be, if I close my rs232 & stop the thread, then we have a "unfinished" telegram. And if I restart, maybe a Buffer overflow or anything ?

    Can you descript how i generate the jmavlink.cpp and the header files.

    Thanks

    Peter

  • Hi, Bart.

    The thread is dying, because it's a test function for communication.

    My idea was to create a Thread instate a service. If I need a communication with rs232 (or any other modul)

    then i would start the Thread, and decode with MAVLink library.

    If you are interested, i can send you my project (Eclipse) and you can have a look ? :-)

    I'm a newbee on Java, ok some experience on other dev's.

    Thanks

This reply was deleted.