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 code.google.com/p/uavplayground.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.Features- object oriented- modular- extendable- freeHow 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 fileA very basic example- connects to the flight simulator- displays the current altitude and airspeed

3689310624?profile=original

3689310645?profile=original

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 examplesUAV Playground - NMEA to KMLUAV 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

3689310658?profile=original

UAV Playground 1.2 [Update] (download)- Completely rewritten autopilot now supports waypoint navigation
E-mail me when people leave their comments –

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

Join diydrones

Comments

  • Hi Jaron, I looked into your code & couldn't separate just 'Flightgear & google earth' communication part from it.

    I have autopilot code in Matlab which is communicating very well through udp, now I just want to pull out gps info from FG to GE to get similar plots in GE as you have in your simulation. Any suggestion on this part?
  • Thanks jaron, I think I can make it work. May bug you later with few questions if I get stuck somewhere ;)

    @DJB: That mathswork's toolbox is NOT useful at all. All they have is 1way interface to Flightgear, it can't get you data back from flightgear in any form. And guess what, they are selling this toolbox for $300 !!!
  • Alex, all the communication between the UAV Playground components, FlightGear and Google Earth is based on network connections. If you browse the source code it'll maybe give you an idea of what you'd had to implement if can't find it out of the box.
  • DJB, I could be wrong but my own experience is that FilghGear is very demanding to your hardware. Memory and maybe the graphics card seem to be a critical factor. I received corrupted data from FlightGear under certain conditions.

    Some configurations I've tested
    - Intel Pentium M740 1.8GHz, Intel GMA900, 1GB RAM -> unable to communicate with FlightGear
    - Intel Core 2 Duo T5450 1.67GHz, GeForce 8400M GS, 2GB RAM -> ok
    - Intel Core 2 Quad Q9550, NVIDIA 9800GT (512MB), 4GB RAM -> good

    No communication between UAVsim and FlightGear
    You could reduce the update frequency for FlightGear (in the batch file) and increase the delays in the FlightGearSender and FlightGearReceiver classes. Try out the simple examples in the PDE and check if you encounter the same problem as with the UAVsim.

    Implement your own algorithms
    It's easy to implement your own algorithms if you understand the event handling mechanism I used for the UAV Playground. Have a closer look at the jaron.components.Signal class. First it might look a bit confusing but if you understand the concept behind it you'll like it.

    My skills
    I'm a freelancing Senior Software Engineer mainly employed in the news and digital media industry.
    Not so long ago I rediscovered my passion for everything that flies (mainly helicopters) and with the UAV Playground I use my professional skills to discover something new and exciting.
  • Hi Alex. There is already a blockset in Simulink if you want.

    http://www.mathworks.com/access/helpdesk/help/toolbox/aeroblks/inde...

    I was also considering taking such an approach...due to many math functions that are already implemented.
  • Any suggestions on implementing similar stuff through Matlab/Simulink ?

    I want to interface Flightgear & Google-earth though Matlab/simulink with exact similar concept which 'Jaron' has done.
  • Hi Jaron. Thanks for your feedback and for releasing the code. I will look into the issue of why Flightgear and UAVsim.jar do not communicate on my laptop. I also had the intention to add a cascaded or a parallel PID on the rudder.

    I have another curiosity....this time related to your skillset. In what are you graduated, and what is your job? Electrical engineering or in Information Technology? Maybe I am generalizing....but its quite difficult to find hobbyists around, that do utilize PDE that interworks with stuff coded in Java to test out their ideas.

    BTW I am Gastarbieter....the one that had left you the comments on youtube.
  • 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.
  • 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?
  • 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.
This reply was deleted.