A couple months ago I’ve started and implementation of Mavlink for Perl. Why? Because we’re trying to build a UAV and we’re using a Beagleboard xM as the brain, so given we’ve the processing power there was no need to suffer writing C. I’m not against it but I rather has the benefits of the rapid prototyping capabilities that scripting languages provide.

Luckily there are open source servers available: QGroundControl and HappyKillmore so we don’t have to write that part, the idea is to build an event-driven framework that takes care of getting/sending messages to the Control Station and leave the user the implementation details of each one of the commands and actions. Once this project is finished building a Control Station in Perl should be possible and less difficult.

I’m also planning - if I’ve enough time - to build a bridge between Mavlink and with FlightGear which is a flight simulator, with that I should be able to control planes in FlightGear through QGroundControl for instance and get real-time telemetry coming right from the simulator.

I started in TDD mode, but honestly I dropped it since I was spending a lot of time changing test each time I came up with a modification of the API. So I decide to define the API build a prototype test how that works from a user perspective and then continue on TDD.

I’m also giving Mouse a shoot, I didn’t go for Moose because even this is an 1GHz processor I don’t want to make my framework heavy weight from the start, although if Mouse is not enough I might give it a shot later on.

So far is on pre-alpha state located in Github and it may take some time to finish it up and making it CPAN ready. Once this is ready I hope this tempt other users to build flying drones using Perl.

To my knowledge this is the first attempt to put Perl code into a flying machine.


comments powered by Disqus