UAV Playground 1.2 - An approach to Unmanned Aerial Vehicles

The UAV Playground is a collection of software components I've written in Java. They extend the Processing Development Environment (PDE) with some functionality that can help you to simulate and test different aspects of UAVs. You can as well use the UAV Playground library outside of the PDE in any Java application.
UAV Playground and all the Software it is based on are freely available. The distribution and the source code can be found on the Open Source project page at
The whole project is a work in progress and will be extended as I work on the exploration of UAVs. I'd appreciate if you leave me a comment or even better contribute to the project.

- object oriented
- modular
- extendable
- free

How to use it
- install the Processing Development Environemt (PDE)
- download the UAV Playground distribution and follow the installation instructions
- [install the FlightGear Flight Simulator (optional)]
- have a look at the sketches (examples) and browse the api documentation that is included in the jar file

A very basic example
- connects to the flight simulator
- displays the current altitude and airspeed

The UAVsim example
- controls the flight simulator via virtual joysticks or...
- controls the flight simulator via a PID processor (basic autopilot)
- displays various data

Additional examples
UAV Playground - NMEA to KML

UAV Playground 1.1
- New GPS NMEA data import via a network connection to FlightGear
- New GPS tracking in Google Earth via a HTTP connection to the UAV Playground

UAV Playground 1.2 [Update] (download)
- Completely rewritten autopilot now supports waypoint navigation

Views: 7255

3D Robotics
Comment by Chris Anderson on February 15, 2009 at 9:33am
Very nice. Note to everyone that he's using the Processing development environment, which is also the one that our Arduino uses. So it will look very familiar to you and easy to use.
Comment by jaron on February 16, 2009 at 7:29am
Thanks Chris.

Yes, the most simplest way to use the library is with the Processing Development Environment but you could use it as well with eclipse or any other Java IDE you are familiar with.
Comment by Marcus Wolschon on February 17, 2009 at 11:53pm
This sounds very cool.
I may try this out for developing an autopilot in Java for my drone!
Please keep us updated on any progress you make. :)
Comment by jaron on February 20, 2009 at 12:43am
Programming the simulator in Java or any other object oriented language can help you to master the complexity of such an application. On the user's side it hides that complexity. In the most simplest case you create an object in the UAV Playground and tell it to listen to another object. That's about two lines of code (see the example above).

The next step will be to use a GPS source (like FlightGear, Arduino etc.) and display the the flight path in Google Earth.
Comment by DJB on February 20, 2009 at 4:42pm
Hi Jaron. Can't you release the project as GPL rather than LGPL?
Comment by jaron on February 21, 2009 at 12:47am
The original idea was to share the code with everyone so that even proprietary programs could use it (LGPL).
That's alright for me but maybe I haven't thought enough about the concerns that possible contributors could have.

I've got 120+ downloads for the last week so there are definitely some folks out there that are interested in the project. Depending on the feedback I get I'll consider to change the license to GPL for the next release.
Comment by Marcus Wolschon on February 21, 2009 at 12:53am
I would not change the license.
If anyone feels that he/she would not contribute under the LGPL-terms
then then that person can still build on your sources and publish his/her
modifications under the terms of the GPL.
Unless that actually happens there is no need to change the license.
If you feel that you want even proprietary programs to be build that include
parts of your contrbutions then that is your and only your decision.

Comment by jaron on February 22, 2009 at 3:40pm
In eclipse you would create a new project, add the source code and the Processing core library to the build path. Then you could run the UAVsim example in the jaron.uavsim package either as an application or an applet.
There is no need for any of the Processing libraries if your application doesn't use the visual components (package jaron.pde) or if you use your own user interface. The core functionality of the UAV Playground is GUI independent.
Comment by DJB on February 23, 2009 at 1:05am
Hi. Sry for the delay in replying. I asked whether the code can be fully released because if for example one encounters problems with the code he does do not have any control over it, then he will be basically be forced to rewrite the whole thing himself.
Case in point....I’ve been trying to make the project work as downloaded...first by running the compiled version and then trough PDE. For some reason the program is not getting or sending data to flightgear.

Even though it is not a big deal, it would have been nice if the control algo would have been totally implemented in PDE rather than in Java.

I got also another question. What is the red aircraft symbol in the top left virtual horizon instrument supposed to indicate?
Comment by jaron on February 23, 2009 at 8:43am
The source code
I added the source code to the distribution file so if you download it again you'll find the code in the src directory (download distribution).
Before that you could have checked out the source code with an SVN client like TortoiseSVN (right click to copy the URL)

No data from FlightGear
You need plenty of power to run the UAVsim example and FlightGear (and Google Earth) on the same machine. Running these applications on different machines may solve your problem.

The PID controller in the PDE
You can use all the code from the UAV Playground project either in the PDE or in any other Java IDE.
In your case create a new Tab in the PDE and copy & paste the source code from the jaron.uavsim.PID class to the new tab. Have a look at the jaron.uavsim.Autopilot class on how to use it.

The red plane
The red plane in the artificial horizon indicates the control signals from the autopilot for pitch and roll. It's the same as indicated by the red line in the graphs (s. the above pictures). These indicators don't show any activity if FlightGear is not connected and thus no data for the pitch an roll angles is received.

Thank you for the inputs. They help me to improve the UAV Playground project.


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

Join DIY Drones

© 2017   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service