Some Mazes for Sparki

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)

Again, thanks for all your work, WolfW. We recently printed your open-looped (as in, it isn’t the circle track) maze on A0 paper and had students solving it at the USA Science and Engineering Festival this past weekend. It was a big hit, and some of the more advanced children figured out how to use Sparkis’ sensors without us even showing them!

-JD

I should also point out that in order to get the line following example program to follow a black line the arithmetic operators had to be switched (lineLeft & lineRight should be less than the threshold, not greater than).

White surfaces return high values (900+) while the black line on the glossy maze was returning ~700. I’d recommend not laminating the maze if more contrast is needed (or tracing the line with a black sharpie).

-JD

Thanks for the feedback on the mazes. I was wondering whether anybody actually tried one out. I’m glad one of them worked well for you and the kids at the festival.

I’ve also started using them with my group of middle school kids, and based on that experience I’m planning to make some minor changes. I’ll post an update when those are done.

oooh! I must say I really like your mazes! They look great!

I’ll have to look around for a place where I can get them printed.

Fed-ex does a great job! ~120$ for a laminated print though.

-JD

Fedex does print jobs???

I’m in Canada, I have to check if they do prints this side of the border.

Yeah, in the US, some FedEx locations have printing services. There’s also this fedex.com/us/office/online-printing.html, but I have never tried it.

With regard to laminating a Sparki maze: I wonder whether the lamination would confuse the IR sensors?

JD: Did you try using a laminated maze?

Yes I used the laminated print. Much better for durability.

The gap between black and white was much smaller (700-1000) but still enough for the sensors to distinguish. From my earlier post:

[quote=“EYW_JD”]I should also point out that in order to get the line following example program to follow a black line the arithmetic operators had to be switched (lineLeft & lineRight should be less than the threshold, not greater than).

White surfaces return high values (900+) while the black line on the glossy maze was returning ~700. I’d recommend not laminating the maze if more contrast is needed (or tracing the line with a black sharpie).

[/quote]

-JD

JD: Thanks for the clarification. Apparently I misread your earlier post or didn’t read it carefully enough.

Without lamination, I’ve been using a threshold of 700. Based on your experience, something around 800 (or 850?) seems to be the way to go with lamination.

Here’s the promised update to the mazes.

I made some changes because my original versions didn’t let me do everything I wanted.

With various levels of programming effort, the following should be possible:

[ul][li]drive through the maze using pre-programmed steps (use the yellow markers to count off distances; as before each yellow marker is 10mm by 30mm, and the spacing between yellow markers is 10mm)[/li]
[li]follow the black path line by using the line sensors[/li]
[li]explore the maze by using the line sensors and black in-wall markers[/li]
[li]explore/solve the maze by using the edge sensors to detect intersections and possible turn directions[/li]
[li]use the line and edge sensors to detect object locations (i.e. the A, B, etc. markers) and pick up items using the gripper[/li][/ul]

I realize it may not be clear how to accomplish each of these, and I haven’t tried it all myself. Actually, I haven’t even printed these updated mazes myself. Nevertheless, as before, I thought I’d share in case others want to give them a try.
Sparki Maze A0 2014-05-11 M 1,3 (25).zip (13.9 KB)

Wolfw,

Used these mazes with great success this week. Thanks so much for your hard work.

For those of you in the US, the cheapest way I found to print these was at Staples using their 30"x40" engineering blueprint (black and white). The cost is ~$6 per print.