Enclosure Escape Using Bumper and Reactive Control
Benjamin Leib

Introduction:
The problem for this exercise is to program the robot to escape any enclosure using only its two bumpers as sensors. This limited sensory data and the lack of odometric data means makes a deliberative system almost impossible—while in theory it might be possible to develop an internal map based on where obstacles were encountered, in practice it is impractical. Thus the controller for this exercise must be primarily reactive. This presents the interesting challenge of developing a reactive system which, given only the barest minimum of knowledge of its state, is capable of achieving an end goal.

Approach:
Our approach to solving this problem is to use a wall-following algorithm to navigate around the walls of the enclosure until the exit is reached. We arrived at this approach after investigating several less successful approaches which led us to believe that wall-following would be the most effective algorithm. Our algorithm is to begin moving in a slight curve (with both forward and rotational velocity) when the program is started. When one of the bumpers is depressed, the robot spins to the direction opposite the depressed bumper until the bumper is no longer depressed, at which point it begins to curve in the direction of the formerly depressed bumper. This creates a pattern where the robot effectively bounces along walls.

In order to prevent the robot from getting caught in a loop, for instance by following the inside walls of a square enclosure while missing the exit at each loop, we randomize how much the robot curves after hitting a wall. This non-deterministic behavior ensures that, given enough time, the robot will eventually bump the walls of the enclosure at every possibl e point, thus ensuring that the exit will eventually be found. In order to prevent the robot from getting caught going in a circle without contacting any walls (for example if it is started in the middle of a large enclosure), the amount the robot curves decays the longer the robot goes without contacting a wall. Thus, if placed in a large empty space, the robot will slowly spiral outwards, eventually going in a straight line until it encounters a wall.   

Results:
Despite its simplicity (the main body of our program consist of only about 20 lines of C++ code), our algorithm exhibited a great deal of success in achieving its goal. To test it, we ran three experiments, conducting three trials of each. Each experiment varied only in the structure of the enclosure—the physical robot and its controlling software was the same across all experiments. For each trial we counted the how many times the robot’s bumpers were depressed and we timed how long it took to escape the enclosure.

Experiment 1 involved the robot being placed at the end of a long, narrow hallway, initially positioned perpendicular to the hallway. Experiment 2 involved the robot being placed in small rectangular box with an exit taking up about a third of the width of one of the walls. The robot was initially placed in one of the corners between a side wall and the wall opposite the exit. Experiment 3 involved the robot being places in a larger rectangular box with a slightly larger exit. For this experiment the robot was initially placed facing into a corner of one of the side walls and the wall with the exit in it. (See the embedded videos for a better idea of the experimental setups). For the most part the robot performed consistently fast for all of these trials, with the one exception of the small box enclosure, where the small size of the exit caused the robot to miss it several times as it circled the enclosure. However, the randomness of the algorithm combined with its persistent cycling around the walls ensured that it did eventually escape.

 

Time to Escape

Number of Bumper Hits

Experiment 1

 

 

Trial 1

0:12

3

Trial 2

0:11

3

Trial 3

0:12

3

Experiment 2

 

 

Trial 1

0:18

6

Trial 2

0:19

6

Trial 3

0:17

5

Experiment 3

 

 

Trial 1

0:36

12

Trial 2

0:40

14

Trial 3

2:20

44

Conclusion:
Our algorithm successfully navigates its way out of a wide variety of enclosures using a wall-following approach. In doing so, it demonstrates that even with extremely limited sensory input, it is possible to program a robot using a reactive control system to accomplish fairly sophisticated tasks, even when the task’s goal is not explicitly known to the robot. Our robot performed consistently and well in almost all of the enclosures we put it in, even escaping the robotics lab itself several times. Even when it did miss the exit in its first time around, it eventually would reach it.
However, this is far from the most efficient manner possible of accomplishing such a task. Had we been able to use the robot’s camera or some kind of range-finder, it would have been possible to create a much faster system capable of mapping out its environment or at least recognizing where the exit was, which would have allowed for much better path-planning.

Appendix A- Videos:

Experiment 1

Experiment 2

Experiment 3