I'm pretty new to working with Arduino; I'm curious if this will be possible:
I've built a simple robot using DC motors, an Arduino UNO and an ultrasonic distance finder. It senses when it is too close to walls and then turns around and goes another way. Nothing too complicated. However, I was trying to figure out a way that it could somehow record where it turns around, thereby finding the walls, and eventually mapping out a few rooms of a house.
I'm thinking DC motors won't really give me any fidelity. If i use servos, could this be done?
Any suggestions, or points to any good literature on the subject would help me out.
Your idea sounds doable, definitely. If you have encoders on both sides of the robot you can ensure straight travel, as your starting position is not guaranteed to be repeatable if there's any steering discrepancy. And you may need to have travel limits in case the robot rolls out a door.
Another idea is to have a robot with a pannable upper portion with sonic sensors and a launching mechanism. The robot launches (breakable) items in all directions (one at a time) and measures the time between launch and noise, hence determining the distance to the collision object. You could do it from a few different places in the room and at a few different heights and map more than just the walls.
Calibration would be required. And someone else's house.
I'd love to know the outcome of this project. I once built a robot with a ping sensor that displayed the robots position and surroundings on my computer, but never tried to have the robot "learn" about its surroundings.
Note that in general the distance moved by the 'bot will not exactly match the distance moved by its wheels/tracks, and over time it will end up with an inaccurate idea of where it is and which way it is pointing. Also note that mapping out an environment can take a considerable amount of data and a typical Arduino has extremely limited memory.
This does sound like a neat project. I support the catapult + penny idea for mapping the room. A less destructive method would be to use an ultra sonic sensor on a servo and have it rotate around. You will probably need to do some extra math either during or after to actually process the map, and if you wanted to make the location more accurate, look at some Local Positioning systems, and then you do not need to rely on the encoders on the wheels/motors to calculate your location. Additionally you should maybe try to have the robot try to follow along the walls so you can map the edges better, or just bounce around randomly, rather than go in reverse.
What you are wanting to do is called "SLAM" - Simultaneous Localization And Mapping:
It is far from a "completely solved" problem - but there are "partial" solutions that tend to work quite well for most environments; what you need to understand first, though, are the basics. That course above can teach you that. Make sure, though, that you have a good grounding in linear algebra and statistics/probability before you begin it (that, or spend some time cramming at Khan Academy).