I've been working on an autonomous mobile robot that trundles about the floor, using the standard ultrasonic sonar to navigate. The sonar is on a motor turret , so it scans across an arc in front of the robot. There are also bump switches in front, in case the sonar misses anything.
The robot communicates with base computer (my laptop!) via bluetooth , sending back it's position, orientation, and sonar soundings. These are used to produce a map, which is updated live when an event (eg a sonar sounding) occurs.
The robot uses SimpleNavigator to navigate.
It's much clearer if you look at the pictures below.:
Here's a picture of the robot:
Here's a picture of the mapping program in action.
Circles are the robot's position
Dark blue lines in the circle show the orientation
Dotted lines show the path of the robot.
Magenta dots are sonar readings.
The above map shows it trundling about the edge of my kitchen.
Reasonably accurately, as it's on lino which doesn't seems to slip much, and it hasn't been going long enough for positional error to accumulate. Of course , the further it travels, the less accurate it gets.
I can share the source code, if anyone's interested. But I warn you, I haven't put it in an easily distributable format yet!
I need to think of a name for the robot!