... | ... | @@ -232,7 +232,12 @@ We then encountered a more serious problem. The robot would pass over the black |
|
|
|
|
|
We had issue with the gyro being triggered when starting the robot, because of the movement of the operator. This resulted in the robot thinking it was at the first corner, and would therefore turn right, after getting out of the green start zone. To solve this issue we used a time measurement to register when the program was started and only start the inner loop of the gyro sensor class when 1.5 seconds had passed. This ensured the robot would be on the slope of the ramp before measuring for bumps in the plateau.
|
|
|
|
|
|
# Iteration 4: Hard coded car with no sensors
|
|
|
After solving the issues we encountered we managed to complete first half of the run (see fig. 16). To finish the entire race course we had to fine tune the hardcoded turns for the remaining plateaus.
|
|
|
|
|
|
[![image alt text](http://img.youtube.com/vi/Jur7-QgWFoI/0.jpg)](http://www.youtube.com/watch?v=Jur7-QgWFoI)
|
|
|
##### Fig. 16: This video shows the race car robot doing the first half of the race course. It manages to turn in the first corner, but gets stuck in the next corner due to a missing hardcoded turn.
|
|
|
|
|
|
# Experiment 4: Hard coded car with no sensors
|
|
|
|
|
|
## Goal
|
|
|
Our goal with our last experiment, was to see if we within reasonable time could make a robot follow the track, without using sensors whatsoever. To do this we wanted to implement the NXTRegulatedMotor, so we could give specific commands to the two electrical motors, instead of just a power level and duration.
|
... | ... | @@ -254,7 +259,7 @@ We also did two small experiments to make sure that the mathematical theory was |
|
|
The first experiment was to see if the distance covered was the same as the circumference of the wheel:
|
|
|
|
|
|
![Car distance](http://gitlab.au.dk/uploads/group-22/lego/dee869bbcd/Car_distance.jpg)
|
|
|
##### Fig 16: The test setup for measuring the distances covered by one rotation of the motor. The arrow indicates where the robot started and the line at the wheel is where it ended after one rotation.
|
|
|
##### Fig 17: The test setup for measuring the distances covered by one rotation of the motor. The arrow indicates where the robot started and the line at the wheel is where it ended after one rotation.
|
|
|
|
|
|
We learned that the robot only covered a distance of 24,7 cm, and not 25,6 cm as it should have. Here we also noticed that the robot was slightly at an angle comparing to where it started.
|
|
|
|
... | ... | @@ -273,7 +278,7 @@ Pseudo code: |
|
|
(Stop)
|
|
|
|
|
|
![Robot race track route measurements](http://gitlab.au.dk/uploads/group-22/lego/3ad939910b/Robot_race_track_route_measurements.png)
|
|
|
##### Fig. 17 - Distance that the robot is supposed to drive.
|
|
|
##### Fig. 18 - Distance that the robot is supposed to drive.
|
|
|
|
|
|
## Results
|
|
|
|
... | ... | @@ -283,7 +288,7 @@ Likewise, any changes in the environment (track) will almost certainly result in |
|
|
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.
|
|
|
|
|
|
|
|
|
##### Fig. 18 - video showing the “proper” run (featuring Rasmus as assistance)
|
|
|
##### Fig. 19 - video showing the “proper” run (featuring Rasmus as assistance)
|
|
|
|
|
|
|
|
|
Pros
|
... | ... | @@ -294,7 +299,7 @@ Quick to program |
|
|
Unreliable
|
|
|
Predictable (to some point)
|
|
|
Slow
|
|
|
Fig. ?? - Pros and cons of hard coding a robot for racing
|
|
|
##### 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.
|
|
|
|
... | ... | @@ -321,4 +326,12 @@ During this last experiment, we learned that there are many shortcomings of hard |
|
|
|
|
|
## References
|
|
|
|
|
|
[1] Behavior pattrn: Jones, Flynn, and Seiger, "Mobile Robots, Inspiration to Implementation", Second Edition, 1999, http://legolab.cs.au.dk/DigitalControl.dir/NXT/Lesson7.dir/11128_Mobile_Robots_Inspiration_to_Implementation-Flynn_and_Jones.pdf |
|
|
\ No newline at end of file |
|
|
[1] Behavior pattrn: Jones, Flynn, and Seiger, "Mobile Robots, Inspiration to Implementation", Second Edition, 1999, http://legolab.cs.au.dk/DigitalControl.dir/NXT/Lesson7.dir/11128_Mobile_Robots_Inspiration_to_Implementation-Flynn_and_Jones.pdf
|
|
|
|
|
|
[2] PID controller: J. Sluka, http://www.inpharmix.com/jps/PID_Controller_For_Lego_Mindstorms_Robots.html
|
|
|
|
|
|
[3] Autonomus robots: http://en.wikipedia.org/wiki/Autonomous_robot
|
|
|
|
|
|
[4] Alle code:
|
|
|
|
|
|
|