LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Flight Path Planning for AR Drone

Hello I am creating a program and is facing difficulty. I am tasked to design a flight pattern for my AR drone using LABView via wifi without the aid of any controls(Joystick, keyboard,Mobile). I have look through the book titled 'LABview for everyone' and found 3 possible ways to do it. Sequence Structure(what I am working on), event structure, state machine.

 

Example of flight pattern: When I press start in front panel, my drone will take off and stay on air at a certain height(maybe 1m) for 10sec, after which it will Yaw(rotating clockwise 360degrees) for 4 times or dance like what is shown in the video, drone fly to 2m this time, last but not least it will end off with a land.

 

Examples: http://www.youtube.com/watch?v=-cZv5oKABPQ

                http://www.youtube.com/watch?v=S-dkonAXOlQ&feature=related

                http://www.youtube.com/watch?v=geqip_0Vjec&feature=relmfu


Can anyone give me tips to work on? 🙂

0 Kudos
Message 1 of 6
(4,855 Views)

Hi John1982.  Sounds like fun.  We used to fly our drones with LabVIEW and a joystick; never got around to tackling autonomous flight.

 

I would start by looking at queued state machines.  A sequence structure may be ok for a very brief sequence of events, but is very

restrictive once you start putting together a real program.  There is an example here: Queued State Machine Lots of other examples

on the forums.  Also, make sure you have a good flow diagram for you app, including error cases, before you start 😉

 

Are you going to use the data coming back from the drone to conclude your steps, i.e. send a command to go to 1m, then wait for feedback

telling you the drone has achieved the desired altitude?  Makes your program more complicated, but potentially much more robust.

 

I would also include an error handler that will continuously send a 'soft land' command in the event of loss of comm or drone fault.  Probably

won't make any difference, but might possibly work.

 

For handling communication, I would look at an Action Engine.  Ben Rayner has a great nugget.

 

Hope this helps, ask questions as you explore.

 

Matt

Message 2 of 6
(4,827 Views)

Thanks man. I read throught queue state machine but it is too complicated for me to understand and build.. How about falt sequence? My friend suggested to me to start from flat sequence cause it is easier 🙂

0 Kudos
Message 3 of 6
(4,793 Views)

@John1982 wrote:

Thanks man. I read throught queue state machine but it is too complicated for me to understand and build.. How about falt sequence? My friend suggested to me to start from flat sequence cause it is easier 🙂



flat sequence is like multiple state cases,but the disadvantage of a flat sequence is you cannot go backwards, but forward in a defined manner as oppose to a simple state machine...you can point to any statement case and it is not limited to a certain sequence of events...again, there are caveats in using flat sequences

 

  • flat sequences can get rather large as it grows side by side
  • state machines, like a deck of cards(cases), you know where in the pile your statement is and how to transition to them any way you want.

btw, there are many different labview design patterns...state machines,queued state machine,event driven state machine,event machine,event handling loop,continuous loop,parallel loops, master slave loop,producer consumer loop,unconventional state machine,functional global...but never heard of the flat sequence machine?Smiley Surprised goto Execution Structures

 

 

Message 4 of 6
(4,789 Views)

Here's what I have come up with using flat sequence nothing seem to be working. Can anyone guide me? I have just started using Labview so my VI might look stupid and retarded. Please help thanks a lot 🙂 I mean flat sequence structure not machine. My bad. Can anyone look into my VI and tell me whats wrong with it 😛

0 Kudos
Message 5 of 6
(4,775 Views)

Nevermind somehow i managed to solve this problem. Thanks for the help

0 Kudos
Message 6 of 6
(4,737 Views)