| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

iPaq Roomba 1

Page history last edited by PBworks 18 years ago

iPaq Roomba

Part I

Michael Menefee

 

Introduction

While the Roomba is a very capable vacuum, it holds great potential as a ready-made robotics platform. It includes a number of basic sensors one would find on a research platform, and has the potential to carry a variety of extra sensors. Further, with the addition of a high-power on-board processor, it becomes an even more capable autonomous mobile platform.

 

My approach to automating Roomba is, perhaps, somewhat over-the-top. I have added an iPaq as a controller with an advanced software framework for control. This is perhaps “smarter” than a vacuum needs to be, but I have never used Roomba as a vacuum. My ultimate goal is to build a swarm of Roombas, but in this article I will address the first step: giving Roomba a brain.

 

Photos

Here’s what we’re building

 

 

Components

Hardware

To put this system together, you’ll need a few things:

  • A Roomba with the proper firmware. See iRobot’s hacker page for details. Get the Osmo if you need it.
  • A line-level to RS-232 converter and cables. My particular design is below.
  • An iPaq with a serial cable. (the dock does have a serial port, but I would recommend purchasing a bare cable instead)
  • (Optional for most) Some sort of wireless capability for your iPaq. Some have this built in, but others require an expansion card.
  • (Optional) A CF or PCMCIA expansion sleeve for peripherals. Probably required if you need wireless.

 

Software

You’ll also need some software

 

Other stuff

You’ll need some sort of Linux environment in which to compile software. I personally use Virtual PC with a copy of Debian.

 

The Roomba

You’ll need to prepare your Roomba if necessary. Flash the firmware with your Osmo and such. Also, now would be a good time to charge the battery if the bot needs it.

 

Serial converter/power source

I built a slightly different serial converter, with the consideration of adding extra devices later.

I used:

  • A TI (PowerTrends) Interagted Switching Regulator - PT78HT205
  • A Maxim MAX233 level converter (no external caps) - MAX233
  • Board-mounted 9-pin D-SUB and 8-pin Mini-DIN sockets
  • Two filter caps, per data sheets

 

I'm having a bit of trouble getting the schematic to come out in JPEG right, so I'll update this soon. Its not too hard to hook all this up.

 

Linux-on-iPaq

Okay, now the real fun begins. Head on over to http://familiar.handhelds.org and grab a copy of the install image of your choice. A few caveats:

  • The GUI versions don’t leave much in the way of free space on the smaller iPaqs. It’s nice being able to use the stylus and an x-server, but you will end up having to remove things if you want to add software. On my h3900, I removed most of the GUI/PIM apps.
  • I personally just use the bare console version, as it leaves me with more free memory and CPU. But this is also the hardest configuration to make work, as you’ll need to disable the serial console if you want to use the on-board port for controlling Roomba.
  • BACK UP YOUR WINDOWS MOBILE IMAGE! If you ever want to give Linux the boot, you’ll want this. FOLLOW THE FAMILIAR INSTALL INSTRUCTIONS!
  • Orinoco wireless cards don’t necessarily work the first time (or at least mine don’t). You’ll need to follow these instructions.

 

Test the iPaq

Okay, so now you’ve got Linux installed. Go pick up a copy of minicom from http://ipkgfind.handhelds.org and get it installed with ipkg. Time to plug your Roomba in and test. The serial port on your iPaq is /dev/tts/0. Plug your serial converter in between the iPaq and the Roomba, start minicom at 57600 8N1 and push the power button on the Roomba. If all is well, you should see some text come up when Roomba wakes up. If not, try debugging with a desktop to determine if it’s your iPaq or the level shifter. When all is well, you’re ready to continue.

 

Development Environment

Now we need to get a way to compile programs for the iPaq. If you can’t compile on the iPaq (wouldn’t recommend it even if you could), go find yourself a copy of scratchbox and install it on your copy of Linux. I use the arm-linux-gcc3.4.cs-glibc2.3 toolchain, but I’m not certain it is the only one that works. Experiment if you like.

 

Scratchbox has a good walkthrough of their setup if you get stuck. Make sure you can compile a test program, and then you’ll want to get sbrsh set up between your Linux machine and your iPaq. Sbrsh will be necessary to compile more advanced apps. It executes code natively on your hardware, but makes it look as if it were executing at your scratchbox terminal. I used it to compile the Player server for my device.

 

Now, I happen to like Scratchbox. This probably also works just as well with another arm toolchain. I’m just lazy.

 

Compiling Player

Unzip player inside your scratchbox root, then do the usual ./configure. This will take some extra time with sbrsh, as it will be downloading code to your iPaq to execute. A helpful parameter here is the --prefix option, as you can make a player tree inside your scratchbox user directory and then tar it up and push it down to the iPaq.

 

Mike’s Roomba Driver

Now, here’s the fun part. Player-2.0.0 has a Roomba driver. I also started writing a Roomba driver at the end of last year for the 1.6.5 version of Player, which I’ve put up for download below. I have the bumpers, cliff sensors, wall sensor, and basic odometery implemented. However, mine only works with Player-1.6.5 at the moment. I’m planning on merging my code with the Player-2.0.0 code. However, if you want to use my driver, you’ll have to have 1.6.5 for the moment.

 

You can find my driver here: http://val.mnetwork.org/sci_driver.cc

 

To compile the driver, just do:

g++ -Wall -O3 -c sci_driver.cc

g++ -shared -nostartfiles -o sci_driver.so sci_driver.o

 

This will build a .so that you can use in your player config file like this:

 

driver

(

plugin "sci_driver.so"

name "roombascidriver"

provides ["position:0" "dio:0" "bumper:0"]

port "/dev/tts/0"

)

 

 

Testing

Okay, so at this point you should have a Roomba you can talk to over a network. Now, fire up the playerjoy utility and give it a shot. You should be able to move the Roomba around on command.

 

Your Turn

So there you have it. Now you can give your Roomba a brain, and that brain can be anywhere on your network. Using the Player client libraries, you can make it do all sorts of interesting things now. Go have fun!

 

Up Next

The next article will cover adding a CMUCam (or maybe an AVRCam if I can find time to build one), as well as some other useful sensors.

Comments (0)

You don't have permission to comment on this page.