Tuesday, December 26, 2006

Roomba Robots as Development Platforms

Evidently, the iRobot home robots (the Roomba and Scooba varieties, with emphasis on the former) are now being used as robotic development environments.

It makes sense. They're tiny. They're robust. They're packed with sensors and motors. On top of all of this, they've gone through a modern manufacturing process so they make for a nice little package. On top of all of this, iRobot provides a serial interface by way of a 7-pin mini-DIN on top of the unit (this pin-out is the same as an 8-pin mini-DIN, so it's not so difficult to find a cable to work with it).

How do you use all of this? Well, iRobot has a developer page to get you started. From there, you can find information about the serial command interface (SCI). From the resources there, it's pretty easy to hack together serial interfaces to get up up and running programming the internals of your robot . . .

. . . HOWEVER, RoombaDevTools has done a great deal of the work for you. The two apps that I think are the coolest are the RooStick and the RooTooth.

So RoombaDevTools gets you right up and running with documentation, hardware (including cables), and software as well as lots of other helpful stuff. PLUS most of the importnat software is either platform-independent (i.e., Java libraries made for the JVM) or provided for OS X, Windows, and more. IN FACT, a common application is to combine a Roomba with a control system built on top of a GumStix. That's WAY cool.

So there ya' go... The Roomba(+Gumstix, perhaps) -- the next affordable robot development platform.

Sunday, December 17, 2006

HyperRef Options for Proper BackReferencing with Figures Numbered Within Sections and Partial Roman Page Numbering

That's a really long title, I know.

I have a long document that has roman page numbering for its first four pages (i.e., its title page, table of contents, and list of figures). After that, the rest of the document has arabic page numbering starting at page 1 (so the first four pages of the document are i-iv, and the fifth page is page 1).

I have the option (via package amsmath)
\numberwithin{figure}{section}
turned on. This lets my figures be numbered by section (e.g., Figure 2.1).

I have backreferencing turned on (via hyperref) in my bibliography.

It turns out that hyperref won't get all of the links correct unless you massage it quite a bit. For example, page i and page 1 can get the same label (page.1) and so back references to page 1 end up getting sent to page i, which is clearly not correct. A similar thing can happen with Figure 2.1 and figure B.1; they both get labeled as figure.1 and so links to them get confused. There are lots of other pitfalls you run into as you turn on and off options to try to fix things.

Anyway, I had to dig through the hyperref and backref sources to figure out which options to set. These were the ones that I ended up needing. Things work as expected now.
\usepackage[pdfpagelabels,pagebackref,
hypertexnames=true,plainpages=false,
naturalnames]{hyperref}
NOTE: If you are producing a DVI rather than a PDF, if you want the links to work, you should probably use:
\usepackage[dvipdfm,
pdfpagelabels,pagebackref,
hypertexnames=true,plainpages=false,
naturalnames]{hyperref}
That's the same line, but the "dvipdfm" option was added in front.

You should also use pdflatex to build your document. You can pass pdflatex an -output-format dvi option to get it to produce a DVI. (note: you can also symlink pdflatex to latex to get it to produce a DVI) (ALSO: you can add -src-specials to the pdflatex line if you're into source specials)

Phew. That took a long time to figure out. I need a beer.

Tuesday, December 05, 2006

People Ain't No Good

This song was in Shrek 2?!

People Ain't No Good by Nick Cave
People just ain't no good
I think that's welll understood
You can see it everywhere you look
People just ain't no good

We were married under cherry trees
Under blossom we made pour vows
All the blossoms come sailing down
Through the streets and through the playgrounds

The sun would stream on the sheets
Awoken by the morning bird
We'd buy the Sunday newspapers
And never read a single word

People they ain't no good
People they ain't no good
People they ain't no good

Seasons came, Seasons went
The winter stripped the blossoms bare
A different tree now lines the streets
Shaking its fists in the air
The winter slammed us like a fist
The windows rattling in the gales
To which she drew the curtains
Made out of her wedding veils

People they ain't no good
People they ain't no good
People they ain't no good at all

To our love send a dozen white lilies
To our love send a coffin of wood
To our love let aal the pink-eyed pigeons coo
That people they just ain't no good
To our love send back all the letters
To our love a valentine of blood
To our love let all the jilted lovers cry
That people they just ain't no good

It ain't that in their hearts they're bad
They can comfort you, some even try
They nurse you when you're ill of health
They bury you when you go and die
It ain't that in their hearts they're bad
They'd stick by you if they could
But that's just bullshit
People just ain't no good

People they ain't no good
People they ain't no good
People they ain't no good
People they ain't no good at all

The actual lyric in the song is "But that's just bullshit baby". They left out the important "baby" in the lyrics here.