how much computer science is there in a UAV project

I'm a CS teacher at a small college. We teach young people that graduate into software development jobs.


I just got into RC planes as a hobby and now we are looking into getting a ArduPlane UAV for our more advanced independent study students to work with.

Obviously there's lot of building and flying, wiring, electrical stuff, tech stuff (making all the parts work), etc.

I gather we should be able to get the ArduPlane flying from one gps point to another, and perhaps doing
auto takeoff and landing.

How much software development possibility is there in the UAV area?  What can my software students
bring to the project, what can they get out of it?

 
Comments or suggestions are very welcome.

 

Dan

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

Join diydrones

Email me when people reply –

Replies

  • Thank you all for your thoughts.

     

    It sounds like we could push this just as wide and deep as we are capable.

  • Hi Dan

    My personal opinion is, that basic problems are solved. You'll see when you get your first ardupilot based plane into the air that arduplane (ardupilot firmware for fixed wing planes) and MissionPlanner (the ground control station software) are very flexible and feature rich. 

    IMHO both software parts are really lacking advanced features, things that make the UAV a turn-key solution for certain applications. I think there is still a lot of potential, especially in mission planner. MP is programmed in C#, arduplane with C++ (arduino or you could use the gcc/make toolchain on *nix systems).

    Best wishes

    -S

  • Anyway...

    Dropping students into the deep end of the APM code might not work well. Not that there's any particularly mind-bending concepts in there, but there is a ton of mostly irreducible code to understand before that would start paying off. If it were easy, there wouldn't be so many items in everyone's wish lists. Steep learning curve = disinterested students. It would be better to start simple.

    If you would like to explore drone-related computer science using already-completed tools, I would suggest looking into the Python scripting capabilities of APM. The script technically runs on the ground station, but with a telemetry link it feels like it is running on the craft. Beepers, speakers, LED lights, bomb drops, cameras, and other accessories can be controlled in code. These can be provided by you or created by students, providing interesting goals and some outlets for expression.

    Also, I would start with a quadcopter, not a plane. The ability to hover gives time for explanation and learning. You can add planes later, when the goals are bigger and students are better able to cope with relentless forward motion.

  • Since the others here have given such a great list already, I'll keep mine short:

    RTOS for the arduplane device/control loops

    APM multiplexing (multiple redundant autopilots, voting algorithms)

    Integrating an ARM based processor for mission specific computation (that might be too much electrical for pure CS students)

    Adaptive control/self tuning control loops, gain scheduling

    Improving integration by improving the usage/documentation of the MAVLink protocol. 

    Advanced navigation: autonomous path planning. 

    The list can certainly go on. These are just some I can think of :). 

  • Developer

    There's as much as they want!  I got into writing drone software as a CS person looking for a new project.  I find working on dronish things to be 75% fun software work and 25% flying...

    Also a very friendly crowd of developers...

  • Hi Dan,

    I know I'm about to give just one of many possible answers, but figured I'd throw my thoughts into the ring.  I actually have a masters degree in computer science which may disqualify me from saying anything useful here, but I'll try.  Ultimately I think this boils down to your life philosophy, and really how much computer science is in a drone is as much as you want to put into it.

    I think it's quite possible to get a pure computer science degree and not really be all that useful.  In my work experience, the smartest and most effective people seem to be the ones that can combine good skills in multiple areas.  Some of the best computer people I know have been trained in other areas, and picked up computer programming and admin skills on their own time.

    I think a UAV project would be an excellent experience for your computer science students, *if* it was properly guided by someone who has the big picture, someone who can take the time to divide up the tasks into proper size/scope chunks for where your students are at, and someone who can help the students achieve an overall successful outcome.

    More specifically (as I survey my stack of old text books I never read anymore) ... you have all the basic programming needs: loops, conditionals structures, boolean algebra, data structures, classes, etc.  You are going to be using a real world language (probably C/C++) that is still widely in use and will be a good experience for the 'kids'.  You will have some basic operating system interactions.  There is the possibility of investigating threading, mutual exclusion, dead locks, race conditions, and all that fun stuff.  Interprocess communication, communication between processors and external devices ... An embedded platform also offers a big dose of the real world ... you have to interface to real I/O signals, talk real world protocols correctly ... you might have to dive into binary and hexadecimal numbers.  The difference between float and double may bite you if you are trying to represent a lon/lat coordinate (float gives you maybe 10m precision only.)

    There is ample opportunity to dive into realms of math, calculus, linear algebra, discrete math ... I could go on and on (and I may just ...) :-)  Computer graphics could be used for visualizing data, drawing a ground station, you have human factors & gui presentation issues you could explore.

    Along the way you could be teaching software engineering methodologies, project organization and management ... and probably there are lots of other new things that modern computer science programs focus on that maybe weren't even on the radar screen when I went to school.

    Repeating myself: I think that pure computer science in a vacuum is really interesting, but it only becomes useful when you can apply it to real world problems... such as building a uav.  What a UAV does is to draw the student into the world of engineering.  I am a wanna-be aerospace engineer with a computer science degree.  In the course of my work in the UAV field I've had to come up to speed on things like control theory, some functional/basic electronics skills, aerodynamics, structures, simulation, there is a wide range of subjects that you could explore.

    A lot of people would attack this by trying to build something up from scratch.  (maybe even designing the airframe and all the electronics from scratch too.)  There's nothing specifically wrong with that approach and you can learn a whole lot by doing it, but you risk a huge time commitment ... putting 5's or 10's of years into this stuff if you do it all from the ground up, cycling many rounds of students through the program before ever getting anything that really works.  So if it was me, I'd try to start with something simple that's already working and flying, and then strategically inject student projects that draw out some aspect of computer science you are interested in.  The students could each write some module and then you could go out and have a field day and see how each student's module performs in the real world (for example.)

    There are several simulator options available (I'm kind of partial to FlightGear myself since my email address is @flightgear.org) and strategic use of a simulator would allow your students to develop their work in a risk free environment and then go out and test their work in the real world.

    For myself, I have a couple UAV models for flightgear that aren't perfect, but are ball park.  Often I'll quickly prototype a new idea in FlightGear's embedded scripting language (it's on the C, perl, python, javascript continuum somewhere so it's pretty easy to pick up and understand.)  When I've got the basic concept ironed out, then I can migrate over to my actual uav autopilot code, but can test "software in the loop".  My autopilot runs standalone as a process on my desktop PC and talks to FlightGear instead of talking to the actual uav hardware.  I can work through all the obvious dumb bugs and typos that way, and can then run and stress test the code in simulator to make sure I didn't do anything obviously stupid.  From there I can move the code over to the actual UAV autopilot hardware, and get it ready to fly on a real airplane.  Often I may have to do some fine tuning once I get to the real world, but rarely (never?) am I out at the field scratching my head trying to figure out why my code isn't compiling or why I'm getting some random crash ... I can get all that taken care of in the shop before I head out.

    So what would students get out of all of this?  Probably some students would latch onto this stuff more than others.  Even though UAV's and flight simulation is my world, I know they aren't everyone's world.  But for the right students, this would offer a neat connection to the real world ... a trial by fire of their work (hopefully not literally).  At the end of the day your UAV flies or it doesn't.  Or maybe it flies well or it flies poorly, or does some other task well or poorly depending on how well the student did.  It's one thing to say 2+2=4 on paper and get an A.  It's another thing entirely to make 2+2=4 fly in the real world ... and much more satisfying when you can.  I've probably written 10x too much here, but you asked an interesting question!  Sorry for any typos ... it's after 10pm on a friday night ... :-)

  • Developer
    What about PID control and how to create such a controller in code? These are the same controllers used in lots of industrial processes. It would have been really exciting for me as young engineering student to be understanding flight control based on gyros, instead of temperature control of rooms or large vats of stuff!
  • Developer

    You are welcome to give a try on the DroidPlanner project. We are trying to keep the code as easy to understand as possible. And we have lots of things to be developed, which will be open for all.

    Since you will be working on the Ground Control Station it's a good starting point, because it's harder to crash the drone. Also it's easier to switch app versions even in flight, to test multiple things.

    While you don't have the hardware I suggest you use the SILT simulator (the same goes for developing for ardupilot code). you can crash as many virtual drones as you want, and in the case of the GCS you only need a Android device to test it.

    IMO you made the right choice in going with a plane, they are a lot harder to crash, and much cheaper to fix.

    arthurbenemann/droidplanner
    Ground Control Station for Android Devices. Contribute to arthurbenemann/droidplanner development by creating an account on GitHub.
This reply was deleted.