|
|
# Group-22: Lab Notebook 8 - Robot Race
|
|
|
|
|
|
#### Date: 05/05/2015
|
|
|
|
|
|
#### Group members participating:
|
|
|
* Christian Bonde Andersen
|
|
|
* Nikolaj Cilleborg Haulrik
|
|
|
* Rasmus Meldgaard Petersen
|
|
|
* Jesper Kurtzmann Svith
|
|
|
|
|
|
#### Activity duration: (6+7+7+? )*4
|
|
|
|
|
|
Introduction
|
|
|
In this lab session the overall goal is to build and program an autonomous LEGO robot [http://en.wikipedia.org/wiki/Autonomous_robot] that can complete a course (fig ??) as fast as possible. The robot starts in the green zone at the bottom. Then it goes up the ramp and turns at the top before it goes back down the ramp and finishes in the green zone.
|
|
|
|
|
|
|
|
|
|
|
|
#####Fig 1; The course of this weeks lab session, “The Alishan train track”.
|
|
|
Our approach to this lab session is to try different approaches and methods to complete the course instead of just making one robot and optimizing it the best way possible. To do this we make four different experiments:
|
|
|
The first experiment is to construct a high speed robot using a gearing system that can quickly accelerate the robot up the ramp.
|
|
|
The second experiment is to use a light sensor and a PID controller to guide the robot up the ramp along the black line.
|
|
|
The third experiment uses a behavior pattern to prioritise different behaviors to be executed by the robot on different parts of the course.
|
|
|
The fourth experiment will use a simple robot which has been hardcoded to drive and turn according to the course dimensions.
|
|
|
At the end of this report we will sum up and compare the advantages and shortcomings of the four experiments in order to determine which approach is more feasible.
|
|
|
Experiment 1: Fast robot with high gearing
|
|
|
|
|
|
## Task
|
|
|
For the first experiment our main focus is speed. This is relevant as the robot will compete on the racetrack. To obtain higher speed we implement a gearing mechanism on both motors and test it on a straight track.
|
|
|
|
|
|
## Plan
|
|
|
The goal for this experiment is to learn about the cars behavior when using gears on the motors. For this experiment we use a basic car setup (see fig.1) with the opportunity to mount other sensors as well.
|
|
|
|
|
|
|
|
|
Fig. 2: Robot with high gearing from the electrical motors to the wheels.
|
|
|
To test the robot we use a straight track and a basic program which powers the motors equally all the time in order to drive forward:
|
|
|
|
|
|
´´´
|
|
|
while (! Button.ESCAPE.isDown())
|
|
|
{
|
|
|
|
|
|
car.forward(power, power);
|
|
|
|
|
|
|
|
|
Thread.sleep(60);
|
|
|
|
|
|
}
|
|
|
|
|
|
´´´
|
|
|
Fig X: Showing the code used to drive the high-speed robot forward. The power is distributed equally to the wheels as we are only concerned about a straight motion.
|
|
|
|
|
|
## Results
|
|
|
Through this experiment we learned that gearing the motors causes significant problems to the robots path. The robot has no problems accelerating to it’s maximum speed, however if the robot experiences disturbances on it’s path i.e a small bump, the robot will go into a spin. What happens is that the high speed combined with low friction causes one of the wheels to slide (with the same speed) while the other wheel tries to catch up to the other. This behavior can all be seen in the video:
|
|
|
|
|
|
https://youtu.be/SYBlxdFIxUY
|
|
|
Fig. 2: Video showing the robot go into an uncontrollable spin after a small push. First to the right, then to the left.
|
|
|
|
|
|
We can conclude that gaining momentum is not necessarily an advantage for the robot as it comes with a cost of increased vulnerability to its driving behavior. If we were to maintain control of the robot, it would require a significant amount of code to prevent the robot of going into a spin. This could be done using a PID controller to perform frequent corrections to the power distributed to the wheels.
|
|
|
|
|
|
Though a PID controller could improve the robot’s stability, we must consider that part of the robot’s behavior is caused by frictional problems. This means that though a PID controller may control the power, the wheels will still rotate at at very high rate and thus making the robot slide. This problem may be solved using wheels with a larger radius, or by implementing an acceleration behavior to the robot. |
|
|
\ No newline at end of file |