Line follower and maze solving

Hello!

I am thinking of purchasing a GoPiGo base kit + line follower for a maze solving project, based on this: https://www.pololu.com/file/0J195/line-maze-algorithm.pdf.

The line follower needs to be capable of solving mazes such as the attached example. In other words, the robot needs to deal with 90 degree angles and straight lines.

According to http://www.dexterindustries.com/GoPiGo/gopigo-line-follower-getting-started/using-gopigo-line-follower the line follower doesn’t deal well with curves under 1 foot in diameter. So my question is : Can the GoPiGo + line follower handle right angles?

If anyone has any other experience or suggestions about using the GoPiGo to solve mazes feel free to comment :slight_smile:

Look forwards to hearing from you!

Mark

Anyone? I would really appreciate an answer fra Dexter Industries on this :slight_smile:

Hi Mark,
The line follower is a relatively new product in our lineup and we didn;t have people ask for the kind of program that you want to build. The example that we have provided with the GoPiGo is a very basic one (https://github.com/DexterInd/GoPiGo/blob/master/Software/Python/line_follower/line_follow1.py) and if you go through that, you can see that we don;t check for right angles.

What the line sensor returns is an array with 5 values telling what the line sensor can see (https://github.com/DexterInd/GoPiGo/blob/master/Software/Python/line_follower/basic_example.py), so I think the line follower is completely capable of sensing if there is a 90 degree turn, so you would have to write a program which does make it turn 90 degrees.

A simple algorithm can be, if [0,0,1,0,0] means the line is in center, then [0,0,1,1,1] means that there is a 90 degree turn. If the GoPiGo overshoots this, it’ll read [0,0,0,0,0], because there will be no line, so as soon as the GoPiGo encounters, [0,0,1,1,1] it should start turning in place until it again finds the line, at which point it should start moving ahead.

I think the line follower is in great shape for beginners to play with and it gives enough data for advanced users to build more complex algorithms like this or use something like a PID. We’ll be happy to help you out if you face any problems when you are building the maze solver and it would be great to have that example in the repository for other users to try too.

Do let me know if you have any other questions.
-Karan

Thanks for the reply! We’ll have a look at let you know how it goes.