... | ... | @@ -49,6 +49,8 @@ |
|
|
>
|
|
|
> As an extension we also tested the sensor in a setting where the two colors to be distinguished were closer to each other. For this purpose we chose green. The table shows that the sensor generally has a hard time differentiating the green colors regardless of the surface. However it seems to be possible under bright light settings with a paper surface and under dark settings with a plastic surface. It is interesting that the "green difference" changes from nothing (0) to 4 when changing the surface under dark settings. The reason for this behavior might be that plastic has a better capability to reflect the light from the color sensor due to it's reflective surface.
|
|
|
>
|
|
|
>---
|
|
|
>
|
|
|
>## Exercise 2: Line Follower with Calibration
|
|
|
>
|
|
|
>#### Task
|
... | ... | @@ -57,9 +59,9 @@ |
|
|
>
|
|
|
>#### Result!
|
|
|
>After running the LineFollowerCal.java we observed that it runs fine along a black line but as soon it encounters a different color eg. green or grey it starts spinning uncontrollably. This is partly due to the program only distinguishing between black and non-black colors. This means that whenever the robot encounters a color different from black it will diverse from its course. From this point it might not detect black colors even though it drives over a black line due to its sample interval of 10ms. This interval makes the robot detect colors once every 10ms and all other time it is blind to it's surrounding meaning that we cannot be sure that i makes a reading as it drives over black.
|
|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
>---
|
|
|
>
|
|
|
>## Exercise 3: ThreeColorSensor with Calibration
|
|
|
|
|
|
>
|
... | ... | @@ -75,7 +77,10 @@ |
|
|
>During the initial testing, we found that the program would work as intended with the robot driving right when the light sensor read a low (dark) value and left when the light sensor read a high (light) value. The problem occurred when the light sensor settled on the border between the black line and the white space around it within a few seconds. This meant that the reading it got was a median value between the high and low color thresholds. The resulting combined value was too similar to the light value for the color green. This meant that the robot saw this value as green in the code and stopped as was intended when it read a similar light value for the real color green.
|
|
|
> ![3](http://gitlab.au.dk/uploads/group-22/lego/a4841d7341/3.png)
|
|
|
|
|
|
>From this exercise we can conclude that the light sensor is not very useful for navigating based on following specific lines of specific colors, as the way that the light sensor works
|
|
|
>From this exercise we can conclude that the light sensor is not very useful for navigating based on following specific lines of specific colors, as the way that the light sensor works
|
|
|
>
|
|
|
>---
|
|
|
>
|
|
|
>## Exercise 4: Line Follower that stops in a Goal Zone
|
|
|
>
|
|
|
>
|
... | ... | @@ -106,6 +111,20 @@ |
|
|
>#### Result!
|
|
|
>As can be seen in the video (??), the ThreeColorSensor program makes the robot follow the black line oscillating in small turns between the black and the white areas untill it enters the green area. >The movement is not very smooth however,
|
|
|
>
|
|
|
>---
|
|
|
>
|
|
|
>## Exercise 5: PID line follower
|
|
|
>
|
|
|
>#### Task
|
|
|
>It is possible to make a line follower with just one light sensor that follows the line more smoothly and drive faster if a PID regulator is used?
|
|
|
>
|
|
|
>#### Plan
|
|
|
>
|
|
|
>
|
|
|
>#### Result
|
|
|
>
|
|
|
>---
|
|
|
>
|
|
|
>## Exercise 6: Color Sensor
|
|
|
>
|
|
|
>#### Task
|
... | ... | |