Encoder Front Page
SRS Home | Front Page | Monthly Issue | Index
Google
Search WWW Search seattlerobotics.org

Second WORKSHOP 3D RCX LEGO Challenge
held on November 4, 2000
at the
Pacific Science Center
in
Seattle, Washington
Steven D. Kaehler (c) 2000



Introduction

LEGO Bricks are a plastic, toy building-block product that has been around for about fifty years.  Invented by Ole Kirk Christiansen in 1932 and first manufactured in Billund, Denmark in 1949, these colorful little plastic blocks have been in most kids' toy boxes ever since.  They enable children of all ages to express their creativity in two- and three-dimensional form in an almost infinite variety of ways.  I visited LEGOLAND California in Carlsbad (a half hour north of San Diego) in September and I am truly impressed with what can be built with these little bits of interlocking colored plastic, especially in large quantites.

About three years ago, the LEGO Group added the computerized "bricks" called LEGO Mindstorms to the LEGO product line. This product carried an enduring building system into the rapidly expanding world of amateur robotics.  This new frontier seems to have been a good choice for the company since their products have always lent themselves to building robot-like creations.  Also, they penetrated a new market of adults who grew up with LEGO products, but thought they had out grown them.  LEGO Mindstorms seems to have changed that.  One of the great things about these products is that one can buy one of these kits in the afternoon, and by evening have a simple functional robot running around the house.  There are many sample programs included with the kit that can be downloaded once everything is set up.  The LEGO construction of the robot permits things to be changed very quickly and easily and requires no electrical or mechanical expertise.  Changes can be made to add or remove components in minutes without tools.

The programming environment chosen for these products was designed to be as intuitive and easy as the blocks themselves, enabling even young children to quickly pick up on the fundamental concepts of this type of programming.  The sample programs are, however, relatively simple.  Designing your own from scratch is still a software engineering function that is never as easy as it seems like it ought to be.  Besides introducing robots to many people who had never considered it, these kits have also inspired a number of robotic contests that challenge users to accomplish seemingly simple tasks using stock and custom components.  The Second Workshop 3D RCX LEGO Challenge was just such a contest.  What follows is a description of my experience as a contestant.



The Challenge

The event was staged at the Pacific Science Center (PSC) in downtown Seattle, just outside their new Boeing 3-D IMAX theater.  This map shows the location within the PSC.  Workshop 3D's Ray C. Freeman III hosted the contest and he and some volunteers set up and ran it. The PSC staff provide tables, ropes, benches, the network connection for the webcast, and other logistical support.

Three contests were staged: Line tracking at 1:00 PM, Sumo at 2:00 PM, and Puck gathering at 3:00 PM.  The exhibition events were used as filler between events if there was time to try to keep the audience around.  I entered a robot in the "code only" segment of the line tracking contest, and then modified it slightly for the sumo contest and exhibition event. I didn't even try to make something for the puck gathering contest because of the sophistication of the robots and Gus Jansson's reputation.

Each contest lasted about an hour.  A total of eight robots competed in all the contests and some competed in multiple contests with minor modifications made between them.  All contests took place on a round elevated table with low side walls.  A smaller raised disc was place on the table for the sumo event and removed afterward.  Click here for a complete list of the contestants and descriptions and results of each event.


The LEGO RCX Challenge contest arena with sumo platform in place

A video camera was set up on one side of the table to webcast the events robots while a second camera covered two commentators who helped give the event a professional sports-like appearance.  The commentators also interviewed contestants and I'm sure learned a lot about robots as the day passed.  If anyone reading this article saw the webcast of this event, please let Ray Freeman know how it came across and how he might improve it.


My Participation & Robot

I was able to enter this contest serendipitously while pulling together information for the article about the first challenge contest.  As I corresponded with Ray Freeman via email trying to get my facts straight on the first contest, we got on the subject of the upcoming contest.  I lamented that I didn't own a LEGO Mindstorms Robotic Invention System (RIS) kit and wasn't in a position to just go out and buy one (~$150-200!).  He happens to own several kits and quite unexpectedly offered to loan me one if I'd provide some feedback on the "standard robot" assembly instructions, and enter a robot in the "code-only" segment of the contest and others if time and ambition permitted.  I agreed to do this and stopped by his place to pick up the kit.  Little did I realize just how much I had bitten off and agreed to chew.

stdrobot.jpg (20611 bytes)The "code-only" contest was a way of permitting remote or long distance participation in at least one part of the contest.  Participants would build the "Standard Line Tracking Robot" (left) from online instructions he provides, develop their program to run on their own robot at home, then send their program to Ray to be downloaded into and run on his Standard Line Tracking Robot at the contest.  The choice of development environment was limited to systems available from Ray's website since he had to be able to download the code.  There were five contestants including me, four of whom were out of state.

I figured it that it wouldn't take long to build "Emefar" (MFR), my multi-functional robot, (only about 2 hours with my then six-year-old's help) or get a line tracking program running.  After all, LEGO robot software is supposed to be easy, right?  Wrong!  As it turned out, I spent a week just figuring out the RCX brick and its idiosyncrasies.  I tried the included LEGO software but found it confusing and awkward (my personal opinion).  I settled on "BOTCODE" from the programming section of Ray's website because it seemed pretty straight forward, looked like a cross between Pascal and BASIC, and was easy to get started programming.  Then I spent several more weeks trying to determine a program strategy that would work with only the one light sensor provided in the kit.  The biggest obstacle was figuring out the response timing between the motors and sensor.  I needed to know how quickly the sensor data updated and reflected what the robot actual saw.  The motors then had to be appropriately commanded to move the robot forward as quickly as possible without losing the line completely.  After abandoning the first four approaches I tried, I settled on a simple threshold detection of the right edge of the line and a kind of forward waddling motion (alternately powering the motors).  This strategy (Line_Tracker5.BCD) proved quite reliable and I had high hopes that it would do well for me at the contest.  Once I finished the line tracking program, I added an easily removable blade to the front of MFR that used the RIS kit's touch sensors to make the line tracker into a sumo (Sumo.BCD).  The fake eyes and mouth came about as an afterthought, realizing that there would be lots of kids at the event and that my robot needed a little more "personality".  For the floor exercise, I borrowed an existing sample program, which I tweaked a little, that played "Popcorn" while the robot danced (Popcorn.BCD).  Except for not being able to hear the song, the audience enjoyed MFR's performance.
 

"Emefar" (MFR) is a multi-functional robot (sumo configuration) based on the
Standard Line Tracker designed for Ray Freeman by Gus Jansson
(Click on thumbnail for larger image)


Line Tracking Robots 
(Click on thumbnail for larger image)

The line tracking event was easier this time than in the first challenge since the line was much straighter.  If the robot didn't lose sight of the line, it usually made it to the end.  One contestant simply aimed his robot at the finish point and let it shoot straight across the ring.  Needles to say, Gus Jansson still beat him.  One thing became very clear, more light sensors was definitely better.
 

Robot Sumo - The "brick" really is a robot

The robot sumo event was not quite as exciting as the Northwest Robot Sumo events many SRS members are familiar with because the LEGO motors are not very powerful or fast.  As a result, this event typically came down to a shoving match between the two robots with incremental progress made by whoever had better traction.
 

Puck Gathering - Gus Jansson "cleaned up" in this event

What can I say about the puck gathering event?  For anyone who was there or who has seen Gus's robot in action, it's fast and efficient at finding and gathering lots of pucks quickly.  It grabs and literally throws the pucks against a deflection screen (purple bars on top) at a rate of one to two pucks a second.  No one else stood a chance (there was only one other competitor).  This was also Gus's second such contest and he's made significant improvements to his robot since the last time.



LEGO Robots?

Among serious robot builders, LEGO Mindstorms controllers are usually considered somewhat limited, and most of the contests disallowed custom hardware, so creative ingenuity had to make up for the apparent functional deficiency.  This resulted in some pretty amazing machines being constructed and some surprising performance.  "Not Quite C" or NQC seems to be the programming environment of choice by many of the contest participants.  It offers a way to make the RCX brick do much more than the basic LEGO software, in an environment that is much more programmer-friendly.  In retrospect, I'd probably go that way myself if I ever do this again.



The Crowd & Exhibition Event

The event was well attended by many people, some who came specifically to see it and others who just happened to be in the area at the time and saw a crowd.  As you can see from the pictures, there were lots of kids.  Click on the images above for larger pictures.

Fellow SRS members Pat O'Dowd, Jim Wright, Doug Bell, and Gus Jansson participated, but Gus pretty much walked away with the prizes.  Doug Kelley stopped by to offer encouragement and see how the event was going.  Doug Bell displayed his LEGO ZNAP walker (shown to the left) during the exhibition event.  I ran the "Popcorn" program on MFR.  The people watching seemed to enjoy the antics of the robots and cheered when they succeeded in accomplishing something.  Robots can almost seem alive when they do something unexpected, particularly interesting, or just plain funny.  A number of vendors donated prizes for the events which were awarded to the contest winners at the end each event.

The pictures above were taken near the beginning of the contest just before the Line Tracking event started. A definite improvement over the first event was having benches for the audience to sit on around the contest area.  I think this kept some folks around longer and made it easier for people standing around and walking by to see what was happening.  Ray had also promised video monitors for this event so that folks toward the back and around the area can get a better view of the action without having to look over or between people.  They were located on a tower just out of view to the right in the right photo above.  This worked well and gave people an good idea of what the webcast looked like.



Photo Galleries

More pictures from this challenge are available in the Second RCX LEGO Challenge photo gallery.  Click here for pictures from the First RCX LEGO Challenge photo gallery.

The Third WORKSHOP 3D RCX LEGO Challenge is probably in its planning stages now and should be announced soon.  It will likely happen in the same part of the PSC as the other events, probably starting around 1:00 PM.



Ray C. Freeman III of WORKSHOP 3D Design Studio has challenged his colleagues to build autonomous robots using the LEGO RCX 1.0 microcomputer-in-a-brick, as supplied with both the LEGO Mindstorms product line and the LEGO dacta ROBOLAB product line, and to compete against the clock, in head-to-head events, in group activities, and in exhibition-only events.  For additional information on these events, visit his website at (http://www.workshop3d.com/rcx) or contact Ray Freeman at   (rayiii@workshop3d.com).



I'd like to offer a special thanks to Ray C. Freeman III for being so kind as to loan me a LEGO Mindstorms Robotic Invention System (RIS) to play with, er...use.  Without this most unexpected kindness, I would have just been another observer and this article just a replay of the one before.  Though I didn't win any of the events and still don't own my own LEGO Mindstorms, I did receive a copy of book "The Unofficial Guide to LEGO Mindstorms Robots" which explains much about the brick, sensors (stock and custom) and NQC.  Now I just need to get my own RIS.

I hope this article has proved to be interesting and informative, perhaps even motivating.  If you have any other comments or questions about it, feel free to contact me at sdk6772@yahoo.com.



Disclaimer
LEGO, LEGO MINDSTORMS, RCX, ZNAP, and ROBOLAB are trademarks of The LEGO Group. WORKSHOP 3D is a registered trademark of WORKSHOP 3D, Inc.  Their use in this article is non-commercial and for reference only.  The author is not in any way affiliated with the LEGO Group, the Pacific Science Center, or WORKSHOP 3D, Inc.