Guide to RoboRave Line-Follow

Welcome to the guide to starting RoboRave Line-Follow from scratch

The Challenge

The goal of RoboRave Line-Follow (SPRINT) is to create a robot that can follow a black line and deliver a single ping-pong ball to a tower at the end of the track. The game lasts 3 minutes, and after scoring the first ball, robots may continue scoring balls for the duration of the match. There are three fields for elementary, middle, and high school with increasing difficulty, respectively.



The Rules

Scoring:

Scores are an accumulation of the following tasks:

  • Following the track to the tower

  • Delivering at least one ball

  • Returning back home

  • Delivering the highest number of bonus balls in the time remaining

General Robot Rules:

  • The robot must be fully autonomous and cost $1500 USD or less

  • The robot must fit within the size constraints of 25cm x 18cm with no height restrictions

  • The weight limit for the robot is a maximum of 1kg

For the rest of the tournament rules and specific scoring matrices for each age division, visit the link below to the RoboRave website rules page.

Getting Started

Physical Build:

For the line-follow aspect of the challenge, the in-built colour sensors on the Micromelon rover can be used. Thus, the main focus of the physical build is to design and construct a system to carry and deposit the balls in the tower. The tower is an A4 mailing box, 20cm tall and 10cm wide, with a 10cm x 10cm wide hole at the top for the ping-pong balls.

Because of this, the recommended technique is to build a tower of sorts on top of the Rover with a container to store the balls. This container should also have a system (like a servo) to release the balls when it reaches the tower. Our 3D-printed RoboRAVE Line-follow attachment encompasses these considerations. For more details, click on button below to head to the build guide.

Coding:

For the coding aspect of the challenge, the recommended strategy is to use a basic line following technique with some modifications to suit the challenge. The link to the Micromelon Line Following activity has been added below.

After making the basic line following code, we need to add some conditions, so the robot is aware when it’s reached an intersection, reached the tower, or has returned home. Each situation is represented by a black line perpendicular to the current track. This can be seen in the line following mat examples in the RoboRave rules.

A simple way to detect these is to have an ‘if’ statement checking to see if all three colour sensors on the Rover see black. The ultrasonic sensor may also be used to detect the tower.

When these black areas are detected, the Rover must deduce the area type. This can be done by coding manually for the field. For example, for the MS field, the following coding structure can be used:

  1. Line follow until black area is detected (intersection reached)

  2. Turn at intersection

  3. Follow the line until black area is detected (tower has been reached)

  4. Deposit a ball and turn around

  5. Follow the line until black area is detected (intersection reached)

  6. Turn at intersection

  7. Follow the line until black area is detected (home reached)

Tips and Tricks

Rover Expansion Headers:

One way to make the Rover follow the line faster is to use an external colour and light sensor instead of the three on the Rover. There are several sensors with differing capabilities. One such sensor is the QTR-8RC line sensor array which senses reflected light intensity from 8 infrared sensors. The expansion headers on the Rover can be connected to an external microcontroller which can be used to interface with these external sensors. For further detail about using the expansion header, head over to the guide to I2C and UART pages and the Rover and Arduino Line Follow showcase.

PID Line Follow:

When making your own line-follow code, most simple implementations will have the Rover following the line in a jerky motion. Implementing a PID (Proportional Integral Derivative) controller can smooth this motion and improve the Rover’s ability to follow the line quickly and more accurately. The basic idea is to use reflected light intensity from the line sensors. This value is usually very high on white and low on black, so the goal is to follow the middle point between the two, which we’ll call the grey area.

Our target will be 50% intensity. If the reading is less than that, the Rover will veer away from the line; if it’s greater than 50%, it will turn towards the line. The entire PID equation is excessive for the task, so a simple Proportional controller should suffice in most cases. Check out our guide for more information about making proportional controllers (link below).

Previous
Previous

Build Guide: RoboRAVE Line Follow

Next
Next

Activity: Making Music (Beginner)