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

  • Gary,
    Despite the rumour to the contrary I found size does matter. We all like a bit of aural stimulation, sadly Vimeo is a cruel mistress and won't permit the insertion of a package above a certain size (unless you are prepared to pay). YouTube would happily accommodate my full length (it's not that big really) but you run the risk of a nasty virus, so I did not want to go all the way.
  • Gary, I was singing and tap-dancing while recording, so that must most definately be your sound card.

    Or to be honest; when I edit videos in Pinnacle Studio (a few versions old), the video quality becomes crappy and the file size grows some 10 times. So feel free to play the piano, or try listen to Jan Garbarek or Torhild Sivertsen if you would like to sample some norwegian music.
  • Moderator
    Is my sound card not working, or do we need someone on a piano to accompany those videos?
  • Just moving moving my post to this thread where it belongs.

    This simulation was running in the autopilot (FlexiPilot) as a closed loop. This is quite easily performed, so I do this as part of preparation before every flight. I am not very good with video-editing, so the explanation goes here instead of as comments in the video itself:
    - The commands to the autopilot are initially fed to the ap through HyperTerminal - which is then closed
    - UAVStation is started to show the progress of the simulatinon - then closed
    - HyperTerminal is started again; to stop sim in autopilot - then closed
    - A batch-file is started to download log from ap
    - A new batch-file is started to decode the log, (generate kml-files etc)
    - One of the KML-file is opened in GoogleEarth

    T3 contest on DIYDrones, round 6, simulation from brakar on Vimeo.


    The video was recorded with open source CamStudio:

    The KML-file: Sim T3-6.kml
  • Apologies for the delay. Vimeo has been chewing on my video for 22 hours now so I have uploaded to YouTube. Quality is not the best.

  • The HUD shows actual values of roll/pitch/etc from the property tree. Maybe it is an effect of outside view.
  • T3
    Of course I know what HUD is.
    In the video during turns the AHI shows anything but the actual roll and pitch.
    I wonder what is the origin of displayed values.
  • T3
    What is the HUD showing in FlightGear?
  • My first shot - an ArduPilot/FlightGear based closed loop simulation. I have no prior experience of tuning gains for ArduPilot so there is still some work to do here. Video to follow shortly and later a write up with software and associated configuration files.
    T3_6.kml

    diyT3_6.jpg


    Hardware and Software used:
    Ardupilot 2.6 with very minor modifications running on an Arduino Mega board.
    FlightGear 1.9.1 with EasyStar model.
    Custom software for translating between FlightGear and ArduPilot + basic Ground Station functionality.

    The system works in a similar manner previous simulation solutions. Custom software takes position/velocity data from flightgear via UDP, formats it for ardupilot and shoves it out the serial port. ArduPilot data output is modified to include servo position data as suggested by Jason Short. This servo data is parsed from the returning serial data packets, translated to values flightgear expects and sent to flightgear via UDP.

    Position/velocity data from flightgear is formatted into ArduIMU serial packets by the custom software. This allows use with virtually stock AP 2.6 code. The only AP code modification required is a small (6 lines) hack to get servo position data into return packets.

    As there is no simple way to share serial data with the AP GroundStation software (very) basic GS functionality is included in the custom software.
    https://storage.ning.com/topology/rest/1.0/file/get/3692033103?profile=original
This reply was deleted.