Features Podcasts Family Video Comics Music Tech Science Books Film & TV Games ✚

Jill

HOWTO build a robotic squirrel-squirting water sentry-gun, with python

Cory Doctorow at 3:22 pm Mon, Mar 26, 2012

— FEATURED —

Book Review

The Man Who Laughs: grotesque Victor Hugo potboiler was the basis for The Joker

Feature

Eurovision 2013: An American in London

Book Review

The Twelve-Fingered Boy - mesmerizing YA horror novel

— FOLLOW US —

Boing Boing is on Twitter and Facebook. Subscribe to our RSS feed or daily email.

 

— POLICIES —

Except where indicated, Boing Boing is licensed under a Creative Commons License permitting non-commercial sharing with attribution

 

— FONTS —

Tweet
Kindle

Kurt Grandis needed to fight the squirrels in his backyard bird-feeder. So he turret-mounted a Super-Soaker, rigged for computer-control, and used python to program it to detect squirrels (distinguishing them from other critters, such as birds), target them, and squirt them. In this 26 minute technical presentation from Pycon US, he explains how to teach a computer to answer the question, "What is squirrelness?" and to camp on the feeder and target them. The amazing thing is how it takes the infinite patience of a computer to outlast the persistence of a squirrel. Jump to 15:45 for about a minute and a half of pure gold squirrel warfare, complete with Wacky Sax.

Militarizing Your Backyard with Python: Computer Vision and the Squirrel Hordes (via Naked Capitalism)

I write books. My latest is a YA science fiction novel called Homeland (it's the sequel to Little Brother). More books: Rapture of the Nerds (a novel, with Charlie Stross); With a Little Help (short stories); and The Great Big Beautiful Tomorrow (novella and nonfic). I speak all over the place and I tweet and tumble, too.

MORE:  Delightful Creatures • Gadgets • guns • happy mutants • maker • video • wacky sax • Weird • youtube

More at Boing Boing

Eurovision 2013: An American in London

The technology that links taxonomy and Star Trek

  • theragman

    I’ve seen something similar done to keep the neighborhood kids from cutting through the backyard. Squirrels seem more persistent in intruding on the protected zone than the kids, but the kids spent more time testing the gun to see where its sensor range was and determining the “safe zone”. Oh, and it’s “Yakety Sax”, originally recorded by Boots Randolph.

  • Brainspore

    I bet you could also take care of that squirrel problem with an ACTUAL python.

  • chellberty

    Anybody else think after seeing the video that it would have been easier just to release a real python?

  • bkad

    More than most such stories, this one encourages me to learn more about python and arduino. This is partly because I have worked ‘computer vision guided pointing’ projects before for my job. Though we were in a different performance category (and different cost category — tens of millions of dollars of development), I understand blob tracking and identification is hard. I’m amazed so much can be done with simple hardware and publicly available code.

    I’ve been hearing good things about arduino for a while now; this is one of the first public mentions I’ve seen of Python (I’m not a sw engineer or programmer, obviously). Supposedly it is much friendlier for quickly stitching things together or for use by non-expert programmers. If true, that’s appealing to me. Whenever I’ve tried to ‘revisit’ programming (which I haven’t done outside of matlab/mathematica scripting for a long time) I’ve been frustrated by the amount of infrastructure and ‘boring but critically precise code’ needed to ‘interesting code’ to do something.

    • wysinwyg

       Yeah, you’ll probably like python.  It’s flexible, you can just do scripting or you can do more ambitious object oriented stuff.  And it’s pretty easy to get the basic syntax.

  • http://twitter.com/bazimmerman Brad Zimmerman

    Natural selection and evolution says that at some point the squirrels will not mind – or will thrive on – the squirt attacks.  Think about it – breakfast and a free drink.  And then we will have a REALLY big problem on our hands.

    Honestly, I like squirrels and animals in general, but I think short of putting the bird feeder 5 meters off the ground and at least 10 meters away from any structure (tree, house, fence), greasing the teflon-coated pole the feeder is on and putting lightly electrified chicken wire around the bottom two-thirds of the pole (if not all of it) …you’re going to end up seeing squirrels eating the bird food.  It’s a free dinner, just there for the taking.

    Made for a good bit of vid tho.

    • Fex

      I think there’s plenty of steps to take in upping the ante before you need abandon the Super-Soaker solution. Possibly the most amusing would be adding some sort of fluoro dye to the water. You get the amusement of hilarious looking punk squirrels for a while and then the removal of natural camouflage means that predators impose some natural selection pressure the other way.

      More nefarious additives to the liquid (which I’m not actually suggesting, since they’d be cruel) are left as an exercise to the reader.

    • millie fink

      I see your sad hopelessness and raise you a Yankee Flipper.

      http://www.youtube.com/watch?v=dEW9TG6Dcgg 

      • digi_owl

        Thanks for sharing, that was hilarious. Especially the contrast of the stoic announcer and the chipmunk voice-overs.

        Squirrels snacking on the bird feed, and the lengths they will go to do so, are always entertaining.

  • RJ

    Squirrels can be stopped with squirrel baffles. Baffles are simple, reliable, stress-free for the birds and won’t leave the birdseed wet and moldy.

  • Andrew Menke

    dae notice the recursive youtube video?

  • TaymonBeal

    I’m a programmer who primarily works in Python and my first reaction was still “they built a robot python”?

  • pjcamp

    That’s a lot of work just to annoy a squirrel.

    Much easier to make use of evolution. Hot peppers are thought to have evolved to prevent mammals from eating the fruits. Birds have almost no sense of taste and so chomp them on down, thereby giving the seeds wide dispersal.

    Aha! So you take your seeds and give them a light coating of spray cooking oil, toss them liberally with cayenne powder, and stick them in the feeder.

    First time I did this, the squirrel took a couple of bites, then jumped 20 feet sideways and started wiping his face on the ground.

    No more problem. Very satisfying. You can even buy super duper hot pepper just for this purpose, but regular cayenne works just fine.

    • millie fink

      It does sound like fun, but I do wonder about aftereffects in the birds’ tummies.

      • pjcamp

        Well, as I said, biologists think this is why hot peppers evolved in the first place. According the Wikipedia, “The fruit of most species of Capsicum contains capsaicin (methyl vanillyl nonenamide), a lipophilic chemical that can produce a strong burning sensation in the mouth of the unaccustomed eater. Most mammals find this unpleasant, whereas birds are unaffected.”

        If you don’t believe that, how’s about Cecil Adams?

        http://www.straightdope.com/columns/read/1857/are-birds-immune-to-hot-pepper-enabling-them-to-eat-vast-amounts-and-spread-the-seeds

        The thing is that capsaicin is only an irritant to mammals. It has to do with the actual structure of the molecule, which binds to mammalian pain receptors but not to those of birds. Other than that, it has no real biological effects.

        My birds were happy as clams. Their deposits on the lawn showed no evidence of bunghole damage.

        • http://disqus.com/Kimmoth/ Kimmo

           LOL. They know where to find some Chipotle Away.

        • millie fink

          Thanks! I just gotta trust someone who cares enough to check droppings for bunghole damage.

    • cdh1971

      This…but I think one needn’t use the oil and powder – just mix in the chilli flakes – very effective.

    • digi_owl

      And then the local squirrel population developed a taste for the spicy stuff.

  • gjpetch

    For the love of god, someone please make a kit version of this, but make it target pigeons. So much sleep lost to early morning pigeon cooing, so much time lost on cleaning pigeon poop…… the pain… the pain….

    • CountZero

      I want one of these to target the damned neighbourhood cats that come into my garden and lurk near or under the Acer with the feeders in. Firing lemon juice with hot chili powder dissolved in it.

  • miasm

    The OpenTLD that Tarantino suggests at the end is pritty kewlz.

  • CH

    Dunno… move the feeder away from the tree branches?

    • Antinous / Moderator

      Owing to the pesky effects of gravity, the feeder has to be suspended from something, and the squirrels can almost certainly climb that something.

      • Glen Able

         …leading to the logical conclusion that the feeder should be suspended from an autonomous zeppelin. 

        With an optional fiery self-destruct in the event that it does somehow get overrun.

        • wysinwyg

          Thank you for the mental image of squirrels in goggles and leather dusters brandishing cutlasses and boarding an airship.  Hopefully it will stay with me all day.

          • digi_owl

            While no goggles, there is leather:
            http://a4.ec-images.myspacecdn.com/images02/136/7e73df9b7caf4d45a3ee7fd1026da876/l.jpg

        • absimiliard

          -abs really [b]liked[/b] this response, probably because he’s in favor of autonomous zeppelins floating around backyards across the US, actually, definitely because of that, DEFINITELY  (zeppelins are awesome)

      • http://www.lightning-rose.com/ LightningRose

         Squirrels/rodents can’t climb metal poles, so moving the moving the feeder, as pictured in the video, away from the trees will do the trick.

        If the yard is too heavily forested for that, then a sheet metal disc, approx 0.5 meters in diameter, placed above the bird feeder should also work.

  • http://disqus.com/Kimmoth/ Kimmo

    This ‘problem’ makes me wish I live somewhere squirrels do.

    Aside from them being just as cute and interesting as the birds to my eye, I could have endless fun tinkering at solutions.

  • 3William56

    Got to love a geek who harnesses super soakers, AI and electronics  to solve what a few cents of plywood could do. Legend.

    Though the idea of working out “squirrelness” gives me the heebies. Uncomfortably close to the scenario in (IIRC) Robert Sheckley’s short story “Watchbird” where a squad of learning weaponised remotes are sent to discourage murder, and end up stretching the proposition to treading on an ant. How long before a passer-bye eating a peanut gets a facefull of supersoaker? Hello Skynet!

    BTW: “Yaketty Sax”, not Wacky. Unless you meant it as a description. Benny Hill will now chase you around at high speed.

  • Alan

    I purposefully feed the squirrels in my backyard.  I even bought a purpose built squirrel feeder that was difficult for birds to get into.  Why?  I dunno.  Don’t they have as much right to a free lunch as a bird?  Besides, the squirrels are permanent residents of the neighborhood.  Almost all the birds are passing through.  I’ve learned to identify a couple of the squirrels, and noted behavior patterns and personalities.  

    One problem I’ve had is I had to abandon the feeder, because there was one squirrel who would sit on it and chase away the other squirrels (the bully squirrel, who seems to bully in general and gets pissed when I’m late with the food).  So now I just throw it out into the yard, and both squirrels and birds enjoy it.

  • http://twitter.com/thelomdr LordStar AKA LOMDR

    I wonder if there is a way to do it with a airsoft repeater, Paintball marker, or with the Nerf Stampede blaster

  • http://freddiefreelance.blogspot.com Freddie Freelance

    I was hoping this was a gun that automatically fired squirrels at large constrictors… Someone please make that.

  • serpent

    What? An autonomous, turret mounted, pest-shooting sentry gun, and no Aliens reference?

  • http://www.facebook.com/peter.m.dunphy Peter Dunphy

    just add tabasco sauce to your water and you will notice a greater effect on the squirrells