@@ -175,7 +175,7 @@ Implement the Escape behavior in the RobotFigure9_9.java program.
...
@@ -175,7 +175,7 @@ Implement the Escape behavior in the RobotFigure9_9.java program.
#### Plan:
#### Plan:
We impelemented the escape behavior as suggested by Jones, Flynn & Seiger [3]. The code is seen in Fig.9. Note the bumpCheck() method which is run at the start of every loop. This method checks if the car has bumped in to an object. If contact is made, the car checks which side have made contact and drives back and turns in the opposite direction of the contact.
We impelemented the escape behavior as suggested by Jones, Flynn & Seiger [2]. The code is seen in Fig.9. Note the bumpCheck() method which is run at the start of every loop. This method checks if the car has bumped in to an object. If contact is made, the car checks which side have made contact and drives back and turns in the opposite direction of the contact.
```
```
import lejos.nxt.*;
import lejos.nxt.*;
...
@@ -247,3 +247,6 @@ The car behaves as expected. It starts driving according to the light readings,
...
@@ -247,3 +247,6 @@ The car behaves as expected. It starts driving according to the light readings,
### References:
[2], Jones, Flynn, and Seiger, "Mobile Robots, Inspiration to Implementation", Second Edition, 1999.