Tuesday, March 1, 2011

A Sample Android App and Java classes

I have created a sample Android app that is now available on our google SVN repository. As of now the app is very simple, with a simple button and logo. Upon clicking the button the Drone will take off, hover for 5 seconds and then land. This can be expanded out pretty easily and is a good starting point. Most of the logic actually occurs in an external AR Drone class. I hope the final version will take off, fly a certain path, then land.

We have been working with different java classes to try and get better control over the drone but have been struggling so far to find a class that sets the pitch and roll to what we want. All of the classes we're using use AT commands to tell the drone what to do. One would expect a command that sets the pitch and roll to set those values but that doesn't seem to be happening. Instead either nothing happens at all or the change isn't made until we start the drone agan and, thus, it takes off into a different direction (usually right into the wall). We had limited progress with this issue today but found that settings the pitch right before liftoff will have an effect, similar to the one just mentioned.

Upon reading through the SDK documentation we saw that the drone will auto-disconnect if you don't send it a command for 2 seconds. We're thinking of implementing something similar to what Dave has in his Urbi example, where there is a loop that constantly sends the drone commands.

Finally, I put together an extremely basic logo for our final application. And by basic, I mean that it was put together in 5 minutes or less. Enjoy.



No comments:

Post a Comment