... | @@ -36,16 +36,16 @@ The program worked quite well. The robot succesfully avoided obstacles registere |
... | @@ -36,16 +36,16 @@ The program worked quite well. The robot succesfully avoided obstacles registere |
|
|
|
|
|
|
|
|
|
#### Incorpoating a 180 degree escape turn
|
|
#### Incorpoating a 180 degree escape turn
|
|
As prescribed in the lesson plan, we modified ***AvoidFigure9_3.java*** to make the robot perform a 180 degree turn when encountering a corner (i.e. when both the front distance and the side distance are below the threshold value).
|
|
As prescribed in the lesson plan, we modified ***AvoidFigure9_3.java*** [5] to make the robot perform a 180 degree turn when encountering a corner (i.e. when both the front distance and the side distance are below the threshold value).
|
|
|
|
|
|
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]
|
|
We tried changing the program by making the robot drive backwards a little when encountering an obstacle, check if it was a corner 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 (1000 ms), which wasn't enough, but when we changed it to 2 seconds (2000 ms) 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)*
|
|
*Video 2: The robot performing a 180 degree turn when encountering a corner (approximately TODO seconds in)*
|
|
|
|
|
|
|
|
|
|
### Observing the Avoid, Follow and Cruise behaviors
|
|
### Observing the Avoid, Follow and Cruise behaviors
|
|
We were provided with the program ***RobotFigure9_9.java*** [5] which implements a behavior control network incorporating three behaviors: Avoid (as described earlier), Follow (which seeks out bright light and follows it), and Cruise (which simply drives the robot forwards). Figure 3 shows a diagram of the behavior control network. We ran the program in order to observe the resulting conduct of the robot, before implementing an Escape behavior as well (next section).
|
|
We were provided with the program ***RobotFigure9_9.java*** [6] which implements a behavior control network incorporating three behaviors: Avoid (as described earlier), Follow (which seeks out bright light and follows it), and Cruise (which simply drives the robot forwards). Figure 3 shows a diagram of the behavior control network. We ran the program in order to observe the resulting conduct of the robot, before implementing an Escape behavior as well (next section).
|
|
|
|
|
|
![Behavior control network](https://gitlab.au.dk/LEGO/lego-kode/raw/master/week9/img/fig99.PNG)
|
|
![Behavior control network](https://gitlab.au.dk/LEGO/lego-kode/raw/master/week9/img/fig99.PNG)
|
|
*Figure 3: Diagram of the behavior control network of section 9.5 in [2], exluding the Escape behavior. The original diagram, including the Escape behavior, is Figure 9.9 in [2].*
|
|
*Figure 3: Diagram of the behavior control network of section 9.5 in [2], exluding the Escape behavior. The original diagram, including the Escape behavior, is Figure 9.9 in [2].*
|
... | @@ -142,8 +142,9 @@ TODO: |
... | @@ -142,8 +142,9 @@ TODO: |
|
[3] Fred G. Martin, Robotic Explorations: A Hands-on Introduction to Engineering, Prentice Hall, 2001.
|
|
[3] Fred G. Martin, Robotic Explorations: A Hands-on Introduction to Engineering, Prentice Hall, 2001.
|
|
|
|
|
|
TODO: Alle nødvendige kode-refs
|
|
TODO: Alle nødvendige kode-refs
|
|
[4] [The AvoidFigure9_3.java program](https://gitlab.au.dk/LEGO/lego-kode/blob/master/src/Lesson7programs/AvoidFigure9_3.java) *(modified)*
|
|
[4] [ TODO unmodified program ]()
|
|
[5] [The RobotFigure9_9.java program](https://gitlab.au.dk/LEGO/lego-kode/blob/master/src/Lesson7programs/RobotFigure9_9.java) *(modified)*
|
|
[5] [The AvoidFigure9_3.java program](https://gitlab.au.dk/LEGO/lego-kode/blob/master/src/Lesson7programs/AvoidFigure9_3.java) *(modified)*
|
|
|
|
[6] [The RobotFigure9_9.java program](https://gitlab.au.dk/LEGO/lego-kode/blob/master/src/Lesson7programs/RobotFigure9_9.java) *(modified)*
|
|
[TODO] [The Escape.java program](https://gitlab.au.dk/LEGO/lego-kode/blob/master/src/Lesson7programs/Escape.java)
|
|
[TODO] [The Escape.java program](https://gitlab.au.dk/LEGO/lego-kode/blob/master/src/Lesson7programs/Escape.java)
|
|
[TODO] [The FollowWithMotor.java program](https://gitlab.au.dk/LEGO/lego-kode/blob/master/src/Lesson7programs/FollowWithMotor.java)
|
|
[TODO] [The FollowWithMotor.java program](https://gitlab.au.dk/LEGO/lego-kode/blob/master/src/Lesson7programs/FollowWithMotor.java)
|
|
[TODO] [Video 1](http://img.youtube.com/vi/4Xa1ZYIT-Rs/0.jpg)](https://www.youtube.com/watch?v=4Xa1ZYIT-Rs)
|
|
[TODO] [Video 1](http://img.youtube.com/vi/4Xa1ZYIT-Rs/0.jpg)](https://www.youtube.com/watch?v=4Xa1ZYIT-Rs)
|
... | | ... | |