Hardware Guides
  Home arrow Hardware Guides arrow Page 8 - Introduction to LEGO MINDSTORMS Roboti...
Dev Hardware Forums 
Computer Cases  
Computer Processors  
Computer Systems  
Digital Cameras  
Flat Panels  
Gaming  
Hardware Guides  
Hardware News  
Input Devices  
Memory  
Mobile Devices  
Motherboards  
Networking Hardware  
Opinions  
PC Cooling  
PC Speakers  
Peripherals  
Power Supply Units  
Software  
Sound Cards  
Storage Devices  
Tech Interviews  
User Experiences  
Video Cards  
Mobile Linux 
APP Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
HARDWARE GUIDES

Introduction to LEGO MINDSTORMS Robotic Sumo
By: Apress Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 28
    2004-08-16

    Table of Contents:
  • Introduction to LEGO MINDSTORMS Robotic Sumo
  • Can You Build a Sumo-Bot?
  • How Is Robotic Sumo Played?
  • Rules of the Game
  • A Common Rule Set
  • Tools for Building and Programming a Sumo-Bot
  • Building Blocks
  • Navigational and Searching Mechanisms
  • Robotic Sumo: A Game Within a Game

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Introduction to LEGO MINDSTORMS Robotic Sumo - Navigational and Searching Mechanisms


    (Page 8 of 9 )

    When giving their robots navigational abilities, people will mount homemade electronic compasses, rotation sensors, and other amazing devices on their robots. Then they will load custom firmware into their RCX to complement these devices.

    Unfortunately, just about any possible sensor or amazing contraption made for navigation you might place in your sumo-bot will not operate properly in robotic sumo. It simply will not work! This doesn’t have anything to do with the quality of the device or software. The reason is that when a sumo-bot is hit by another sumo-bot (which is going to happen in robotic sumo), it confuses the internal software, and the sumo-bot is immediately lost.

    Can you use custom (homemade) distance sensors (a sensor that can see if something is in front of it) to help your sumo-bot search for its opponent? Some events do not allow custom sensors, so they are not implemented in the sumo-bots described in this book. As an alternative, the light sensor can be used to detect the proximity of another object, to some extent. There are also other methods you can use to help find the opposing robot, one of which you'll see in a later chapter.

    Programming Tools

    The programming language included with the RIS—RCX Code—has been greatly improved since its first release. It is very capable of programming a sumo-bot efficiently and reliably. But the RCX Code language can be difficult to read with a large program, and people who are used to using textual programming languages can find it hard to work in this programming environment.

    To program the sumo-bots described in this book, I have chosen the programming language NQC (for Not Quite C), which was created by Dave Baum. This is a very powerful textual language that is fairly easy to understand and learn. It is quite well known among the MINDSTORMS community, and many builders use this language to program all types of robots, including other LEGO microcomputers.

    John Hansen is the maintainer of a great integrated development environment (IDE) known as Bricx Command Center (BricxCC), and this is currently the most popular way to program in NQC (see Figure 1-4). You can download the BricxCC program for free from http://bricxcc.sourceforge.net/.

    perdue 

    Figure 1-4. Bricx Command Center’s main screen

    NOTE As of this writing, Dave Baum has recently turned over the maintenance of NQC to John Hansen. John has transferred the NQC web site to a new address, http://bricxcc.sourceforge.net/nqc/, and all future versions of NQC, as well as documentation and information, will be appearing at this web address as soon as the switch has been completed.

    A recent version of BricxCC, 3.3.7.6, now supports several different programming languages and all of the MINDSTORMS programmable bricks (and a few other LEGO programmable bricks as well). A window entitled “Searching for the brick” pops up (see Figure 1-5) before taking you to the main screen of BricxCC. In this window, you pick your microcomputer, programming language, and port for your IR tower. Thanks to John Hansen’s hard work and continuing efforts, programming with NQC and many other languages is now very user-friendly.

    perdue 

    Figure 1-5. Searching for the Brick screen

    As I mentioned, you are not limited to using only NQC or RCX Code to program your sumo-bots. If the rules for a particular event allow other programming languages, it might be a good idea to take advantage of this factor (yes, this is a factor in robotic sumo). What languages could you use? A great place to start is with those languages that BricxCC now supports. Let’s go through these custom-firmware programming languages to see what they’re about:

    • brickOS: This language allows the user to program the RCX in the real-life programming language C. brickOS is renowned for its speedy execution of code.

    • pbForth: This language is based on Forth, which is a well-known and veteran programming language. The name pbForth stands for Programmable Brick Forth. With its highly unique features and code structuring, this is a very powerful language with great potential.

    • leJOS: This language is developed around Java. Besides the typical structure and heritage of Java, this language boasts numerous special features including navigational abilities, behavior controlling, and more.

    NOTE In the past, brickOS, pbForth, and leJOS were difficult to set up and use. Now, using BricxCC version 3.3.7.6 and some downloadable all-in-one files that John Hansen has included on his web site, operating these languages is a breeze. The downloads, information, and John’s e-mail address for support can be found on the BricxCC web site: http://bricxcc.sourceforge.net/.

    All three of these languages must be uploaded to the RCX in the form of custom firmware. Although none of them are used for the sumo-bots in this book, don’t let that stop you from using any of them. If you already know how to program in one or more of these languages, or would like to eventually learn any of them, feel free to use that language for the sumo-bots described in this book and for other sumo-bots you design. It will most likely give your sumo-bot a fighting edge!

    This chapter is from Competitive MINDSTORMS: A Complete Guide to Robotic Sumo Using LEGO MINDSTORMS, by David Perdue (Apress, 2004, ISBN: 1590593758). Check it out at your favorite bookstore today. Buy this book now.

    More Hardware Guides Articles
    More By Apress Publishing


     

    HARDWARE GUIDES ARTICLES

    - Setting Up a VPN on a Mac
    - Waterproof Music
    - A Look at Flexible Displays
    - Animating a Nokia Cell Phone Theme with Carb...
    - Eleven Best Portable Headphones
    - Editing a Nokia Cell Phone Theme in Detail w...
    - Creating a Nokia Cell Phone Theme with Carbi...
    - Securing Your iPhone
    - Using Audio Recording to Convert DRM Protect...
    - Converting DRM Protected WMA to MP3
    - Watch TV with ATT`s LG Invision
    - Valentine`s Day Gift Guide: Technical Gifts ...
    - Recovering Deleted Data
    - Gotta Have Green Gadgets
    - Top Five Green Laptops






    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek