By Tanya Morton
Earlier this year, MathWorks celebrated its 30 Year Anniversary. As part of the festivities, we organised a Robotics Competition where teams competed against each other to program a LEGO MINDSTORMS NXT robot to complete a 2D navigational challenge in the fastest time. The robot was programmed using the Simulink Support Package for LEGO to visit 9 target points on a 2 metre by 2 metre mat. The teams were free to program their robot to visit the 9 targets in any order. The robot had to wait for 2-3 seconds at each target before the scoring system registered that the robot had found the target successfully.
A robot tracker app captured a live video of the robot and provided feedback on the progress of the robot around the targets as shown in the video below:
Figure 1. Video of Robot Tracker App.
As shown in the diagram below, a video positioning system, consisting of a webcam and a Raspberry Pi, used the coloured markers to calculate the position of the robot in the arena. The Raspberry Pi transmitted the position information back to the robot over Bluetooth to form a closed-loop control system.
Figure 2. Competition setup.
28 teams and over 100 MathWorkers from our worldwide offices participated in the competition.
Figure 3. LEGO MINDSTORMS NXT robot in the arena.
We organised the teams into two groups.
Figure 4. Competition structure.
The qualifying round for Group A was intense.
Figure 5. Leaderboard from the Group A qualifying round.
It was tight at the top with The Flying Dutchman just missing out on a Top 4 place by a tenth of a second.
The Top 4 teams in Group A raced against each other, with LegOz, an Australian team consisting of a consultant, an application engineer and a training engineer, and AEG Germany, a team of application engineers, emerging the fastest and progressing to the first semi-final, held in front of over 2800 people at the company meeting.
Figure 6. The Group A semi-final race at the company meeting.
Team AEG Germany just lost out in the semi-final when their robot did not wait for long enough at their fifth target point before moving on and Team LegOz from Australia went through to the final.
We held the group B qualifying round the following day. The two semi-finalists emerged as team Navik, from the Engineering Development Group in India, and team Great Qin, a team of software developers from the US.
Figure 7. Group B semi-final runs by Navik and Great Qin.
The contrasting paths through the target points are shown in the figures above, with Great Qin’s robot moving more efficiently between the target locations.
Figure 8. The Group B semi-finalists: Great Qin and Navik.
In the overall final, the path taken between the final points by LegOz was the same as Great Qin, but their speed over the ground was slower and Team Great Qin went on to triumph.
Technical strategies taken by Great Qin included:
- Splitting the workload amongst the three team members with distinct areas of focus (algorithm design, tuning of the gains, and hardware)
- Reducing the time their robot waited at each target location to a minimum for the point to be registered
- Recognising that a brute force approach to find the shortest path between the 9 targets was computationally tractable.
Figure 9. The overall winning team: Great Qin.
The MathWorks Robotics Competition was great fun, with teams learning from each other and improving their skills in controller design, modelling & simulation, optimization, and working with hardware.
A future blog with more detail of the hardware set up will be coming soon! In the meantime, you can learn more about LEGO NXT projects with MATLAB and Simulink here: http://makerzone.mathworks.com/lego/.