Delving the depths of computing,
hoping not to get eaten by a wumpus

By Timm Murray

UAV::Pilot v0.5 Released, Now Supports Real Time Video

2013-07-31


UAV::Pilot, a Perl library for controlling the Parrot AR.Drone, has released version 0.5.

This was the big one. With the ffmpeg library installed, you can decode the h.264 video stream coming right off the drone, in real time. This is where UAV::Pilot starts to get really interesting, opening up applications like augmented reality games and object recognition.

Demo video:

https://www.youtube.com/watch?v=6jX0YbPTv44

I’m going to be taking a short break from working on UAV::Pilot for a while. After lazing about, I’ll start work on the next release, which will mostly be cleaning up the API and bugs.

Also, I’ll be giving a presentation on UAV::Pilot in September for the Madison Perlmongers Group, which I plan on recording.


UAV::Pilot v0.4 Released, Now Supports Video

2013-07-04


UAV::Pilot, a Perl library for controlling the Parrot AR.Drone, has released version 0.4.

The big change for this update is streaming video to a file. Display in real-time is not yet implemented–that’s coming in 0.5.

There are also some API changes in how event loops are initialized to make the naming more consistent. There will probably be another API change in the video handling in 0.5. Once I do a complete release, API changes will have a proper deprecation plan, but for right now I think it’s fine to change things willy-nilly.


UAV::Pilot v0.3 Released

2013-06-17


Version 0.3 of UAV::Pilot has been released on CPAN. The major change in this version is an improved event loop based on AnyEvent.

AnyEvent is a very nice framework overall, but unfortunately doesn’t have quite the right syntax for UAV::Pilot’s purposes. Consider this plain-English description of a UAV flight:

Takeoff, wait 5 seconds, then pitch forward for 2 seconds, then pitch backwards for 2 seconds, then land

In AnyEvent’s standard interface, things would work out something like this:

my $timer; $timer = AnyEvent->timer(
    after => 5,
    cb => sub {
        $uav->pitch( -1.0 );
        my $timer2; $timer2 = AnyEvent->timer(
            after => 2, 
            cb => sub {
                $uav->pitch( 1.0 );
                my $timer3; $timer3 = AnyEvent->timer(
                    after => 2,
                    cb => sub {
                        $uav->land;
                        $cv->send;
                    },
                );
                $timer2;
            },
        );
        $timer;
    },
);

$uav->takeoff;
$cv->recv;

All that indentation gets hairy. So I created an interface on top of AnyEvent, UAV::Pilot::EasyEvent, which is based on the Node.js event interface used by NodeCopter. Here’s how you’d write the same problem using EasyEvent:

my $cv = AnyEvent->condvar;
my $event = UAV::Pilot::EasyEvent->new({
    condvar => $cv,
});

$event
    ->add_timer(
        duration => 2000,
        duration_units => $event->UNITS_MILLISECOND,
        cb => sub { $uav->pitch( -1.0 ) },
    )->add_timer(
        duration => 2000,
        duration_units => $event->UNITS_MILLISECOND,
        cb => sub { $uav->pitch( 1.0 ) },
    )->add_timer(
        duration => 2000,
        duration_units => $event->UNITS_MILLISECOND,
        cb => sub { 
            $uav->land;
            $cv->send;
        },
    );

$event->activate_events;
$uav->takeoff;
$cv->recv;

Much better.

As an added bonus, having a good event interface means we can also support controlling UAVs through SDL joysticks. See bin/uav_joysticks in the distribution for details.


Announcing: UAV::Pilot v0.2

2013-06-02


UAV::Pilot version 0.2 is now up on CPAN. The big change in this one is initilizing the navigation stream and parsing the data. I also whipped up this retro-videogame looking graphical output:

nav_output_sdl

The usability of the nav data is a bit limited at this point, because we need to grab the stream continously in a loop for display while also processing the flight commands. This is where an event system like AnyEvent will come in handy. You can try programming it around AnyEvent (or whatever event system you like) with what’s there right now.

The major work for the v0.3 release will be getting an event loop integrated into the library.


Blackhawk Farms HSAX, 2013/05/27

2013-05-28


Videos are up


The Black Hole of Awkward Timing Known as High Performance Tires

2013-05-13


My 370z needs new tires. The tread depth is technically legal, but driving in the rain is scary, and they don’t grip very well under hard launches. They’re also 19-inch wheels, which apparently nobody is selling in the best, most grippy street tires right now.

Tires might seem like the most boring part of the car, but they’re the only part that touches the ground (well, usually . . . ). They’re also something that tends to get a little bit better every year.

Bridgestone Potenza RE-11’s were my first choice. I had them on my RX-8, and they were great. Problem is, they’re slowly introducing the RE-11A’s and pulling the older RE-11’s from sale. Which would be all well and good if they actually had RE-11A’s in 19-inch sizes. The originals are going or gone in 19-inches, and the new ones haven’t been introduced there yet.

Then there are BFGoodrich g-Force Rivals, and the Dunlop Direzza ZII’s. The Rivals don’t seem to come in 19-inch sizes yet, and while the Direzza’s do, they’re not in the widths I want.

Bridgestone Potenza S-04s are a step down from all the above, but they are in the right size.

Two or three months from now, I’m sure this will all be worked out, but I can’t wait that long. I have an event coming up and I want sticky tires for it. The question might come down to the S-04’s slightly less sticky compound being made up for with a slightly larger contact patch.


That's Better

2013-05-12


Playing around with WordPress themes.  I wanted something akin to my old custom-built blog, with the retro-greenscale console screen look. The Mantra theme looked close to what I wanted, and then I messed around with the CSS a bit. Looks to be good enough for now.


AR.Drone Nav Data

2013-05-12


There are parts of the Parrot AR.Drone that are rather underdocumented, and one of those is getting the navigation data.  Once you activate the nav data, it doesn’t send the data directly to you. Instead, it sends it to the 224.1.1.1 muticast address.

Which is great and all. That means you can have one person controlling on their laptop and a bunch of other people watching the nav data on their own systems. But it’d be nice if their docs told you this.

There’s also a way to get it to unicast to your address, but they certainly don’t lay that out.

Anyway, the good news is, I can receive the AR.Drone’s nav data now, which is a big milestone for the 0.2 release.


Announcing: UAV::Pilot v0.1

2013-05-09


UAV::Pilot is a Perl library for controlling UAVs.  It currently works with the Parrot AR.Drone, with plans to expand to others in the future.

Demo video

The current library supports basic commands, such as takeoff, pitch, roll, yaw, vert speed, and land.  All the preprogrammed flight animations are also in place. Navigation data and video are not yet supported–see the ROADMAP file for future plans.

Github repository: https://github.com/frezik/UAV-Pilot

CPAN: https://metacpan.org/module/TMURRAY/UAV-Pilot-0.1/lib/UAV/Pilot.pm


Autocross, Columbus 151 Speedway

2013-05-04


Took my 370Z autocrossing at the Columbus 151 Speedway on 4/28.  YouTube vids available.



Copyright © 2024 Timm Murray
CC BY-NC

Opinions expressed are solely my own and do not express the views or opinions of my employer.