The right and right front LED/sensor pairs (top of image) used to sense the micromouse maze walls turned out to be a critical factor in TETRA’s performance.
The performance of Kato-san’s amazingly fast TETRA micromouse robot design delighted fans, and competitors, at the 30th All Japan Micromouse event in November, but due to technical difficulties it failed during the final competition on Monday. Everyone was puzzled, including Kato-san, since they fully expected TETRA to walk away with top honors.
There was no question that TETRA was technically capable of mapping and then running the maze in world-record time. In fact, the robot ran the same maze after the competition was finished in a blazing 4.766 seconds.
So, what went wrong on that fateful day?
It had to be a subtle mistake, something wasn’t immediately obvious. And it had to be a mistake that allowed the robot to operate perfectly under some conditions but fail under almost identical conditions.
It took Kato awhile to figure it out, but after he returned back home, examined his code numerous times, finally he discovered the answer. TETRA, like almost all micromouse designs, uses LED’s to shine light on the maze walls then have sensors to measure the reflection which is processed through an AD converter to derive the digital signal. The robots are equipped with an array of the LED and sensor pairs mounted strategically around their edges.
In addition to the LED light reflected from the maze walls, there is also a lot of ambient light which needs to be adjusted for, and hopefully eliminated from the signals. The Japan Micromouse organization doesn’t make the task simple. Quite the contrary, the regulations here require builders to take all kinds of ambient light into consideration, including different types of hall lighting, TV lighting, and photography.
The regulations are fairly harsh in that regard, but since everyone plays following the same rules no one has a right to complain. Actually they take it as a challenge since the rules are close to the environment that a robot would face in actual use in the real world. And, the builders always love a good challenge.
Here’s TETRA’s latest public showing at the Chubu Micromouse robot meeting, December 12, 2009. The video starts with TETRA mapping the maze, then making a blazingly fast speed run, and winds up with a slow motion video of the speed run that is fascinating:
To try and cancel out the effect of the ambient light ‘noise’, the robot builders develop an algorithm that compares the sensor values from two LED/sensor pairs in close proximity twice, once with the LEDs off then again with them emitting, and subtracts the difference.
Kato discovered that he had inadvertently transposed the values in the calculation for the forward right and right LED sensor pairs. The resulting behavior was:
- Ambient light consistent => OK
- Low ambient light levels => Safe
- Varying ambient light levels => Out
He also found that the same error was in the code for his record setting half-size micromouse robot “Bee”, but hadn’t surface because the robots signal to noise (S/N) is much higher (about 3 times).