... | ... | @@ -40,7 +40,7 @@ As prescribed in the lesson plan, we modified ***AvoidFigure9_3.java*** to make |
|
|
|
|
|
We tried changing the program by making the robot drive backwards a little when encountering an obstacle and then spin around 180 degrees (by making one motor drive forward and the other drive backwards). Initially we made the robot perform the 180 turn for 1 second (1000ms), which wasn't enough, but when we changed it to 2 seconds (2000ms) it spun approximately 180 degrees. [TODO: video description]
|
|
|
|
|
|
![Improved avoid behavior](http://img.youtube.com/vi/Um4zjVYArJ0/0.jpg)](https://www.youtube.com/watch?v=Um4zjVYArJ0)
|
|
|
[![Improved avoid behavior](http://img.youtube.com/vi/Um4zjVYArJ0/0.jpg)](https://www.youtube.com/watch?v=Um4zjVYArJ0)
|
|
|
*Video 2: The robot performing a 180 degree turn when encountering a corner (approximately TODO seconds in)*
|
|
|
|
|
|
|
... | ... | @@ -52,7 +52,7 @@ We were provided with the program ***RobotFigure9_9.java*** [5] which implements |
|
|
|
|
|
Running ***RobotFigure9_9***, the robot would stop and turn to both sides every time it was bothered by either an obstacle or light, in the same manner as with ***AvoidFigure9_3***. It was hard to distinguish whether it was reacting to light or an obstacle, as the resoponses looked the same. Later, a closer look at the code confirmed that the behavor implementations were similar, in that they both sought in the direction of the higher value (of either light reading or distance). [TODO: beskrivelse af video]
|
|
|
|
|
|
![Avoid follow cruise](http://img.youtube.com/vi/2qxAJpQgZMM/0.jpg)](https://www.youtube.com/watch?v=2qxAJpQgZMM)
|
|
|
[![Avoid follow cruise](http://img.youtube.com/vi/2qxAJpQgZMM/0.jpg)](https://www.youtube.com/watch?v=2qxAJpQgZMM)
|
|
|
*Video 3: The robot running with three behaviors: Cruise, Follow, and Avoid*
|
|
|
|
|
|
After the initial observations, we ran the robot with modified versions of the program. First, with only the Cruise behavior included - in this case, the robot simply drove forward without responding to any stimuli. When including the Follow behavior, unsurprisingly the robot responded to a lit smartphone torch being near it but remained unaffected by other stimuli such as a box standing in its way.
|
... | ... | |