Copter-GCS now supports MAVLink

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:

 

When 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.

Views: 3376

Comment by Bart on July 17, 2011 at 6:52pm

@Hai,

 

I've added a debug version to the downloads. If you download the SDK for andoid, there is a "ddms" app in the tools folder. If you use it, you will see debug messages (best to filter by the copter-gcs PID ). If you are using the usb port when debuging, simply run the app, let it crash (sigh), and then plug it into your computer. The logs will show up at that point. I've not actually run on a tablet, but Jeff has, so if there is any trouble, he can jump in with suggestions for that.

Comment by Bart on July 19, 2011 at 3:14pm

@Hai,

Any luck with the debug copy? I would like to get that bug fixed, and the log should let me do that fairly quickly.

Thanks,

Bart


Moderator
Comment by Hai Tran on July 19, 2011 at 8:17pm

I've downloaded your debug version and installed it on my Iconia A501, stil crashes.  I've only got Android SDK installed on my mac (I used it once and decided that iPhone SDK much better and I forgot to delete Android SDK).

 

Unfortunately the Iconia never shows up on my mac, the only way I can connect to it is via Windows in a VMWare session.  I don't have Android SDK on Windows.


Moderator
Comment by Hai Tran on July 19, 2011 at 8:17pm
For Sale: Acer Iconia A501
Comment by Bart on July 19, 2011 at 8:37pm

Glad you got the debug figured out. Unfortunately you'd have to capture the log when the app actually crashes, as this doesn't actually capture anything related to copter-gcs. If you are still interested in figureing this out, let me know. However, I noticed that you are putting your tablet up for sale...

 

I would still like to know why its crashing though, as its currently the only report. If someone has crash trouble, please let me know so it can be fixed.

Comment by Bart on July 20, 2011 at 6:43pm

There is an experimental copy of the code in SVN which attempts to access an XBee module attached through USB host mode on Android 3.0+ tablets.
It allows selection of the USB device, opens it, and is tied in to send/receive data just like a bluetooth connection. However, it doesn't actually work...

It appears USB host mode does not currently support USB->Serial converters, as the kernel module for it is not loaded.
Once a kernel module is made available (by default, and not through hacks) which supports FTDI chips, I will revisit this code and bring it into the main branch.

A big thanks goes to Jeff E (on the DIYDrones site) for repeatedly running the code for me on his tablet.
With the logs he collected I was able to write enough code such that when USB->Serial is supported by the Android OS, the app will quickly be able to support it also.
The posted code wouldn't have gotten there without his help. 

If anyone has leads on how to make android / USB Serial work, please let me know!

Comment by Jeff E on July 20, 2011 at 8:44pm

Hey, Bart sad to say that it seems MOTODEV is also useless. Found a USB-Serial CP2102 Virtual Com port discussion and was advised to go to google directly to verify this. I will try and see what is the best way to get get in touch with google. I only see groups so far android kernel group but not sure that is the best path. Hopefully, we can get help from google.

We seem to be one step short to getting the USB mode for Copter GCS but I guess I need to buy the bluetooth stuff for now. Tho I am not giving up hope for usb support.

Comment by druckgott on October 15, 2011 at 12:57pm

Is it enought if I have this:

http://www.diydrones.com/profiles/blogs/bluetooth-serial-communicat...

part and the app?? Could I then change the pid´s on the airfild without any pc only my arduino phone??

 

thx

druckgott

Comment by Bart on October 15, 2011 at 7:24pm

Yes. If you get a bluetooth modem, you can put it right on the quad and it will work.

As that post suggests though

"Although these modules are 3V, they will work with the 5V APM, so long as there is at least a 1K resistor on the RXD (which is what the 5V TX line on the APM will drive). The 3V signal from the module to the APM is OK as it is."

Once that is satisfied, you can connect directly. Just swap the RX and TX wires.

Cheers,

Bart.

Comment by Peter on December 1, 2011 at 9:02am

Hi Bart,

First off all, perfect work. Very nice app.

I want use your MavLink implementation for a Java windows application.

I'm a absolute new to jni, maybe you can help me to generate a library?

Thanks

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service