IC Robotics Competiton - September 4, 2006

NEW! The WINNERS! We will be presenting certificates and awards, and showing a highlights video sometime soon!

NEW! Competition photos

Questions? Comments? Feedback? Email than@cmu.edu

Introduction

The Robotics Institute is an academically diverse place; the truth is, sometimes people can spend quite a bit of time here without getting their hands dirty working with real robots. To address this, we present the first annual (hopefully) Immigration Course Robotics Competition.

Working in teams of three, you will be presented with a task which you must design and build a robot to solve. We will be using Lego Mindstorms with the RCX block for robot control. Programming will be done with the NQC programming language.

When forming groups, we will try to balance out individual specialties: ideally, each group should contain at least one experienced programmer as well someone who is mechanically inclined (or at least has experience with Legos).

Schedule

Warm-Up Activity

The warm-up task is intended to familiarize you with the tools and techniques for working with the Mindstorms kits.

Working in your group, design, build, and program a line-following robot. Your group has been given a sheet of newsprint with a line pattern written on it. Make a robot that can use a one or two Lego light sensors to follow the line from the start to the end.

If you're stuck, check out the Hints and Tips below. You might want to start out with the basic differential-drive robot instructions.

Task and Rules

Controlled coverage for painting is an important task in the field of industrial robotics. We'll be looking at a slightly less complex (but still challenging) problem: coloring closed 2D figures.

Your group will be given three sheets of newsprint, each with a different closed line figure drawn in heavy black ink. In addition, you will get three markers colored red, blue, and black. Using the Mindstorms kits, you must design, build, and program a robot to autonomously color in the figure to the best of its ability.

You should choose either the red marker or the blue marker for coloring your figures in (no black, please!). The red marker lines are nearly indistinguishable from white to the Lego light sensor, whereas the blue lines can be detected as slightly lighter than black.

Competition Rules:

Hints and Tips

About Lego Motors

The Lego motors are actually quite powerful little geared motors (although they do have plenty of inertia). The RCX commands the motors using an H-bridge motor controller. This means that a motor can be in one of four states: forward and backward (obvious), locked, or floating. A locked motor uses electricity to actively resist motion, whereas a floating motor is only slowed by friction. You can also program the RCX brick to change each motor's duty cycle to change speeds without totally stopping or floating the motors.

Sensors

We have three types of lego sensors: rotation sensors, light sensors, and touch sensors. If the light sensors are mounted close to a surface (such as our newsprint), they can distiguish between different colors (such as are drawn by our pens).

Don't forget to tell the NQC what kinds of sensors you are using when you write your program.

          SetSensorType(SENSOR_1, SENSOR_TYPE_LIGHT);
          SetSensorType(SENSOR_1, SENSOR_TYPE_ROTATION);
          SetSensorType(SENSOR_1, SENSOR_TYPE_TOUCH);
        

Gear Ratios

This is just like your bicycle or your car. Remember: small gear driving a big gear gives high torque, low speed. Big gear driving a little gear gives low torque, high speed. Also, don't overlook belts and pulleys for doing various tasks.

Construction Ideas

Lego construction for robots might be a little bit different than how you use to build houses or spaceships with Legos as a kid. The main thing to remember is that it's usually better to assemble rigid frames of pegged-together Technic-style pieces than it is to simply stack Legos together using the normal Lego adhesion style (see an excellent introduction to the principles of good Lego Design and the definitive Art of LEGO Design by Fred Martin). Probably the most popular design is the differential-drive robot -- all of the robots described below are differential-drive.

Three example robots

Instructions. A quick and easy design. Pen up/down, no encoders, single light sensor, fast diff-drive. Easily customizable. See it run (without a pen) in this movie (Quicktime).

Instructions. A more involved design. Dual encoders, single light sensor, slow (precise) diff-drive. Very robust. See it actually color stuff in in this movie (Quicktime).

Instructions. The most intense design yet! Two touch sensors on insect-like antenna, a light sensor, and a medium-speed diff-drive. Very well balanced and robust.

Programming Ideas

This example code (download) is a naive attempt to solve the task by repeatedly driving in a straight line until it hits a line, and then turning. See the code executed on the simple robot design in this movie, and a slightly more sophisticated version in this movie (Quicktime).

NQC Programmer's Guide