@@ -102,7 +102,7 @@ In order for the car not to stop on a transition from black to white (or white t
The car was set to stop only if the green color was sampled 20 times in a row.
This means that the color should be green in $20 * 10 ms = 200 ms$ before the car stops.
A video of the exercise is found in [5].
A video of the exercise is found in [6].
```java
intgreenCount=0;
...
...
@@ -180,7 +180,7 @@ By repeatedly tuning the parameters we ended up with the optimal setting of:
| Kd | 0 |
| Tp | 90 |
A video of the end result is seen in [6]. This video shows the LEGO car following the black oval line. Even though the car do not deviate from the line the motion could be more smooth. Given the timeframe of the exercise we did not have time to tune the setting or the parameters further. The complete code for this exercise is found in [2]
A video of the end result is seen in [7]. This video shows the LEGO car following the black oval line. Even though the car do not deviate from the line the motion could be more smooth. Given the timeframe of the exercise we did not have time to tune the setting or the parameters further. The complete code for this exercise is found in [2]
### Exercise 6, Color Sensor
...
...
@@ -195,6 +195,16 @@ The color sensor seems to be very dependent on the distance to the target, as ve
In addition to this, it also seems to be dependent on the curvature of the target object.
A line following application with PID control and which was able to stop when reaching a green surface was implemented, and the source code can be found in [5].
The ability to stop on the green surface worked well, even though the car entered the green zone slightly.
15 consecutive green color measurements are needed in order for the stop condition to be fulfilled, and hence the car did not stop right away.
The reason for this implementation was to avoid a random green color measurement stopping the car to early.
The line following performance of the car was however poor.
When following a straight line like shown in [8], the car would follow the line with minor deviations from the line.
However we also tested the line following on an elliptical line, where the car was not able to consistently follow the line, even at rather slow speeds.
We believe the reason for this could be the high fluctuations in the light value sensor readings even when staying above the same color.
## Conclusion
...
...
@@ -208,8 +218,12 @@ In addition to this, it also seems to be dependent on the curvature of the targe