RoboCup: Autonomous line following robot competition
Part of the series University Projects (5 posts total).- May 18, 2023 - My university projects
- May 18, 2023 - RoboCup: Autonomous line following robot competition
- Jun 06, 2023 - Hi-Fi amplifier for record players
- Jun 07, 2023 - Homemade embedded CPU on an FPGA
- Jul 02, 2023 - Rule-Based economic control of HVAC system
At the Department of Electronic Systems at Aalborg University, the first year students 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.
At the end of the semester we destroyed the robot in celebration. Enjoy this post-mortem POV I stitched together of the robot.
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 software 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. 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.
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