3D Robotics

T3--Round 6: The Simulation Round!

For the last T3 round before the weather improves (in the Northern Hemisphere), we're going to do something indoors! It's a simulation round, which I previewed here.


I'll repeat the basics:


There are two kinds of simulations: "open loop" and "closed loop".


Open loop means that you connect the output of the simulator to the input of the autopilot. The simulation drives the autopilot with synthetic GPS coordinates and sometimes synthetic attitude data, essentially replacing the autopilot's sensors. This basically fools the autopilot into thinking that it is flying, and you can watch how it responds. This is typically done by having the simulator output data via the serial port and feed that into the autopilot.


Closed loop means that you also connect the output of the autopilot to the input of the simulator, so that the autopilot is "flying" the aircraft on screen. This usually requires a relatively complicated bit of hardware that converts the PWM servo output of the autopilot into what amount to joystick commands via USB or serial that steer the plane in the simulator. It can also be done entirely in software on the host PC, as in the case of Matlab simulations being driven by a flight simulator.


Here are some blog posts that show examples:


--Curt Olson's FlightGear demo

--Faisal Shah closes the loop, Part 1

--Faisal Shah closes the loop, Part 2


Here's the contest structure:


Two sets of winners:


Both must write "DIY" (in cursive) over a place of their choosing. Example above from brakar, who, like Jesse & Jared, have jumped the gun a bit and already submitted successful entries for this round.


--Group One: Open loop (video showing you mirroring the airplanes control surfaces with the arrow keys): First six to complete this win a $25 gift certificate to the DIY Drones store.


--Group Two: Closed loop (aircraft controls the flight simulator): First three to complete this win a $50 gift certificate.


A special top prize will go to the person who best documents how they went about it and creates a useful tutorial for others to use afterward (judge: Gary Mortimer). The prize for that will be the notorious Raven UAV clone (unless the winner requests something else, in which case I may grant mercy and come up with something of equal or greater value).


Also, as suggested by Brian Wolfe, anyone who completes either of these rounds will get points added to their grand total: One point for open loop and four points for closed loop. Here are the current cumulative rankings after five T3 rounds:


Brian Wolfe 31
Vassilis 24
Brakar 23
Mark Griffin 18
Krzysztof Bosak 17
Andrus Kangro 12
Jesse Jared 8
IOS 6
Bill Premerlani 6
MarcS 6
Joe 6
Steve Joyce 5
Steve Westerfield 3
Chris Anderson 3
Icebear 1


Entries must include a video and KML track and a description of your simulation setup (flight sim, autopilot, other hardware). Submit your entry in the comments below by 12:00 midnight PST on Sunday, May 2nd.


E-mail me when people leave their comments –

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

Join diydrones

Comments

  • Developer
    Alexandr, that is cool. A nice setup, and a lovely video. Thanks for the post.

    Can you tell us more about the autopilot. I've found a development board with the same micro-controller.

    But what software are you using ? Is it open source, ?
  • Hi all!

    This is my first post here.
    I'm not a DIY guy, just could not refrain from participation in the contest. :)

    I use FlightGear 1.9.1 with custom model of our real drone (~5 m wingspan, ~90 kg weight). Visual model is ported from SolidWorks, flight model is YaSim based. Autopilot is stm32f103 based with external IMU/airdata. For simulation I use special autopilot software build that uses one of serial ports for connection to PC. Also I've got port of autopilot code to run on my desktop.

    I use UDP to get attitude/position/etc data from FlightGear and put servo output to FlightGear. Simple application called "fgwrapper" receives UDP packets from FG, converts text data to binary format and sends it via serial port to autopilot. Then fgwrapper receives response from autopilot, converts binary data to text and sends it via UDP to FG. Also fgwrapper do useful synchronization job, because FG1.9.1 reads UDP packets by specified time intervals (not by reception of UDP packets). This can lead to significant delay in control.

    Here is the result:


    video

    diy_track.kml

    ps: sorry for my english :)
  • 3D Robotics
    @Recmaster. That's an open loop simulation. There is no back channel from the autopilot servo output back to the simulator.
This reply was deleted.