Programming Examples

This section is to help both teachers and students with the programming concepts required to tackle the RoboCup Junior Rescue challenge. Workshops are held each year around Australia to assist beginner to experienced RoboCupers. The examples here are from those workshops.
Note: These are examples only. Sensor values will need to suit the values of the sensors you use on your robots and fields, as all sensors and venues read differently.
A number of programming languages can be used to program Lego robots for RoboCup Rescue including:

  • RoboLab - Rescue and Premier Rescue
  • Mindstorms NXT-G - Rescue and Premier Rescue
  • RobotC - Premier Rescue
  • NXC (Not eXactly C) - Premier Rescue

RoboCup Rescue

The following programming examples are in the Lego Mindstorms NXT-G language. They will work with version 1.1 and 2.0. The standard NXT TriBot robot is used.

1. Rescue Analysis
2. Basic Line Following
3. Alternative Line Following
4. Turn on Green
5. Detect the Chemical Spill
6. Find the Victim
7. Putting it all together

RoboCup Premier Rescue

1. Premier Rescue Analysis
2. Speed Humps
3. Water Tower Obstacle
4. Gridlock
5. Detect the Chemical Spill
6. Find the Victim
7. Rescue the Victim
8. Putting it all Together