This project was started in November , electronics and control loops. Because I always need a cool project to learn new things, it was clear that something that can fly had to be built.
The project started as a "tricopter-only" project, but as I wanted to build smaller vehicles with more payload capacity, I decided to make some quadrotor, hexacopter and Y6 hexacopter firmwares too. My main interest is to build very small MAVs that fly as good as larger ones (or even better) and that can be controlled by wireless video link. I also experimented with autonomous flight in GPS-denied areas (video), and with GPS assisted autonomous hover (video). It would be cool to add more features to this project but I am pretty busy with my PhD research. But maybe one day I could combine my scientific interests with my hobby projects...
-- William

Contact: Shrediquette @ g m x . d e --- All content published under CC Attribution-Noncommercial-Share Alike 3.0 Germany

Tuesday, 29 September 2009

Matlab source code

I got a lot of requests for the matlab source code of my tracking algorithm. (If you wonder what I am talking about, watch this video of the tracking process via Matlab: http://vimeo.com/6347100 )
As you will see, it is not that complicated. I did not upload the complete source code, because that doesn't make too much sense. My GUI for example, contains a lot of code and it is most likely irrelevant to most of you. I left out the calculations of the different parameters for my PID control loop too, they will make things appear more complicated than they really are.

Here comes the code:
Matlab Tricopter Tracking

If you have questions, I would suggest that you put them into the comments for this post. Doing so, more people might benefit from it.

4 comments:

  1. Hello William Th.:

    My name is Elena and I am from Spain.
    I am a student of Engineering in Automatic and Industrial Electronics.

    I write to you because I have liked very much your work. It is really interesting. I want to do some questions to you:

    How I can design in Matlab a tool as "tricopter debug tool"?

    Might you send me more documentation about the source code complete that you have programmed in Matlab?

    The reason is that I would like in a future to be able to do a tricopter similar to your one.

    I'm sorry for my English. Regards, Elena.

    My email is: elenablas_1985@hotmail.com

    ReplyDelete
  2. Hi William,

    Thanks for sharing your work.

    I tried running your code on matlab but I can't seem to get rid of the debug message that says:

    ??? Multiple VIDEOINPUT objects cannot access the same device simultaneously.

    Error in ==> StartCam at 80
    start(vid);

    The weird thing is vid = 1x1 struct when I tried to debug it. Is there something wrong with my webcam? I'm rather new to this so I do hope you can provide some assistance.
    My email address is jaredwong2000@yahoo.com

    Thank you in advance.

    Regards
    Jared

    ReplyDelete
  3. Hi Jared,
    probably, your videoinput object is still open when you try to run the code. Try stop(vid) before you re-open the object.

    ReplyDelete
  4. Hi William,

    I am a student from Singapore. I am in Aerospace Engineering and I am looking forward to building a modified version of your tricopter. I have no knowledge in coding and my intention is to build a tricopter that will run through a circuit that is placed indoors. Which means, your method using matlab is the best idea. Would you mind sending me more details on this as to how I can go about starting on this?
    my email is sahulhs@hotmail.com.

    P.S. I will be sure to credit you in my work. :)

    ReplyDelete