Last week, I went to the San Francisco Java Meetup Group's March meetup on controlling robots with embedded Java. Shawn Silverman gave an awesome presentation/workshop where we all got to program a TrackBot first using a simulator, then using the real thing.
There's a callback API in Java for controlling the TrackBot that invokes specific methods when sensor data is emitted from the TrackBot's serial interface. Based on the sensor input, you can control each of four motors that control the robot's tracks.
Once you've written your controller program and tested it in the simulator, you have the option of plugging your computer directly into the TrackBot via a serial port (which can be made wireless using BlueTooth) or loading the program onto a very cool little embedded Java device that Sun has developed called the SunSPOT.
This was a really fun evening.
If you live in San Francisco, the San Francisco Java Meetup Group is really cool. Many thanks to the organizer, Aleksandar Gargenta, for putting together a fun and engaging Java Group in SF. The next meetup, on April 7th, is on Cuercas, Caucho's Java PHP implementation.