Making it smarter
Recovering from unknown obstacles


In this assignment, the robot was to
be given the capability of reaching
the ramp through several unexpected
obstacles on its way. These obstacles
could be either inanimate objects or
other moving robots. Three bumpers
(the horn-like features located on the
front) were then attached to this
robot to sense for collisions.


The bumpers are implemented with very simple electronics: a circuit is closed when clicked upon, and open when released. This returns to the onboard computer the values of 1 or 0, respectively, which then can be processed by the robot's program. Lego pieces were attached to extend the reach of the bumpers to the sides and on the front.

If the robot happens to bump into something, the algorithm of recovery contemplates the posibility that the newly found obstacle could be another robot that is navigating through the board, and therefore the first reaction is to back away a few centimeters and try again. If after trying twice the obstacle is still there, the program assumes that whatever the obstacle is, it is not going to move. The course of action then is turning around and attempting to find another route to the ramp. Since the whole body of the robot spins around an axis located at the front during the turn, the program assumes it easier to turn around by moving the tail in the direction opposite to the side where the obstacle was felt.

The intersection shown in the picture to the right is one of the trickiest places in this simulated environment. The line at a straight angle (to the right side of the robot) leads directly to the ramp, whereas the other (pointing downwards in the picture) leads back to the starting points. Although in this prototype this is very much battery - dependent, the program attempts to always make the right decision by using the difference in angles as a reference.

 

When the robot finally reaches the ramp, the side bumpers are also useful in case it happens not to be completely aligned as it is climbing. Bumping into a wall during ascent triggers a mechanism similar to the one used to track the line, letting the robot know that it needs to adjust its trajectory. Again, when it reaches the center, the progrgam stops.

 

The Interactive C code developed for this assignment is presented here.

Return to introduction


Alejandro J. Trejo
University of Texas at El Paso
Last update: 09 Apr 1999.