In this video, a proportional Line Follower MyBlock for NXT-G is described in all its gory detail. I first describe the proportional line following algorithm using a block diagram, and then I present a complete working NXT-G design that you can make for yourself. My two previous videos on variable blocks and MyBlocks provide the foundation needed to grasp what I present here; so please watch these if you don't already know about variable blocks or have never created a MyBlock with inputs. I made this series of videos in stages because I felt if I tried to explain everything in one video, it would be too much information for anyone to process, and I'm sure it would be over an hour long!
Though information on line following with LEGO Mindstorms NXT robots is available in various books and websites, I think that the information available is never quite detailed enough to allow kids to make a line follower MyBlock that is flexible enough to tackle the challenges found in the FLL Robot Game.
For example:
How can you make your robot follow a line for a specified distance?
How can you make a single line follower that can follow either the right or left edge of a line?
How can you make a line follower that can move either fast or slow depending on the situation?
How can you make a line follower wiggle very little so that you can use the line to align your robot just as surely as if you were using a wall!
How can you make a line follower MyBlock that could be used on two robots that have different sized wheels and have motors that are installed in opposite directions?
So in order to fill this void, I humbly offer my video, with the hope that there will be a few kids on FLL teams all over the world that will take the time to learn how to make a similar line follower MyBlock for themselves. There is so much that can be learned about controlling robots by experimenting with this simple proportional feedback loop. This exact same feedback loop conecpt can be used to control the steering of your robot - in that case the difference between the rotation sensors becomes the error term in the loop. Consult my 'Amazing TubBot video' for a peek at the algorithm to make the robot drive straight using a feedback loop. What's the benefit of this when the MoveBlock already does this? The answer is that if you want to do fancy things like drive until a certain sensor detects something, or pivot until a sensor detects something, that this method allows you to do what the MoveBlock cannot do.
Also, there is so much benefit to learning how to create and use MyBlocks in FLL programming. I have never seen any presentation about MyBlocks in a book or website that even scratches the surface of what is possible. I hope this video more than scratches the surface, I hope it opens new doors to what is possible even with a sometimes frustrating computer language like NXT-G. Indeed, MyBlocks provide the only solution to overcoming the major defect in NXT-G. A program that is just a bit larger than the MyBlock presented in this design will crash NXT-G if you try to do something as simple as add another block to the design. The only way around this annoying bug of NXT-G is to piece together large designs out of many smaller MyBlocks. Whenever a design gets too large, and NXT-G starts getting unstable and crashing, turn a section of it into a MyBlock and you should find that NXT-G will stop crashing... at least for a while until you need to repeat the process.
I'd love to see response videos showing how you have made your robot follow a line in FLL missions.
Well, it's about time you stop reading this and get going on building and experimenting with your own Line Follower MyBlock! So Three, Two, One, LEGO!
Ещё видео!