Proportional Line Following with EV3 Mindstorms. Part 2
Continuing with the Proportional algorithm for following lines. Smooth and stable this is the first part of the PID.
- #176
- 01 Nov 2015
Continuing with the Proportional algorithm for following lines. Smooth and stable this is the first part of the PID.
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.
In this tutorial, we show you how to display all the values from an EV3-G array on the EV3 brick display. We are using an array Read Operation along with a loop. We are also detecting the loop counter and using it as an index to an array. It's basically the only viable way to do it. The process is commonly referred to as - "Iteration over an array" (although we still do not have an iterator in the programming language, we promise that one day we would do the super advance videos on "iteration" using the LEGO MINDSTORMS robots")
A common question is how to display arrays on the LEGO Mindstorms EV3 brick screen. Displaying values from an array is not different from any other display operation. In this tutorial, we would look at displaying two specific values. The minimum and the maximum for a specific sensor from the Advance Calibration Course Section
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.
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.
One of the smartest things you could do in any software program is to extract logic in small reusable, simple, understandable units. In EV3-G these are called Blocks and we are going to extract the logic for finding a minimum and maximum for each of the sensors in a new block.
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.
Showing the same run, but from a different angle. This allows you to see more of the way we sensors work and how exactly the robot positions itself.
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.
The kinesthetic and memory game works with a program you can download from here. In these instructions you will see the 7 modules from which it is built:
This robot is meant to be very modular and to enable its owner to upgrade it and modify it.
The Sports Utility Vehicle box robot is the new marvelous box robot that we've created. It is designed for teams that would like to learn how to build balanced, stable and working robot chassis following our box principle. It is smaller and easier to build than box robot 1 and it is more simple than box robot 2.
The main advantages of this robot compared to previous box robots are
- motors in the right direction, so when rotating the motor forward, the robot moves forward.
- it is much easier to attach attachments. There are 4 different gears on which you could attach attachments.
- it has a large clearance - which means that it could move over obstacles.
Of course, it has a Gyro and two Color Sensors. Not only that, but we have all the cables shown in the construction.
The SUV Box robot is design to be used with a Gyro sensor and two Color Sensors for alignment. It is not working well for following lines as the sensors are very high and they are very high to allow for high clearance of the chassis. If you need to follow lines we recommend the Dominator X-Y robot
- [How NOT To] Build An Active Attachment For SUV Box Robot
- Simple Pinless Attachment for the SUV Box Robot
This robot was made to count coins. The door slides, making the gyro sensor rotate, and by doing that, allowing the robot to measure the size of the coin that enters the safe. By changing the points where the gyro's beam connects, the sensor's thresholds change.