... | ... | @@ -88,7 +88,7 @@ As an addition to the sensors mounted in the front of the car, we decided to mak |
|
|
##### Fig. 7: Shows the flexible front mount on the robot. By implementing this feature we made sure that the sensor keeps the same distance to the ground throughout the course.
|
|
|
|
|
|
#### Driving using light sensor and PID control
|
|
|
The attached light sensor was used to follow the black line along the racetrack. We used the sensor readings to implement a PID-controller in order to follow the line smoothly. In lab lesson 4 we created a PID-controller for a line follower robot which we decided to reuse in this case (code snipped fig. 7).
|
|
|
The attached light sensor was used to follow the black line along the racetrack. We used the sensor readings to implement a PID-controller in order to follow the line smoothly. In lab lesson 4 we created a PID-controller for a line follower robot using J. Sluka [2] which we decided to reuse in this case (code snipped fig. 7).
|
|
|
|
|
|
```
|
|
|
while (! Button.ESCAPE.isDown())
|
... | ... | @@ -287,18 +287,14 @@ When running this way, the robot is far from reliable, since the smallest error |
|
|
Likewise, any changes in the environment (track) will almost certainly result in a failed run. We encountered dust and dirt at some point on the track, which made one of the wheels spin out. This made the robot drive off at a slight angle, something that made it drive off the track on the way down again.
|
|
|
Theoretically the fastest possible run for this rigid type of hard coded approach would be 27 seconds, but the robot itself is not able to accelerate accurately at that speed (x3), as one wheel often spins out. This is because of lack of grip of the cheap rubber tyres and the robot trying to accelerate instantly to the required speed.
|
|
|
|
|
|
|
|
|
[![image alt text](https://youtu.be/k87g1pU_4cc)
|
|
|
##### Fig. 19 - video showing the “proper” run (featuring Rasmus as assistance)
|
|
|
|
|
|
|
|
|
Pros
|
|
|
Cons
|
|
|
Quick to build
|
|
|
Inflexible
|
|
|
Quick to program
|
|
|
Unreliable
|
|
|
Predictable (to some point)
|
|
|
Slow
|
|
|
| Pros | Cons |
|
|
|
| -------- | -------- |
|
|
|
| Quick to build | Inflexible |
|
|
|
| Quick to program | Unreliable |
|
|
|
| Predictable (to some point) | Slow |
|
|
|
##### Fig. 20: Pros and cons of hard coding a robot for racing
|
|
|
|
|
|
During this last experiment, we learned that there are many shortcomings of hardcoding a robot to drive a specific track. Even though the perfect way through a track is known, there will always be uncertainties and small differences in the beginning of the run can cause big trouble in the end.
|
... | ... | |