RoboCup: Autonomous line following robot competition
Part of the series University Projects (0 posts total).At the Department of Electronic Systems at Aalborg University, the first year students are forced to partake in the yearly autonomous robot building competition, RoboCup. Students have to build a mobile robot, which is capable of following a predefined line on the ground while completing certain obstacles. The students are split into groups and each given a set of LEGO pieces and a LEGO Mindstorm EV3 which must act as the robot processor. The groups are awarded points based on how many obstacles they successfully overcome plus other factors and a winner is declared. As a former first year student, I also had to partake and we did very well, earning a 2nd place of about 10 contestants.
Our robot
The robot has several defining features:
- Front-wheel drive with two motors and a single bearing acting as the back wheel.
- Light/brightness sensor capable of detecting the line. This is hidden underneath the shield of promotional material with a face on it (we don’t know who he is).
- Ultrasound sensor capable of detecting obstacles while doubling as a cool pair of red eyes.
- Single-motor close-and-lift arm system.
- Gyroscope for better turning.
Before introducing the problem, I present a point-of-view video of our robot driving the track and accompanying composited live map. I didn’t record the video but I did edit it and create the minimap - the minimap was not made back in 2018, but very recently using pygame and a lot of patience.
The track
We split the track into each obstacle and named them according to the NATO phonetic alphabet.
Each small black dot on the track is a gate, and for maximum points, each gate must be passed through. This means that the robot should follow the line closely, which is achieved with the shielded light sensor. The sensor detects the brightness by quickly powering a diode and measuring light reflected. Therefore, the light sensor detects most light off the line, least light at the stop marks (black stripes on the track) and somewhere in between for the gray track lines. To steer the robot towards the gray line, we implemented a PID controller, but honestly, we didn’t know what we doing back then. Despite this, it worked surprisingly well, but only after mounting the shield which made the light sensor readings more consistent. It should be noted that the controller was written in the domain-specific ROBOTC which is an extension of the C programming language. This was actually a good introduction to the language alongside our introductive course in programming.
Obstacles Alfa, Delta, Foxtrot, Golf, Hotel and India really just require this line following and turning precisely, which is done by the use of the gyroscope. The gyroscope was really bad, and an attempt at correcting the drift was naively made. However, if the drift was too unpredictable, a switch would stop the robot from starting. This is preferable as the competition allows for 2 retries with no consequences before disqualification. This actually happened during the contest and our group was rewarded with bonus points for ingenuity.
Obstacles Bravo and Echo require picking up a bottle, and the arms worked wonders for this. The design was based on a design found on YouTube and modified for greater strength by altering the gear ratio. In the video, you may notice at Echo, that the robot turns back and forth. What you are witnessing is the robot utilising the ultrasound sensor to echolocate the bottle before driving to it. This is the only time the ultrasound sensor is used.
Obstacle Charlie was skipped as the mounted light sensor shield prevented uphill or downhill movement. Regrettably, had we done this obstacle too, we would have won the competition. Obstacle Golf requires that we lift the arms as the robot is too wide elsewise.
What did I learn?
As the project was so short, we didn’t cover many mathematical or engineering topics. Yet I still learned a lot as it was my first project:
- Programming basic imperative applications in C.
- Basic heuristic introduction to PID controllers.
- Structured approach to problem solving and in particular a tremendous introduction to group work at Aalborg University.
- Writing a structured report in LaTeX - it has only gotten better since.
- Seeing your robot and comparing it against others is a great motivator. We really did aim for a top spot at the competition!
The contest was a lot of fun, and for our 2nd place we were rewarded with beer in the local university bar, DE-Klubben (which I have visited many times since). The project only lasted 4 weeks before we moved onto a more demanding projects, but it was not insignificant to me, as me and my peers talk about it even on the 10th semester - mostly for the memories and not technical stuff though.
Published 18. May 2023
Last modified 19. May 2023