Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Roomba + Wii remote + Perl = Awesome

Posted by timothy on Tue Dec 26, 2006 09:48 PM
from the when-buzzword-compliance-is-a-good-thing dept.
Anonymous Wii Lov'n Coward writes "Check out the WiiRoomba, a mashup using a Wii remote, a perl script, and the Darwiin Remote software. While a little sluggish to respond, the Roomba is entirely controlled by the Wii remote accelerometers." All of the source code to do it yourself is available at the site linked, along with a youtube video of how it works.
+ -
story
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • Strange (Score:5, Funny)

    by Cytlid (95255) on Tuesday December 26 2006, @09:53PM (#17373082) Homepage
    This is like an odd parallel universe movie where a younger Matt Damon controls his vacuum with a remote control.
  • Cool hack, but (Score:5, Insightful)

    by Oddster (628633) on Tuesday December 26 2006, @09:53PM (#17373084)
    Isn't the point of the Roomba that it doesn't need control?

    Although I suppose it would be really useful if you added a servo arm, and could use the contraption to get yourself a beer without leaving your chair.
    • Re: (Score:2, Interesting)

      I can't wait to set this up for some sort of battle bot. Just rip the servos, etc out of the roomba and put them on a battle bot or RC truck. RC plane would be neat, but I think BT tops out at 30 ft or so.
      • Re: (Score:3, Informative)

        It goes crazy in every house. That's how it works. It's essentially random (yes, it does have some heuristics, but it doesn't measure your place and then calculate a path to vacuum everything), but eventually, it'll have vacuum'd every space simply because it keeps on going and going.
  • by creimer (824291) on Tuesday December 26 2006, @09:53PM (#17373088) Homepage
    It should be "People who have too much time on their hands" department. :P
  • Spoiler (Score:5, Funny)

    by Nerdfest (867930) on Tuesday December 26 2006, @09:54PM (#17373090)
    It sucks.
  • by neurocutie (677249) on Tuesday December 26 2006, @09:56PM (#17373108)
    Cool hack, but better than just a regular RC joystick controller ???
  • sucks alot. But good work on the Wii remote!
    • Re: (Score:3, Interesting)

      Interestingly enough, the Roomba DOESN'T "suck alot<sic>." In fact, it doesn't use a low pressure area at all, but relies solely on brushes to pick up any unwanted particulate matter on the floor.

      Bill
      • That's not true; the Roomba has a vacuum in addition to the brushes. The stuff it sucks up is "stored" underneath the filter (and is why the Roomba needs a filter to begin with).
  • Good Will (Score:5, Funny)

    by huper (568138) on Tuesday December 26 2006, @10:05PM (#17373162)
    My boy is wicked smart!
  • Out of curiosity, why use a language like Perl to do something dynamic like this? I'm no code jockey, but I always thought that Perl was meant for run-it-once type applications that handle things like text processing and database searching. Wouldn't Java be better suited for this?
    • Re: (Score:3, Informative)

      I'm no code jockey, but I always thought that Perl was meant for run-it-once type applications that handle things like text processing and database searching.
      Well then you would be wrong. Perl can be used for anything. In fact, the hard core Perl coders write video games in Perl.
    • Re:Why Perl? (Score:5, Insightful)

      by FooAtWFU (699187) on Tuesday December 26 2006, @10:16PM (#17373236) Homepage
      Hey, look at the code. The important bits seem to be like

      printf $roomba "\x89%c%c%c%c", $vh,$vl,$rh,$rl;
      Elsewhere, they seem to be communicating with another application through a named pipe. Text processing and the UNIX philosophy: Perl at its finest.
    • Re:Why Perl? (Score:5, Insightful)

      by Nasarius (593729) on Tuesday December 26 2006, @10:20PM (#17373264)
      Out of curiosity, why use a language like Perl to do something dynamic like this? I'm no code jockey, but I always thought that Perl was meant for run-it-once type applications that handle things like text processing and database searching.
      The question is valid, but the nonsensical rambling that follows detracts from it. So I'll just say that modern scripting languages like Perl, Python, or Ruby can do just about anything but systems programming. In fact, they are perfect for doing what the summary seems to describe: taking the output from one program, parsing it, and sending instructions to another program.
    • Re:Why Perl? (Score:5, Informative)

      by bockelboy (824282) on Tuesday December 26 2006, @10:31PM (#17373348)
      Wouldn't Java be better suited for this?

      No offense, but Java would be a particularly bad choice for this application. The real work done here is "gluing" two things together at a system level - the Roomba program and the Wii program. Java is uniquely miserable at interacting on the system level. Where Java excels is object-oriented architectural design and huge enterprise-level programs.

      So, if you want a scalable application server, use Java. If you need to tie two programs together, use a scripting language like Python or Perl. If you know you can limit yourself to a Unix shell environment, Perl may be best (and this is from a Python junkie!)
      • Re: (Score:2, Insightful)

        Perl is no more difficult to maintain than any other language.

        Bad code is bad code, and bad code is difficult to maintain. Good code is good code and is generally maintainable.

        Writing good code in Perl, just like any other language, is left up to the programmer.

        (And, I know of more than a few large, well-maintained systems written in Perl.)
        • Hey, maybe he's trying to say Perl coders write bad code.

          (Fight! Fight! Fight! Fight! Fight!)

          No, seriously. Your point's correct - but the reason perl is often hard to maintain (not always) is that often times, a perlscript is written as either a hack to an existing system (such as in this article), or as a quick-and-dirty script to get something to happen.

          I usually think of Perl as system bailing wire, and Bash as computer bondo. You can build great, workable things with both, but there are tools with be
  • ... but they didn't. Because the whole point of the Roomba is that you don't
    need to control it.

    And why is this "awesome"? Is the Wii remote better than a standard joystick
    remote (like those used for RC cars) for this application?

    • by mccalli (323026) on Tuesday December 26 2006, @10:27PM (#17373316) Homepage
      ... but they didn't. Because the whole point of the Roomba is that you don't need to control it.

      No and yes, in that order. My Roomba certainly came with a remote control that can steer the device, but I've never found a need to use it. However, I still appreciate this hack for what it is - a spot of fun done just because you can.

      Cheers,
      Ian
    • My roomba discovery came with a remote, and I swear the only reasons my sisters come over any more is to "clean" using the roomba w/ the remote. It's useful for the occasional shutdown when it's too loud, but other than that, you can't even issue the park command with the remote - and there's no reverse!
  • by gijoel (628142) on Tuesday December 26 2006, @10:21PM (#17373274)
    Before they REBEL! [youtube.com]
  • by fm6 (162816) on Tuesday December 26 2006, @10:23PM (#17373294) Homepage Journal
    You're tired of vacuuming by hand, so you buy a robot vacuum that works all by itself. Then you add a clever hack that allows you to control the robot vacuum just like the manual vacuum you had before...
  • by popo (107611) on Tuesday December 26 2006, @10:24PM (#17373302) Homepage

    (sorry. I couldn't help it.)
  • "mashup" (Score:5, Insightful)

    by sinserve (455889) on Tuesday December 26 2006, @10:36PM (#17373374)
    What is this trendy-word shit? MASHUP? Who the fuck came up with this word? In multimedia we already had "remixing" and "sampling".

    Hardware and software can not "mashup", they're "coupled" or "integrated" in manager-speak, but in honest everyday speak hardware is "driven" or "controlled" or "interfaced" with software.

    It could have been "controling roomba with wii remote". Perl would never show up in the headline because software drivers are no often given banner credit. They're expected to work.

     
  • by Anonymous Coward
    The word you're looking for is "hack."

    Web 2.0. Blogosphere. Mashup. Digital Rights Management. Is our culture so completely saturated with marketer-speak that now -everyone- feels compelled to use bullshit terms like these in place of normal words with established meanings? People, we need to stop talking like boners.
  • Envy (Score:2, Insightful)

    Come on, people. He did something we would never think of doing. Regardless of which object and what purpose the object which he controlled has, in my humble opinion it is well done. He got Slashdotted, we did not.
  • by RalphBNumbers (655475) on Tuesday December 26 2006, @11:08PM (#17373506)
    Taking this hack a step farther:

    Since Roombas can be made to connect to computers via bluetooth adapters [makezine.com], it stands to reason that if they are sufficiently programable, they could be made to respond directly to the Wiimote via bluetooth, without a Mac playing middleman. This might even eliminate a lot of the the lag the story mentions.
  • by 93 Escort Wagon (326346) on Tuesday December 26 2006, @11:10PM (#17373510)
    So, for the cost of the Roomba, the Wii, and a computer (so let's say, what, $1500?)... he's basically duplicated my $100 Hoover vacuum. Except my Hoover is more responsive to its handle than the Roomba is to the Wii remote.

    (Of course it is cool nonetheless...)

  • What's with all the Wii math today? Something + Wii = Something Else

    Dan East
  • New word! (Score:3, Funny)

    by Duncan3 (10537) on Tuesday December 26 2006, @11:19PM (#17373548) Homepage
    So is "mashup" the hip new word for "programming"?

    I guess if programming is something 3rd world starving people do for $0.50/day, we need a new word.

    I better get back to mashing, hahahahahah

  • by Myria (562655) on Wednesday December 27 2006, @12:12AM (#17373802)
    Be glad that Nintendo didn't go the route of Microsoft and do a challenge-response to authenticate the console to the controller and the controller to the console.

    Melissa
  • Seriously, this word does not make sense, at least in this context. I am not trying to troll, but I would appreciate it if someone could explain it's exact meaning.

    In English (okay, British/standard English) "mash" means to scramble or grind something, e.g. mashed potato or papier mache. In the context of technology, it makes no sense as generally mashing implies that the thing being mashed becomes paste like, or mashed. To describe a car as mashed, is to imply it has been crushed and bent out of shape to t
  • by bigsam411 (1043552) on Wednesday December 27 2006, @01:07AM (#17374044)
    They designed this so that when people throw their Wiimotes at televisions while playing Wii Sports, the Roomba will go clean up the glass shards.
  • by sdcharle (631718) on Wednesday December 27 2006, @10:41AM (#17376910) Journal
    I attached a handle to my roomba so I can control it by hand.
    • Re: (Score:3, Informative)

      The sensor bar is kind of confusingly named. The bar itself doesn't actually sense anything. It just has 2 ir emitters, the same type in your average tv remote. The wiimote picks up the signals from the emitters to find out where it is in relation to your TV. People have reportedly been successful in substituting 2 candles for the "sensor" bar. The bar does plug into the nintendo, but since the wire simple provides power, some minor hackery will allow you to plug it into an ordinary wall socket.
    • I hope that was purposeful. An infrared transmitter is not usually a laser, just an LED below the visible light spectrum.