It’s still early days yet, but I just completed my first successful test of a .Net Windows Forms control to control the Parrot AR Drone.
I still need to pass in the Window handle of the control itself to use as the video rendering window, but so far it’s looking very promising.
The code is tricky to work with, as it uses DirectX and a bunch of other libraries to handle some of the functions. It’s also very much “Unix/Linux/C” code, and needs a bit of tweaking to get it to behave under the .Net framework.
I was going to work on a new laser harp this weekend, but since this was so successful I might continue to develop the control library.
Once I’d got through the linker errors (the code is a little “scattered” throughout multiple folders – is this a Linux thing?) a few of the types presented problems – especially int8_t. I think it’s been about 10 years since I’ve done any Win32 programming – rusty is not the word…
Stay tuned, I’ll be posting something as soon as I get it release ready.
UPDATE : I’ve noticed that the connection to the drone seems to time out after a while – I’ve traced into the unmanaged code and it seems like the WiFi connection goes away. It could be just the firewall or something elementary like that. Need to install WireShark and see what’s going on under the hood… I did manage to get the video rendering into the windows control itself, so that’s small victory.
I can also attest to the durability of the drone – so far 3 nasty crashes and one WiFi freakout and it’s still in good shape.
UPDATE UPDATE: I managed to sort out the connectivity issue – something to do with the frequency of calling the “update” routine. Added some funky joystick controls courtesy of http://www.jasonlabbe3d.com. The only problem remaining is CPU usage – it seems unusually high, this is the same with the example code. I’ve tried to do some balancing of the threads involved, but so far it’s still peaking at about 80% – which is way too high.
Further Update: I’m looking for a couple of people to help with this http://www.stephenhobley.com/blog/2010/10/22/looking-for-2-coders-to-help-with-the-ardrone-net-library/