In honor pf the one year anniversary of the Microsoft Kinect (http://buildsmartrobots.ning.com/profiles/blogs/one-year-anniversar...) I decided to write an article on how to build a Kinect based robot. This is actually the second iteration of Kinectbot (I am not a very creative robot namer), the first attempt was taller but not very stable.
Kinectbot alpha at Chitag 2010
Kinectbot beta part List:
Microsoft Kinect $149.00
iRobot Create with serial cable $129.00
Crate from Target $6.00
Assortment of Plastic tie Straps $2.00
To keep the family accountant (my wife) from realizing how much I spend on robots, I buy the parts stealthily, over time. The Netbook I used was purchased in 2008, when you could still buy a netbook from BestBuy with Linux on it. My Asus EEE 701 has a 630Mhz Intel Celeron-M processor (my Android phone has more horsepower) with 512Mb of RAM. I use a 8GB SD card for program storage. In a nut shell, it is a dog slow machine that runs Linux and Libfreenect just fine for this purpose.
The iRobot Create was a birthday gift for 2 years in a row 2008,2009. I use the create for all of my "big" robots. The iRobot Create is amazing low-cost robot base. Extremely easy to use and very versatile. You do have to be careful about balancing your robot. The Create has two drive wheels at the 90 and 270 degree positions (left and right sides), and two small roller wheels at the 0 and 180 degree positions (front and back). This leaves no support at the 45, 135, 225, and 315 degree positions. The robot tends to tilt into one of these positions if the balance is too high. I have found you are safest if you keep your robot height to about the width of the Create. The Create ships with a DB9 RS232 serial cable that is about as useful as a floppy disk now days. You will need to either buy the USB cable for the create, or use a USB to RS232 adapter. I do not recommend the rechargeable battery from iRobot. It goes bad fast. I use the green AA battery adapter that comes with the low-cost Create kit. You will go through regular AA batteries fast (use rechargeable AA batteries instead). This thing will eat 12 akaline AA batteries every four hours of lite use.
What's in the Box
The Microsoft Kinect was purchased the day it came out. At that time it came with an external 12 volt wall wart and adapter. My understanding is not all Kinects come with the power supply and adapter. This is something you need to verify when purchasing your Kinect, make sure it has an adapter and wall wart power supply. You will be cutting the wall wart off, but you will use the adapter.
Because the Kinect sensor's motorized tilt mechanism requires more power than can be supplied via the Xbox 360's USB ports, the device makes use of a proprietary connector combining USB communication with additional power. Redesigned Xbox 360 S models include a special AUX port for accommodating the connector, while older models require a special power supply cable (included with the sensor) that splits the connection into separate USB and power connections; power is supplied from the mains by way of an AC adapter. http://en.wikipedia.org/wiki/Kinect
The Kinect sucks about 1.1 Amps of current at 12 volts. This is a lot of power for a battery operated robot. A switching power supply is used to keep the voltage conversions as efficient as possible. I used some low-cost adjustable regulators from Wright Hobbies. They seem to work fine, I am a little concerned about how well they will work when the battery voltage drops as they are depleted.
The crate was actually purchased from Walmart for about $6.00. I bought it in the fall before all the kids went back to college. Anything can be used for the body as long as it is lite. You must also keep in mind the height should not be too much higher than the Create's diameter, about 14 inches. My crate is probably too big at 18 inches, although it feels stable, only carpet testing will tell.
Assembling the Robot - or - Why Tie Straps are the new Duck Tape
Kinectbot (like most of my robots) is held together by duct tape plastic tie straps. I use them for everything from structural elements, to wire ties (I think their original purpose). I buy plastic tie straps in bulk because I use them for everything around the house too.
Kinectbot assembly is relatively straight forward, as pictured below:
Kinectbot is an easy to build robot based off the Kinect and the iRobot Create. The only assembly skill required, is the ability to tighten a plastic tie strap. There was a little soldering and of-course, the software.
The software is based on the ROS branch of the Libfreenect driver. Since I started this robot a year ago, I am still using the release from December 2010. if you want to learn more about the available drivers and SDK's for the Kinect, check out my article here:
The software uses a simple algorithm I developed to look for the furthest point from the robot, that it can fit into. It basically scans a window the relative size of the robot across the image to create a depth profile. A max is then found and it's centered calculated. The robot always tries to move to the furthest point in a room.
Another version of the software follows the closest object ( between 3 and 5 feet from the robot ) around. A limitation in the Kinect requires that the robot not get too close to anything. The Kinect cannot "see" objects closer than 19". In fact, objects too close actually appear as if they are very far away. In earlier versions of the code, this caused the robot to bounce into walls a lot. this latest version solves that problem by avoiding any object less than three feet from the robot. i am thinking of adding a ultrasonic sensor to fill this hole in the data from the Kinect.