... | ... | @@ -75,7 +75,7 @@ This was caused by the Follow behavior being programmed to trigger a 'search' fo |
|
|
### Implementing the Escape behavior
|
|
|
The next step in our experiments with a behavior controlled robot was to implement a new behavior to use in the ***RobotFigure9_9***. As suggested in the lesson plan, we used the pseudocode on page 305 in [2] as inspiration for our own escape behavior. This behavior should use the two touch sensors mounted on front of the robot to avoid driving into small objects that might not be seen by the ultrasound sensor.
|
|
|
|
|
|
Initially we basically copied earlier mentioned pseudocode (without the flags). This ment, that the left - and right turn was naively implemented by powering up one motor and leaving the other. This resulted in the robot driving even more into the detected object instead of avoiding it as it turned too slow. Instead we tried to back op the unused motor as the other drove forward to make the robot turn more rappidly, which seemed to work even though the run was affected by the other behaviors as the avoid behavoir would be triggered before the escape behavior. We therefore turned off the other behaviors to observe wether the escape behavoir worked as expected. The result of the rappidly turning escape behavior with no avoid behavior can be seen in video 5.
|
|
|
Initially we basically copied earlier mentioned pseudocode (without the flags). This ment, that the left - and right turn was naively implemented by powering up one motor and leaving the other. This resulted in the robot driving even more into the detected object instead of avoiding it as it turned too slow. Instead we tried to back up the unused motor as the other drove forward to make the robot turn more rapidly, which seemed to work even though the run was affected by the other behaviors as the avoid behavior would be triggered before the escape behavior. We therefore turned off the other behaviors to observe whether the escape behavior worked as expected. The result of the rapidly turning escape behavior with no avoid behavior can be seen in video 5.
|
|
|
|
|
|
[![Implemented Escape behavior](http://img.youtube.com/vi/nINQb163pyQ/0.jpg)](https://www.youtube.com/watch?v=nINQb163pyQ)
|
|
|
*Video 5: Robot avoiding obstacles using an Escape behavior via the TouchSensor and with no Avoid behavior.*
|
... | ... | @@ -83,7 +83,8 @@ Initially we basically copied earlier mentioned pseudocode (without the flags). |
|
|
The final implementation of our Escape behavior can be found in [6].
|
|
|
|
|
|
### Motor for light sensor
|
|
|
We just changed the car movement to a new motor. We used too much power though! TODO Insert video of motorized choking of robot. Delay was 500 at first, but we changed that to 100. TODO Insert picture of motorized light sensor.
|
|
|
We rebuilt our robot and put the lightsensor on a motor, so it wouldn't have to turn its entire body when looking around. The result is shown in figure 5. We then changed the car movement to a new motor. We used too much power though! This resulted in a wicked case of robotic autoerotic asphyxiation as seen in video 6. This happened due to a delay of 500 ms. We then changed that to a 100 ms.
|
|
|
|
|
|
|
|
|
![Rebuilt motorized LightSensor](http://i.imgur.com/Ek1SRyh.jpg?1)
|
|
|
*Figure 5: Rebuilt robot mounting the LightSensor on a motor*
|
... | ... | |