To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 22669
22668  |  22670
Subject: 
Re: Competitive MINDSTORMS: Now in a store near you!
Newsgroups: 
lugnet.robotics
Date: 
Fri, 20 Aug 2004 01:04:14 GMT
Viewed: 
1194 times
  
In lugnet.robotics, Steve Hassenplug wrote:
In lugnet.robotics, David Perdue wrote:

So let's look at this portion of code:

        /* if Input Port 1 is less than "thresh" or
         * equal to 100*/
          if(LBump<=thresh | LBump==100)
          {
           BL = 1;
           BR = 1;
           SwitchSTurn(); // if true, go on slow speed and...
           speed = 1;
           Forward();   // ...attack!
           until(LBump==thresh+5); // until sumo-bot goes away
           SwitchF();  // stop attacking
           speed = 0;
           BL = 0;
           BR = 0;
           PlaySound(SOUND_UP);
          }
       }
    }
}

So once LBump has detected the opponent, ZR1 switches to slow speed with
SwitchSTurn()--which is the important part--and stays like that until it loses
sight of the opponent. The whole task, and essentially a major part of ZR1's
sub-strategy, rely on the switching to slow speed.


...But I don't see how LBump will detect the opponent.

Or better yet, how does it know when it loses sight of the opponent?

If you can explain this, then I'll buy a book.

In theory, the whole design of this robot is very good, and would work very
well, but in pratice... I don't think it will work as expected.  That's why I'm
curious how these designs have done in competition.

Steve

First, let me assure you that the searching light sensor method does work - I've
tested it, and my technical reviewer has tested it. This is how it works, and
the following is part of ZR1's chapter:

"It’s commonly known among MINDSTORMS fans that you can use the RCX’s IR
message sender and the light sensor together as a distance sensor. However, you
can also use the light sensor by itself, without the RCX IR message sender, as a
distance sensor. Does this really work? Absolutely! When the opponent moves in
front of ZR1’s second, searching light sensor, it returns a much lower value
than it normally would give. When we get the lower values, we know we have the
opposition in sight."

So, that "second, searching light sensor" is LBump; and when the opponent goes
in front of the light sensor, it returns a lower value. And the programming
watches for that lower value, and when it sees it, it knows that ZR1 has the
opponent in sight.

How does ZR1's program know when ZR1 has lost sight of the opponent? The answer
involves a somewhat complicated principle because of specific problems that come
up, but the general idea is simple: The searching light sensor reads lower
values when the opponent is closer to it, and higher values as the opponent goes
away from it. Therefore, once ZR1 has "zoned in" on the opponent with its
searching light sensor, it will stop "chasing" it when the searching light
sensor returns a value over the amount of X, because it knows that at that
point, it has lost sight of the opponent.

Thanks,

David J. Perdue

www.davidjperdue.com

www.davidjperdue.com/competitivemindstorms



Message has 1 Reply:
  Re: Competitive MINDSTORMS: try again...
 
In lugnet.robotics, David Perdue wrote: given this piece of code: ---- (...) <snip> (...) <snip> (...) void Calibrate2() { <snip> thresh=LBump; <snip> } ---- 'thresh' will be reading the ambient light in the room. (from the calibrate2 function) The (...) (20 years ago, 20-Aug-04, to lugnet.robotics)

Message is in Reply To:
  Re: Competitive MINDSTORMS: Now in a store near you!
 
(...) Right. I can see the two motors connected to port B will slide the axles and switch the drive train from "fast" to slow. (...) ...But I don't see how LBump will detect the opponent. Or better yet, how does it know when it loses sight of the (...) (20 years ago, 19-Aug-04, to lugnet.robotics)

29 Messages in This Thread:






Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR