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 / 22673
22672  |  22674
Subject: 
Re: Competitive MINDSTORMS: try again...
Newsgroups: 
lugnet.robotics
Date: 
Fri, 20 Aug 2004 15:04:01 GMT
Viewed: 
1409 times
  
In lugnet.robotics, David Perdue wrote:

given this piece of code:
----
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)
          {

<snip>
             // ...attack!
           until(LBump==thresh+5); // until sumo-bot goes away

<snip>
          }

void Calibrate2()
{
<snip>
    thresh=LBump;
<snip>
}

----

'thresh' will be reading the ambient light in the room. (from the calibrate2
function)

The 'search' routine will immediately go into attack mode (low gear) because
(LBump<=thresh) is true, because both LBump and thresh are both reading the
ambient light in the room.

It's entirely possible as the opponent approaches, it will cast a shadow on the
light sensor, causing the reading to drop below 'thresh', but when the opponent
is lost, the reading should return thresh (value of ambient light in room)

At no point will the reading on LBump go above 'thresh', unless the light sensor
is pointing towards a white robot.  So, the loop:
until(LBump==thresh+5);
will never exit (unless you see a white robot, in which case you DON'T want it
to exit, but it will)


I really hate to slam your book, David, but I also don't want to hear people get
frustrated, and avoid competitions, when the stuff you've printed, doesn't work.

While this book has some interesting ideas, and fun concepts, it seems to me
most of the material is unproven, or even untested, in an actual competition, or
even simulated events, for that matter.

I think it's unlikely "Brain-Bot" would detect an opponent, before it's own
light sensor is knocked loose, and if it did, it would switch from "really
slow", to "so slow you can hardly see it move".

Any question about my opinion?
Steve
http://www.TeamHassenplug.org



Message has 1 Reply:
  Re: Competitive MINDSTORMS: try again...
 
(...) This is actually incorrect - I see where you're getting confused. You are thinking that the Calibrate2() function is always running, and the "thresh=LBump;" is always being updated, correct? You see, Calibrate2() is only run just once, and (...) (20 years ago, 20-Aug-04, to lugnet.robotics)

Message is in Reply To:
  Re: Competitive MINDSTORMS: Now in a store near you!
 
(...) 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 (...) (20 years ago, 20-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