Jashan Bhoora | blog
My first term of second year is already drawing to a close. It seems like it is going by even faster than first year! The Christmas holidays are almost upon us, and of course, the first set of exams for the academic year in January.
On top of the usual formative assessments and looming exams is another, new detail to consider. Many in my year (including myself) have opted to take a year of university out next year, and instead spend it working in an internship. Doing so will provide us with invaluable work experience, as well as the chance to actively contribute to the real projects of a company, and get an idea of what it is like to be working in a real business.
The university offers a lot of help in the application process, by inviting companies at the forefront of the industry to come and talkabout what they do, and advertise any positions that they have.
During the course of a talk from Imagination Technologies, they mentioned a Developer Day they were hosting,in which successful applicants would be able to visit their Headquarters for a behind the scenes tour and presentation of what they do,and then participate in a maze robot programming challenge based around one of their products.
For those that haven't heard of Imagination Technologies, there are an Intellectual Property (IP) company. They design the architecturesof processors for (primarily graphics, but also general purpose) hardware, then license them out to manufacturers andproduct designers to be implemented in their products.
Most definitely intrigued by the day I applied for it, and a couple of weeks later was informed that I had been given a place.So, on the 26th November all the successful applicants turned up at Imaginations Headquarters in Kings Langley at 9:15. There was quite a mix of us, havingtravelled from as nearby as London to as far way as Newcastle.
The day started with a quick introduction, then progressed into more detailed talks about the work at Imagination. We alsohad a short talk from the Executive Vice President of MIPS, the CPU division of Imagination. Excitingly, we were also shown applications of thevarious technologies Imagination works on, ranging from rapid, low power rendering on their mobile graphics cores to implementations of theirdesigns in the latest range of Pure speaker systems. Pure is a branch of Imagination that sells products direct to consumers, something I had no idea about!
After lunch came the main activity; We were given a ChipKIT Pro MX4 (a MIPS development board) based robot chassis, and had around 4 hours to program it so that it would be able to follow a maze (which came in the form of black lines arranged on a white floor) and find the exit.The robot itself had two motors on it and four IR reflectance sensors on the front bumper.
We were split into pre-set teams of 3 or 4 (I was in a team of 3) and immediately got started. We were given a laptop with MPIDE already installed (which is nearly the same as the Arduino IDE), as well as fundamental functions and pin definitions in order to make the robot moveand read sensor values.
Our team started by discussing the basic flow of operations the robot needed to accomplish, specifically:
- Ascertain if it was on a junction or the end - if so turn/stop
- Otherwise ensure that it was following a straight line
- If deviating from a straight line, correct itself
- Try to solve the maze
We started by trying to implement a basic "follow a straight line" system. This wasn't too complex, since we simply wrote a function to convert the analog sensor reading to a binary value (which would be used throughout all of our solutions iterations), then used the middletwo sensors to check whether a straight line was present, and the outer two to indicate a junction or the end (which was a solid horizontal line on the maze). This initial approach partially worked, however it highlighted two key problems. The first was that though the motors were identical, they didn't turn at exactly the same speed when going forward, which caused the robot to veer to the side, and sometimes detect a turn where there wasn't one. Ironically, the second problem was that when the robot was exactly straight on the line, the sensors where either side of it meaning they couldn't detect it.
The majority of our time went into devising a smarter way to stay on course and follow a single line as accurately as possible.With this done we figured it would be more straightforward to detect a one way junction (either both left or both right would detect a black line), and similar reasoning could be used for a dead end or a double junction/the end.
Our main advancement came when I modified the forward motion to alternate between moving each wheel independently instead of at the same time.This had the advantage of causing the robot to essentially oscillate along the line instead of deviate, which then made it easier to detect a legitimatejunction. It also had the side effect of causing one of the days coordinators to label it The Penguin.
By the time we had implemented this, and a case for detecting junctions, we had run out of time. The result was a robot that was able to follow straight lines quite well, and good detect single junctions decently, but tended to take a random turn on double junctions, and on finding a dead endattempted to do a full 360 degree turn, which sometimes caused it to find the line it was following, and go back the way it came.
Each team was given 3 initial attempts at the maze, allowed to make small modifications between turns, and start subsequent turns from thefurthest point their robot had reached toward the end. Our team went second, and our robot managed to get around half way in the right directionbefore failing. By the end of the first round this had been matched by one other team, which left it down to a one-on-one stand-off.
The other teams robot went first, edging closer to the end, but then took a missed a turn which took it away from the finish point.Our robots turn came. To win we essentially had to detect and follow the turn our competitor had missed. After a couple of false starts our robot was on track, and when the turn came it detected it, followed it round, and carried on for a few seconds more before failing, winningus the competition.
The day was excellent. We all got an inside look at a cutting edge IP designer, the chance to meet the engineers and quiz them on exactly what they do, and were able to work with something they had designed. It was a great experience, with a number of us now considering summer/yearlong internships with them.
Should anyone with an interest in lower level programming and robots get the chance to apply, I would recommend it!