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: 5520

Comment by Frank on July 11, 2011 at 5:39pm

another little thing to perfect your code:(not a criticism, just to let you know)

after use of your gcs now android polls my pc bluetooth continously.

it is annoying because I can't shut down bluetooth on my notebook (strange but true there is no soft or hard way to disable it) and I don't want my android to sync now so I should see every 10 seconds that conection request.


Moderator
Comment by Hai Tran on July 11, 2011 at 10:12pm
@jeff E how did u connect xbee to your xoom, I didn't see a USB on the xoom, so I ended up getting a Iconia A501.

First app installed was copter gcs, unfortunately it asked to enable Bluetooth, and when I said yes, it immediately crashed.
Comment by Anish on July 11, 2011 at 10:57pm
Awesome job, did think about something along the line but with ioio
Comment by Jeff E on July 11, 2011 at 11:02pm

Changed photo URL

@Hai Tran
here is the photo of the bottom of xoom

First on the left is a micro usb and the next is micro hdmi. On the photo of my xoom i have a usb host cable connecting the xoom and the xbee. its a few bucks on ebay (usb host cable)

I cant help help yet on the bluetooth connection as I messed up the order I made and forgot to order the bluetooth adapter. Most likely i will just wait if the usb serial version will be release.

Comment by Frank on July 13, 2011 at 7:04pm

Tested a little more, this is my bug report:

I see yaw and throttle radio swapped, roll on hud is reversed.

not tested enough for now: some problem in saving pid values, graph data sometimes crashes, to reconnect bluetooth when reset copter needs to close the app.

I love it! very useful at the field! compliments.

Comment by Bart on July 13, 2011 at 9:12pm

@Hai,
Thanks for heads up, you're right, there was a bug with the bluetooth, I managed to reproduce at least a similar situation where it causes a crash. I fixed it, so try it again if you have a chance.

@frank, Regarding the laptop/bluetooth issue, could it be that your bluetooth was off before? All my app does is turn on bluetooth, and then use it to connect to the selected modem. Any thing more than that shouldn't be caused by the app itself, so constant polling seems weird (do make sure that you didn't try to connect to the computer's bluetooth). I also corrected the HUD roll, thanks!

@frank2 Thanks for the bug report: yaw and throttle mix now corrected. As for the bluetooth, try waiting ~30 seconds, then hit the reconnect button on the context menu. It seems there is a time out before being able to reconnect to the bluetooth modem. I'll see if I can find a way to speed that up.


@jani, the crash with readouts should be gone now. Thanks for the report.

 

Other changes:
-Selectable speed (or more accurately, you can change how much data is drawn: more data -> slower scroll) now available in "Readouts", and crashing from that should be gone. Pinch or stretch with two fingers to zoom in and out. Note that the Baro and Temp listed don't actually work, but if MAVLink sends em, it'll display.

-PIDs are fixed, and give confirmation of sending (MAVLink mode): the boxes turn yellow to indicate they are queued to be sent, green for a few seconds to show they were received on the other end. The sliders are gone, and instread you get an edit box and +- 0.1 and  0.01 buttons. Let me know if that works better.

 

I'm sure there are other bugs lurking, (and other features to get in there) so if something goes wrong, please let me know. If you have the option at a crash to hit "Report" that is the best way, as I get a stack trace that way.

 

Thanks for the feedback,

Cheers,

Bart.


Developer
Comment by Jani Hirvinen on July 13, 2011 at 9:14pm
@Bart, Ok great, i will update it and spam you with new reports if it crashes. Yeah was not sure on first time if report reached you, android market behaved a bit weird when i was sending it.
Comment by Bart on July 13, 2011 at 9:14pm

PS, please let me know (screenshot/photo) if you're HUD is not drawing right. I made some changes that should have improved it, and I've tried a few screens on the simulator. But if its still wrong, then being able to see what renders wrong for you would be great.

Thx


Developer
Comment by Jani Hirvinen on July 13, 2011 at 9:49pm
Bart, yeah now it works a lot better. One thing that I noticed is that you should scale Z-Accelerometer. It get's out from the screen rather badly. This is due when X/Y are default a 0, Z is always affected by gravity of earth and approximately gravity of 1G is about 1000 (408 on earlier computations and depending on Z axis hardware) on output of Z axis.
Comment by Jeff E on July 14, 2011 at 8:17am

Woah I envy you guys...

 

Bart any chance you'll be able to check on the usb connection? I noticed you changed the BluetoothService.java to communicationservice.java I hope it will be a start. I can do testing for you as well.

Comment

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

Join DIY Drones

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service