WRO Junior-High 2015. Treasure Hunt. Part 2. Rules
We would look at the rules of the competition over our small model and we would start solving the field.
- #199
- 10 Apr 2016
We would look at the rules of the competition over our small model and we would start solving the field.
We discuss the state of "Lost" and the different ways we could escape this state. We also build the next step of our State machine programming pattern where the next state is determined by the previous state.
All worked as expected, up until know because the robot got lost. This happens when we turn right and the line does not continue to the right. Now the robot must somehow understand that it is "lost" and escape.
Let's implement a more advanced program for this robot to learn how to use with motors in opposite directions - and this is to implement the Proportional Line Following algorithm.
We can Turn Right. We can Turn Left. How do we decide which way to go if there are lines both to the left and to the right. Check out the video.
Next state in our state machine programming pattern is the "Turn Left" state and the corresponding behaviour.
Next important state is Turn Right with our robot. This happens when we detect a line on the right.
We've detected the gap. It's time to move over it. This is difficult because we have to detect where the line is after the 0.1 meters gap on the line following field.
It's inevitable. While following this gapped line we would reach a gap. The robot must somehow understand that there is a gap and must make a decision on what to do. For detecting the gap we use the Rotation Sensor. Not the most popular, but very convenient in many cases. Check out the video.
The final video from the course. The robot escapes the state where it is lost. This happens if it can not continue in any direction.
We follow a line. We start from the Smooth Proportional Line Following program and modify it a little for this program. We follow the line with the middle sensor attached on port 2.
We extract the Proportional Line Following algorithm into a new block with parameters. This allows us to experiment with the Threshold, Constant Speed and Relaxation Coefficient. You can now easily use the block in you other programs without having to implement it.
We list the number of decisions that the robot is making while following the line. Then, we group them and decide on the number of sensors to be used.
Looking at the field we must first think of a strategy of solving this line following problem. There are rules that the robot must follow and these rules should be programmed in the robot.
We start a course for following a line with crosses and gaps. This is a challenge that one of the users at FLLCasts.com was trying to accomplish and asked us for advice. We present the whole challenge to you step-by-step. But first, let's also see the whole run of the line following algorithm. With this course, we also do an introduction of using State Machine as a programming pattern.
This second part continues with importing two previously developed in Episode 53 blocks into our program. With them we can for align to lines. We program the robot to align to the cross line and start following it.
How do you detect a cross-section and move from following the main line to following the crossing line. In this series of video tutorials we are starting with a very simple solution that could work in most of the cases. It is especially useful for the FIRST LEGO League Trash Trek competition where there is such a section.
Last part of the series. The final touch of the program makes sure that it works and is following the line with the LEGO Mindstorms EV3 Color Sensor in a smooth and fast way.
Continuing with the Proportional algorithm for following lines. Smooth and stable this is the first part of the PID.
In a competition environment like the FIRST LEGO League (FLL) or World Robotics Olympiad (WRO) the color sensor is more than useful. It makes positioning on the field quite easy and precise.
Tasks on using the LEGO EV3 Mindstorms Color sensor. Quite fun and useful for different STEM classes or just to get to know the sensor.
The color sensors supports different modes of working. In this video we are working with the Reflected light, which is not actually the detected color. Most robotics sensors actually work with reflected light and you should definitely learn how to use this mode.
The program from part 3 should be refactored and improved to make it easier to understand and support. We extract most of the repeatable behaviours in a loop and this reduces the size of the program three times in terms of the number of blocks used.
Use the color sensor to count the lines and stop on the third line. We do not use the wait block for this.
Counting lines and stopping on the third is the subject of this video. It is important to know how to do this in order to conduct more than one experiment in STEM classes (if we consider that each line is an experiment)
Very simple and basic introduction to the color sensor in the LEGO Mindstorms EV3 set. The first program is to stop at a line. Then we can move from stoping at line to counting lines and even more complex tasks.