Greetings,
I thought I’d share a couple of mazes that I prepared for Sparki. If you’re interested, take a look at PDF file that’s in the attached ZIP file. (When I tried to upload the PDF directly, I was told it’s not allowed. Why?)
You’ll see two types of mazes: 1) one is a closed maze where the path is a loop, 2) the other is an open maze: the idea is to start at one end and get to the exit.
These mazes are drawn on A0 sheets (841mm × 1189mm paper, approx. 33in × 47in). At 100% scale, the black path line is 1cm wide, and each of the little yellow distance markers is 1cm x 3cm. If you want a smaller version of this maze, you can try printing it at 71% (or more precisely 70.63%), and you’ll get it on an A1 sheet (594mm × 841mm).
You can apply a line-following program to have Sparki drive along the black line that runs along the maze path. However, if you print the maze smaller than 71% the path line may become too narrow, such that Sparki won’t be able to read it nicely. (I have not tried it.)
If you print at 100%, you can ignore the path line and instead use the yellow markers to count off centimeters to hard-code a path into Sparki (e.g. move forward 18 cm, turn right 90 degrees, move forward 17 cm, etc.) to get through the maze. Each yellow marker is 1cm wide and the spacing between yellow markers is also 1cm. Of course driving Sparki by specific distances and angles needs to work correctly for this approach, and it doesn’t with the current Sparki libaray. See post [url]Driving distance and turning angle still don't work right].
I’ll be doing some exercises with a group of middle-school kids, and I plan to have them implement the hard-coded paths first. Navigating the maze based on sensor feedback is more complex and will come later.
Note that the mazes have some dead ends with markers labeled A, B, etc. These are intended as spots to place objects – maybe small cardboard cylinders? – that Sparki can pick up with its gripper. Sparki could be programmed to retrieve one of these objects and carry it out of the maze, or move an object from spot A to spot B before finishing the maze.
Finally, the black lines that are embedded in the blue walls could be used by Sparki to detect that it has run into a wall. With these bumped-into-wall markers, Sparki should be able to make it through an open maze with a maze-solving algorithm (e.g. always hug the right wall).
I’ll be attempting these things myself as time permits. Since I have not tried it all, I cannot guarantee that it will work as I envison. Nevertheless, I wanted to put the mazes out there in case anyone else wants to play around.
Sparki Maze 1,3 Rev0.zip (15.1 KB)