Tuesday, March 6, 2012

iRobot + Kinect + Java

A while back I bought iRobot Create, the vacuum cleaner without the cleaning part, under the pretense that Pete will learn to do more interesting programming with it.  Secretly, I myself wanted to do a little programming with a robot, and didn't want to start from scratch.  The vacuum cleaner seams to be the right equipment to start.  We got the command module with iRobot and was able to program it to do simple things.  But we wanted more.  We want it be able to see with a webcam, or maybe Kinect.

iRobot has a serial port the can communicate with outside world, say, a light laptop.  The choice of programming language is Java.  I decided that C++ is unnecessarily difficult for a teenager as a starting programming language.  I have to confess that I prefer Java to C++ for my day job, too.  We got a laptop running Windows XP to communicate with it.

The laptop can detect simple printed signs, such as "L30", "R90", for "turning left 30 degree" and "turning right 90 degree", respectively.  The programming using simple computer vision algorithms which I develop for my day job.

I really want get away from Windows, and use Linux, instead.  The combination of Linux+Java+serial port was not easy at first.  After many long searches, I settled with RXTX, an open source package for Java serial port programming.  It turns out that you don't have compile the package from the source.  It's ready to be installed for Ubuntu.  My combination of Linux+Java+serial is working smoothly now.

I got Kinect working under Windows 7 Ubuntu 10.10 with OpenNI, but I am running Ubuntu 11.10.  I am not sure I should wait for Kinect with OpenNI ready for 11.10, or downgrade to 10.10.  So many things to do, so little time.

No comments:

Post a Comment