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.
- #204
- 06 Jan 2016
- 2:45
- LEGO MINDSTORMS, LEGO MINDSTORMS EV3
- FIRST LEGO League, Line follow, The Arab championship for robotics - Line Tracking, EV3-G, EV3, State machine, Light and Color Sensor, FLL, Programming
The gaps are 0.1 meters in length. The robot doesn't know where the gaps are, where the turns are. It should come from the start to the end. We show the complete line following run so that you have an idea of how the whole program behaves and what the result is at the end.
The only way to properly learn how to follow lines is to actually do the programming at each step. Try to program the robot, and then share the results with us of how successful it was.
While programming we implement a pattern. This pattern is called "State Machine". A state machine has a number of states and transitions between these states. We sometimes call these transitions "behaviours".
Full course available at
EV3 Competition Robot with 3 color sensors
Modification of the EV3 Competition Robot Full with light sensors attached to the front
English
For this video we got a request for more advanced line following algorithm for a robot that can follow a the line as shown on this field. This is a field from one of the users at fllcasts.com and we desided to build an algorithm that can follow this line. As you can see it's pretty complex, it has turns, it has gaps and it also has cross sections. It's a very interesting line and we decided to build this in the next few video, in this course we'll describe how do you program the robot to follow such a line. Now let's see an example and what is the final result from our work.
As you saw the robot was successful. Now let's look at the program and learn how do you build such a line following algorithm.
Courses and lessons with this Tutorial
This Tutorial is used in the following courses and lessons
The power of State Machines. Gapped and Crossed Line Following with LEGO Mindstorms EV3
There comes a time when you need to program the robot to "follow a line, but if another sensor detects something you would like to stop, do some work, and then continue following the line". This is applicable to competition robots as it is applicable to real-life robots.
There comes the State Machine Pattern. An advanced and very powerful concept that allows you to easily implement complex robot behaviours with a simple, well-organized, extensible, bug-free program where the robot could be in 1,2, 10 or 100 states and you will still be able to manage the complexity of the world around the robot.
- 12
- 92:11
- 0
Challenge
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.
- 1
- 0
- 0
- 3d_rotation 1