I found a nice algoritm for locating an object from a robot using a servo and a Sharp-sensor at the Society of Robots . The code is written by John S. Palmisano for his mini-sumo Stampy. It finds an object and continously regulates the robot into that object (which is good for e.g. sumo robots). The pseudocode for this algoritm is as follows:
if sharp IR detects object
scanning IR turns left
else //no object detected
scanning IR turns right
//robot motion code
if scanner is pointing far left
robot turns left
else if scanner is pointing far right
robot turns right
else //scanner pointing forward
robot drives straight
I actually implemented this on a project of my own, called Wagg-E (you can view some info on it at my not very active blog at sterna.crf.nu).
Link to the project mentioned Stampy the Sumo robot. It’s a very nice project in at the whole, and it gives some good ideas for a sumo robot.
/Erik Sternå in group F