Using one sensor and a servo to find an object

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:

//scanner code
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

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


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s