This is an older autonomous robotics platform that I was experimenting with more than a few years ago. Some people may recognize it as being based on the Parallax BOE-BOT or "Board of Education" robot. That observation will prove correct. The BOE-BOT can be a wonderful platform on which to turn your ideas into real-life robotics experiments.
I thought it would be fun to dig up some of the old photos and videos of this project so that I could document the experiment and share it with others.
Starting with the Parallax "Board of Education" (BOE) development board, I learned to integrate the Basic Stamp microcontroller with various sensors and servos. Once I felt comfortable working with these devices, I purchased the standard Parallax BOE-BOT chassis and supporting hardware. To this I added a sonar module to measure distance toward obstacles, a standard servo to rotate the sonar module, two continuous rotation servos to be used for locomotion, a digital compass, an accelerometer, a piezo speaker, and Parallax Inc's LCD AppMod module w/ integrated buttons, and a nice set of tank tracks.
Later, a Parallax PING))) Sensor was added and allowed the use of sonar for distance and ranging measurements. The PING))) Sensor can be identified by the fact that it resembles a set of "robot eyes" not unlike the classic "Johnny Five" from the movie "Short Circuit". I guess it also somewhat resembles the eyes of the more recently famous "Wall-E" robot. Either way, it is not there for decorative purposes. The module is actually extremely useful for navigating a room.
Take a look at the video on the left to watch the sonar sensor sweeping across its forward field of view to determine the distance to nearby objects.
In the past, I have experimented with Infrared (IR) sensors and have had much success. In fact, I still use them today. However, like many things, IR sensors have their shortcomings where ambient light and surface reflectivity are concerned and this lead me to decide on using sonar for this particular project. There are ways to mitigate the problems with IR but I've found that using ultrasonic emitters and detectors is a better solution for most applications. Others may find the opposite to be true. As is often said, "Your mileage may vary."

The entire platform runs on just four AA sized batteries. While the small continuous rotation servos are not the most powerful motors nor are they the fastest option for locomotion, they more than sufficed for enabling this robot to explore indoor areas including those with carpeting and uneven surfaces.

Below are three admittedly grainy videos which show the Watkins BOE-BOT navigating a living room environment. The robot was not programmed with a specific goal in mind other than random exploration. It safely roams the given space without running into objects such as walls, doors, people, and pets. Take a look at the videos to see the robot doing what it does best. Please forgive the low image quality as it was the best I could do at the time using what would now be considered an "ancient" cell phone.
Short video of the first object avoidance test.
Navigating a corner.
Robot being watched by another creature.
Thank you for visiting the site and checking out this small yet fully autonomous robot. Below is a partial parts list with links to sources. The list does not represent the exact kits or combinations of items originally purchased but you can recreate most of this project using the links below (with the exception of the LCD AppMod which appears to have been discontinued).
Check back for source code and further updates!
Parts List with Source Links
Basic Stamp 2 - http://www.parallax.com/product/bs2-ic
Board of Education (BOE) - http://www.parallax.com/product/28150
BOE-BOT Chassis - http://www.parallax.com/product/700-00022
Continuous Rotation Servos - http://www.parallax.com/product/900-00008
PING))) Sensor/Bracket/Servo Kit - http://www.parallax.com/product/910-28015a
Digital Compass - http://www.parallax.com/product/29133
Accelerometer - http://www.parallax.com/product/28017
LCD AppMod (discontinued) - http://www.parallax.com/downloads/lcd-terminal-appmod-documentation
Tank Track Kit - http://www.parallax.com/product/28106
Piezo Speaker - http://www.parallax.com/product/900-00001
BOE-BOT Starter Kit
Another option is to start with the full BOE-BOT Kit from Parallax. This may be a good starting point for a beginner if this is your first robot.
Potential Upgrades
Propeller BOE - http://www.parallax.com/product/32900
BOE Crawler Kit - http://www.parallax.com/product/30055
Build something! You can do it!