Micromouse: The fastest maze-solving competition [video]
youtube.com
youtube.com
I build the chassis from perspex and brass, turning my own spacers to hold the various boards in the right places. I used DC motors, made my own power controllers, opto-isolators, shaft encoders, IR wall distance detectors, servo steering assembly, bearings for the front wheel, ...
Everything.
Then the night before the competition I blew out my one and only EEPROM by plugging it into the programmer backwards.
Never got to compete.
But I still have Harvey[0] somewhere. I should pull him out and make a series of videos about his construction. But it was 35 years ago and the technology has changed ... I doubt anyone would be interested, especially because he never competed.
But I was proud of building the computer from scratch and having it work first time, and of being able to run down my homebuilt section of "corridor" without hitting the walls. At the time no mice had run diagonally, so I really was in the running, provided it ran.
Oh well.
[0] No, not named after the cocktail[1], but after the smallest species of mouse in the UK. It's the "Harvest Mouse", or "Micromys minutus".
I'd have to find him first, of course. And find some space to lay out the pieces to photograph.
Hmm ...
Happy to answer questions.
With the use of a fan, the limit is now how much down force can you generate and then can you drive the wheels to take advantage of that. And then how much time do you have to maximize this loop.
For Micromouse, there are several methods people use. One is to create a trapezoidal angular velocity profile while holding the forward speed constant. The trapezoidal profile parameters are determined through iterative simulation.
Another approach - the one I use - uses cubic spirals which is described in: Smooth Local Path Planning for Autonomous Vehicles by Yutaka Kanayama and Bruce I. Hartman. What is amazing about this technique is that it is closed form, is like four or five multiply and adds and executes in trivial time on (even) an 8-bit processor. For my latest entry, I have a more sophisticated scheme where I try to maximize the load on the tires and the lateral and longitudinal loads are asymmetric.
In this article: http://www.dtweed.com/circuitcellar/xottenda.htm#183 - David Otten describes a scheme where he controls the rotational velocity such that the load on the tires is maximised.
I think you can get very far with simulations and then trying it on a RC car and then on a real car.
A few years back, there was some amazing work that was done at Stanford where they developed tire models and a controller that could handle sliding modes.
I encourage you to explore because if nothing else, you will learn.
https://micromouseonline.com/micromouse-book/robot-dynamics/...
https://micromouseonline.com/wp-content/uploads/2015/06/MINO...
I could use the routines that the MCU manufacturer provides but when I've tried, I've found that I spend a large amount of time understanding the API and what they are doing and writing the drivers myself is faster.
Take a look at this code base: https://github.com/ukmars/ukmarsbot
I think one can be made for under $50 USD.
MCU: $5 PCB: $5 Sensors: $8 Motor driver: $3 Battery: $5 Misc. electrical components: $5 Motors: $4 3D printed parts: $15
Funny story - I was in college and the IEEE chapter was having a meeting with free pizza. I went to the meeting but went into the wrong room and in that room they were having the Robotics club meeting. I was intrigued enough to sit through it and wanted to do this. One of the the presenters said that no one had yet made a working mouse at our college. I was determined that I would be on the team that was the first. And we were!
FIRST is a fine competition.
Please take a look at the repos at:
https://github.com/ukmars/ukmarsbot <- this mouse was shown in the Veritasium video. It is exceptionally low cost and easy to assemble, source parts for and there is enough code in the repo to make good progress.
I hope you do this!
I'll watch this thread for more questions.
Or is there some pre-programmed aspect to their paths? Surely it's not dead reckoning?
Currently mice use reflective infrared sensors. The reflected infrared light is used to estimate the distance. Based on this reading, one can determine the position of the mouse and the presence/absence of the wall. This information is used to create a maze map and to navigate.
The Circuit Cellar article mentioned in this thread is an awesome comprehensive introduction to micromouse.
Of course, the final implementation was written in C and loaded on a microcontroller. Back in those days my options were much more limited. I can only imagine what's available these days.
I actually had the itch to tinker with micromouse again not too long ago, but I became dismayed with the difficulty in setting up a physical maze for the robot. I think access to the mazes themselves is the biggest limiting factor.
Couldn't you just buy a sheet of plywood, some wood strips, and a bit of wood glue? I mean, setting up a maze will take some time, sure, but it's hardly difficult. Or am I missing something?
You can do it, but it's still quite tough; in many ways tougher and less fun than building the mouse.
Link to some helpful notes on building your own Micromouse maze: https://micromouseonline.com/micromouse-book/mazes-and-maze-...
Why would you paint the entire thing without testing the materials, or asking the organizers what paint they use / how to validate your own maze, or asking among fellow competitors?
Just in case you might not be familiar with this:
https://www.firstinspires.org/
Check out the three options under "Programs". I was heavily involved with this as a mentor (FRC) many years ago. Our team went all the way up to nationals. The program is international in nature. The national championship had teams from absolutely everywhere.
One of my favorite thing about robotics is when people go from something in software to something that is actually built. Sensors are "noisy" in the real world, and HBRC has a great series of challenges that are designed to get people to actually build robots (and for that they need to span the easily grasped to the more complex). A number of kids that came to the club when I was running the meetings went on to top engineering schools, always gratifying to see them take off like that.
I've read about these competitions before, but he goes into way more detail than I could get as a casual observer. Very enjoyable video.
I don't think a human operator could reasonably control the cars at that speed remotely. But, given the simplistic nature of the track, a µC equipped car might be able to.
Correction: the mechanism I was thinking of is membrane based air jets, like the one being developed by AirJet.
I can kind of imagine a future micromouse switching instantaneously between hovering using the air jet and suctioning as it corners by swapping intake/outflow. No wheels. Fun. I can see the appeal.
(https://ewh.ieee.org/sb/columbus/devry/sacFiles/MicromouseRu...)
Cool video.
it was such a great feeling to see the mouse complete the maze.
see code / deets here: https://github.com/aramachandran7/micro_mouse_final
https://ukmars.org/contests/contest-rules/micromouse-classic...
And even if you're not pushing off from the walls, additional wheels on the sides of the mouse could help get more traction by running along the walls.
(https://ewh.ieee.org/sb/columbus/devry/sacFiles/MicromouseRu...)
On the other hand, I thought what he describes sounds a lot like A-star. Does anyone know what algorithm is used (if, indeed, as he says, everyone's converged on using the same algorithm). Is it straight A-star, some sort of incremental A-star, or something like D-star-lite (which is apparently quite popular for path planning)?
To me, this looks like running multiple iterations of Dijkstra's. You start with Manhattan distance between nodes and finish. As you go through the maze, you update the dynamics of the current node, run dijkstra's, go to shortest path from here.
This also sounds a bit like IDA*, where you are also updating the heuristic as you go, but without the iterative deepening part.
In particular, in A*, the "to be explored" queue has to be kept sorted. This sorting dominates the compute time.
For example, using the "flood fill" method on an 8-bit processor, depending on the state of the maze, it took less than 3milliseconds (hand optimized assembly) to solve a maze. On a Cortex M4, with decently thought through maze representation, but not optimized beyond that, it takes under 1.5milliseconds. This is in the "don't need to bother" category.
This is a great article to start from: https://dl.acm.org/doi/10.5555/26011.26020
PDF version of this can be found online.
What we have done is extended it to be time based rather than distance based i.e. we take into account the motion parameters - acceleration, maximum speed on the straight and through different turns, distance and use that together to generate a cost table and then use the cost table to generate the fastest path.
Question; with A*, I assumed the issue was that you needed to backtrack to a promising node which could be very far from current position. But that is based on the assumption that A* is rooted in the start of the maze. The way you described this makes the backtracking seem like a non issue. I assume it is because you were changing the root to be the current node each time. Is this correct?
That's what is called flood fill.
I submitted [1] 15 hours ago, after seeing this on the ole 'Tube but wanting to avoid video and boost the competition itself rather than a particular YT channel, but that tanked.
Btw, thanks for the wikipedia link I'll read it now :)
I'm curious what the runtimes are by teams at various universities these days.
Google Maps has been doing this for a longest time. They take freeways and signals into account, on top of the real-time traffic. Google Maps will often show multiple route options, some shortest distance, some fastest time, and nowadays "greenest" option (based on the car you picked). If you're not happy with Google Maps' initial pick of the route, you can also try alternate routes once in the navigation.