The Problem


Our task in this project is to design a novel solution to the following problem.

Given the above 3x3 grid of black electrical tape and starting from a home position in one corner, our robot must navigate the grid to retrieve coins and return them to its home position. The coins will be positioned on the intersections of the tape grid. While navigating the grid, our robot may at any time encounter its opponent-whose goal is the same, but has a home position directly opposite our robot. When a robot has completely lost where it is or can no longer track the tape, the robot may emit a loud sound to inform its owner it is lost. A lost robot is returned to its home position where it must suffer a 60 second penalty. Whichever robot has more coins in its home position after 10 minutes is the victor.


Each team uses the same pre-assembled Rug Warrior mobile robot to interact with the environment. The Rug Warrior kits contain:

The Rug Warrior boards (MC68HC11 based) also contain a serial port interface. To handle all the high-level "intelligent" behaviours of our robot, the mobile unit will also carry an embedded Motorola MC68EZ328 ("DragonBall") processor (contained in a Palm Pilot) that communicates via UART to the 68HC11.

Our Solution

We were required to create a controlling (software) system to solve the above problem. The following is a brief outline of our steps to complete the project. Please see our official project report available from the Documentation section for an in-depth analysis.

The first step was to implement a custom real-time operating system (RTOS) for the provided hardware. The RTOS is a prioritized, pre-emptive multi-tasking kernel. All competing robots run a common OS. The specification for this OS is provided by the competition co-ordinator Dr. Mantis Cheng and is available here.

Following rigorous testing and verification of the OS, we designed the robot behavioural application which would run on top of the RTOS. The behaviours were designed as a set of concurrent, interacting finite state machines (FSMs). The system was partitioned into two main pieces: the High Level Control and the Low Level Control. The High Level Control resides on the Palm Pilot and directs the robot with abstract commands, i.e. "Go Forward to Next Intersection" or "Turn Left." The Low Level Control resides on the Rug Warrior hardware to carry out the commands of the high level. The Low Level Control directs all the motors and acuators of the hardware and relays current sensor input to the high level. This is shown in the following diagram:

When the complete design had been precisely specified, only then could implementation begin. The entire project was written in C, the Palm code compiled with a gcc compiler and the 68HC11 code compiled with the ImageCraft ICC11 compiler. First, drivers for the sensors and acuators provided by the hardware were integrated into the OS. Next, we established the code and infrastructure to enable communication over the serial link between the high and low level. Finally we translated our defined behaviours into processes to run on our OS. The movement actions were scheduled by the Low Level Controller RTOS and the "intelligent" behavious were scheduled by the RTOS running the High Level Control.

The final product took 3 months to complete, but is regarded by many as this year's top competitor.