Go to Post Sorry [the easy button] does not exist in robotics :D - Arkorobotics [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 7 votes, 5.00 average. Display Modes
  #31   Spotlight this post!  
Unread 04-05-2011, 17:23
Jon Stratis's Avatar
Jon Stratis Jon Stratis is online now
Electrical/Programming Mentor
FRC #2177 (The Robettes)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Minnesota
Posts: 3,743
Jon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond repute
Re: Please help Wave Robotics earn $1,000!!!

Quote:
Originally Posted by RMiller View Post
At the rate this is going, it might be over 1,000,000 for the total count (figure 40,000 today x 25 days). Actually, it has been the better part of 40,000 in under 5 hours!
I think your underestimating... as students get off school this afternoon, I expect the numbers to start skyrocketing. Can we hit 100k tonight?
Reply With Quote
  #32   Spotlight this post!  
Unread 04-05-2011, 17:54
bobrenjc93 bobrenjc93 is offline
Registered User
FRC #3061 (The Federation)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2009
Location: Naperville, Illinois
Posts: 20
bobrenjc93 is an unknown quantity at this point
Send a message via AIM to bobrenjc93
Re: Please help Wave Robotics earn $1,000!!!

I'm so tempted to write an automated coin deposit script...
Reply With Quote
  #33   Spotlight this post!  
Unread 04-05-2011, 18:02
WarpSpeed10 WarpSpeed10 is offline
Registered User
FRC #0111 (Wildstang)
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Illinois
Posts: 19
WarpSpeed10 is an unknown quantity at this point
Re: Please help Wave Robotics earn $1,000!!!

And that's the 50,000th coin. You guys are awesome. Hope you win
Reply With Quote
  #34   Spotlight this post!  
Unread 04-05-2011, 18:06
Robotmmm Robotmmm is offline
Registered User
no team
 
Join Date: Apr 2011
Rookie Year: 2011
Location: USA
Posts: 132
Robotmmm has a brilliant futureRobotmmm has a brilliant futureRobotmmm has a brilliant futureRobotmmm has a brilliant futureRobotmmm has a brilliant futureRobotmmm has a brilliant futureRobotmmm has a brilliant futureRobotmmm has a brilliant futureRobotmmm has a brilliant futureRobotmmm has a brilliant futureRobotmmm has a brilliant future
Re: Please help Wave Robotics earn $1,000!!!

We can do it!

100,000 by midnight.

(And let's do it w/o all those slick scripts I know you guys could come up with.)
Reply With Quote
  #35   Spotlight this post!  
Unread 04-05-2011, 21:20
efoote868 efoote868 is offline
foote stepped in
AKA: E. Foote
FRC #0868
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2005
Location: Noblesville, IN
Posts: 1,391
efoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond repute
Re: Please help Wave Robotics earn $1,000!!!

Quote:
Originally Posted by Andrew Schreiber View Post
Actually yes, I'm curious how you tell where the coins are.

(Hey, it is a really cool application and I'm curious!)
It took me about ~30 minutes to write this (I wrote something similar for a different thing oh so long ago).

I apologize for using magic numbers for pixel locations. Also, do not run this if you're not willing to give up the use of your computer for a minute.



Code:
/*
 Copyright (C) 2011  Evan Foote

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

import java.awt.AWTException;
import java.awt.Color;
import java.awt.Robot;

public void robotRunner()
{
  try
  {
    Robot myRobot = new Robot();
    myRobot.delay(4000);

    //get the current system time for reference on how long to run
    long time = System.currentTimeMillis();

    int loops = 0;

    int x = 560; //coordinate of the screen in pixels where the coins appear
    int y = 560;             
    int dx = 0; //or offset, where we're sampling
    int dy = 0;                
    int xmax = 240; //size of the rectangle we're sampling
    int ymax = 150;                
    int xsamp = 40; //AKA the step size between samples
    int ysamp = 20;

    Color c; //the sampled color

    int cnt = 0; //The number of coins we've found

    //run main loop for about 1 minute
    while (System.currentTimeMillis() - time < 1*60*1000) 
    {
      //iterate through each coordiante in the sample space
      for (dx = 0; dx < xmax; dx += xsamp)
      {
        for (dy = 0; dy < ymax; dy += ysamp)
        {
          //snag the color where we're sampling
          c = myRobot.getPixelColor(x + dx, y + dy);

          //check and see if the color is something other than white (like yellow)
          if (notWhite(c))
          {
            //move the mouse to that location
            myRobot.mouseMove(x + dx, y + dy);
            //increment the count so we know when to stop
            cnt++;

            //subtract this sample so we can check again
            dy -= ysamp;

            //left click the mouse, wait, drag it to the piggy bank, wait,
            //release it, wait.
            myRobot.mousePress(16);
            myRobot.delay(50);
            myRobot.mouseMove(448, 537);
            myRobot.delay(50);
            myRobot.mouseRelease(16);
            myRobot.delay(50);

            //TODO: CAN BETTER THIS CODE by:
            //checking that the coin traveled with the mouse. If it didn't,
            //subtract 1 from the cnt and try again.

            //alright, grabbed 5 coins. click on the refresh button
            if(cnt == 5)
            {
              myRobot.mouseMove(1109, 87);
              myRobot.delay(50);
              myRobot.mousePress(16);
              myRobot.delay(50);
              myRobot.mouseRelease(16);

              //wait a second for the page to refresh. Slower internet speeds
              //should wait longer.
              myRobot.delay(1000);
              break;
            }//if count is at 5
          }//if sample is not white
        }//for each y pixel

        //Putting this in the outer for loop so we can break from it
        //as well.
        if (cnt == 5)
        {
          //reset the count and the iteration
          cnt = 0;
          break;
        }
      }//for each x row

      //if dy >= ymax, it means that we've traveled all the way and didn't
      //spot 5 coins. something went bad, refresh the page.
      if (dy >= ymax)
      {
        myRobot.mouseMove(1109, 87);
        myRobot.delay(50);
        myRobot.mousePress(16);
        myRobot.delay(50);
        myRobot.mouseRelease(16);

        myRobot.delay(1000);

        cnt = 0;
      }

    loops++;
    }//while loop

    System.out.println("Number of loops run: " + loops);
  }//try
  catch(Exception e)
  {
    //not sure what would cause above code to be more than exceptional, but
    //if it is, I don't care and we can stop running here.
  }
}

private boolean notWhite (Color c)
{
  return (c.getRed() + c.getBlue() + c.getGreen() < 255*3);
}
__________________
Be Healthy. Never Stop Learning. Say It Like It Is. Own It.

Like our values? Flexware Innovation is looking for Automation Engineers. Check us out!
Reply With Quote
  #36   Spotlight this post!  
Unread 04-05-2011, 21:31
gyroscopeRaptor's Avatar
gyroscopeRaptor gyroscopeRaptor is offline
Registered ConfUser
AKA: Mark McGivern
FRC #3633 (Catalyst)
Team Role: College Student
 
Join Date: Dec 2010
Rookie Year: 2011
Location: Albert Lea, MN / Troy, NY
Posts: 360
gyroscopeRaptor has a spectacular aura aboutgyroscopeRaptor has a spectacular aura about
Re: Please help Wave Robotics earn $1,000!!!

I suggest you remove the script. It's highly likely that the rules don't have anything good to say about macros to gain points. This could result in Wave Robotics losing by default.

Last edited by gyroscopeRaptor : 04-05-2011 at 21:35.
Reply With Quote
  #37   Spotlight this post!  
Unread 04-05-2011, 21:44
Duke461's Avatar
Duke461 Duke461 is offline
Boiler Strong.
AKA: Ben Carson
FRC #0461 (Westside Boiler Invasion)
Team Role: Alumni
 
Join Date: Dec 2010
Rookie Year: 2010
Location: West Lafayette, Indiana
Posts: 864
Duke461 has a reputation beyond reputeDuke461 has a reputation beyond reputeDuke461 has a reputation beyond reputeDuke461 has a reputation beyond reputeDuke461 has a reputation beyond reputeDuke461 has a reputation beyond reputeDuke461 has a reputation beyond reputeDuke461 has a reputation beyond reputeDuke461 has a reputation beyond reputeDuke461 has a reputation beyond reputeDuke461 has a reputation beyond repute
Re: Please help Wave Robotics earn $1,000!!!

60,000
__________________

The opposite of excellence is good enough.
2012-2013 President; 2011-2012 Vice President
2011-offseason FRC Student Drive Coach; 2010-11, 2011-2012 VEX Drive Coach
2011, 2010-offseason FRC Driver/Operator
2012, 2011-offseason, 2010-offseason FRC Human Player
Find me on: Facebook, Gmail, Twitter, Tumblr, Blogger/Blogspot
Reply With Quote
  #38   Spotlight this post!  
Unread 04-05-2011, 22:20
BrianT103's Avatar
BrianT103 BrianT103 is offline
Registered User
AKA: Brian Taylor a.ka. BT
FRC #0103 (Cybersonics)
Team Role: Mentor
 
Join Date: Apr 2006
Rookie Year: 2006
Location: Kintnersville, PA
Posts: 57
BrianT103 has much to be proud ofBrianT103 has much to be proud ofBrianT103 has much to be proud ofBrianT103 has much to be proud ofBrianT103 has much to be proud ofBrianT103 has much to be proud ofBrianT103 has much to be proud ofBrianT103 has much to be proud ofBrianT103 has much to be proud of
Send a message via AIM to BrianT103
Re: Please help Wave Robotics earn $1,000!!!

Just dropped a few coins in for WAVE. You guys are awesome, good luck!
__________________
Reply With Quote
  #39   Spotlight this post!  
Unread 04-05-2011, 22:46
Andrew Schreiber Andrew Schreiber is offline
Joining the 900 Meme Team
FRC #0079
 
Join Date: Jan 2005
Rookie Year: 2000
Location: Misplaced Michigander
Posts: 4,059
Andrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond repute
Re: Please help Wave Robotics earn $1,000!!!

Quote:
Originally Posted by efoote868 View Post
It took me about ~30 minutes to write this (I wrote something similar for a different thing oh so long ago).

I apologize for using magic numbers for pixel locations. Also, do not run this if you're not willing to give up the use of your computer for a minute.
Just doing a naive search if I am understanding this correctly. Does anyone feel like taking a crack at this using vision processing in Labview?

(Not badmouthing this at all, just curious if any of the FRC students want to put all that vision processing they did to good use)
__________________




.
Reply With Quote
  #40   Spotlight this post!  
Unread 04-05-2011, 23:01
Ryan Himmelblau Ryan Himmelblau is offline
Registered User
FRC #0111 (Wildstang)
Team Role: Mechanical
 
Join Date: Apr 2011
Rookie Year: 2010
Location: Wheeling, Illinois
Posts: 12
Ryan Himmelblau is an unknown quantity at this point
Re: Please help Wave Robotics earn $1,000!!!

Imagine a world solely consisting of FIRST students. Oh the things that we could do.
Reply With Quote
  #41   Spotlight this post!  
Unread 04-05-2011, 23:10
Emiller8's Avatar
Emiller8 Emiller8 is offline
Registered User
AKA: Ethan Miller
FRC #0125
Team Role: Mentor
 
Join Date: Mar 2010
Rookie Year: 2009
Location: Mount Olive
Posts: 20
Emiller8 has much to be proud ofEmiller8 has much to be proud ofEmiller8 has much to be proud ofEmiller8 has much to be proud ofEmiller8 has much to be proud ofEmiller8 has much to be proud ofEmiller8 has much to be proud ofEmiller8 has much to be proud ofEmiller8 has much to be proud ofEmiller8 has much to be proud of
Re: Please help Wave Robotics earn $1,000!!!

Team 11, MORT, is helping out. I have been repeating the refresh cycle for about an hour now. I talked to our website site manager, and the link is now posted on the homepage of our team website as well as on our facebook page. With a score of 63,000 to 15,000, all of chief delphi helping you out, and calling in reinforcements, I seriously doubt that you can lose this. Good luck on getting the 1,000 dollars!!
Reply With Quote
  #42   Spotlight this post!  
Unread 04-05-2011, 23:13
popnbrown's Avatar
popnbrown popnbrown is offline
FIRST 5125 HOTH Lead Mentor
AKA: Sravan S
FRC #5125 (Hawks on the Horizon)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Illinois
Posts: 367
popnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond repute
Re: Please help Wave Robotics earn $1,000!!!

If I vote for you guys will you make an attempt to help the technology needs at Emmeline Cook Elementary School? Or atleast help their technology education?
__________________
I am an employee of FIRST. However, the postings on this site are of my own perspective as a FIRST mentor and volunteer and do not necessarily reflect the views of FIRST.

FIRST Team 5125 Hawks on the Horizon Lead Mentor
FRC Team 4096 Ctrl-Z Former Mentor
FTC Team 5203 #19@! Former Mentor
FRC Team 1403 Cougar Robotics Alumni
Reply With Quote
  #43   Spotlight this post!  
Unread 04-05-2011, 23:19
WarpSpeed10 WarpSpeed10 is offline
Registered User
FRC #0111 (Wildstang)
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Illinois
Posts: 19
WarpSpeed10 is an unknown quantity at this point
Re: Please help Wave Robotics earn $1,000!!!

Quote:
Originally Posted by popnbrown View Post
If I vote for you guys will you make an attempt to help the technology needs at Emmeline Cook Elementary School? Or atleast help their technology education?
A robot demo for the kids would be cool. Very GP.
Reply With Quote
  #44   Spotlight this post!  
Unread 04-05-2011, 23:30
popnbrown's Avatar
popnbrown popnbrown is offline
FIRST 5125 HOTH Lead Mentor
AKA: Sravan S
FRC #5125 (Hawks on the Horizon)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Illinois
Posts: 367
popnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond repute
Re: Please help Wave Robotics earn $1,000!!!

Quote:
Originally Posted by WarpSpeed10 View Post
A robot demo for the kids would be cool. Very GP.
I voted for you guys because I believe that you guys will do something like ^ that!
__________________
I am an employee of FIRST. However, the postings on this site are of my own perspective as a FIRST mentor and volunteer and do not necessarily reflect the views of FIRST.

FIRST Team 5125 Hawks on the Horizon Lead Mentor
FRC Team 4096 Ctrl-Z Former Mentor
FTC Team 5203 #19@! Former Mentor
FRC Team 1403 Cougar Robotics Alumni
Reply With Quote
  #45   Spotlight this post!  
Unread 04-05-2011, 23:46
efoote868 efoote868 is offline
foote stepped in
AKA: E. Foote
FRC #0868
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2005
Location: Noblesville, IN
Posts: 1,391
efoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond repute
Re: Please help Wave Robotics earn $1,000!!!

Quote:
Originally Posted by Andrew Schreiber View Post
Just doing a naive search if I am understanding this correctly. Does anyone feel like taking a crack at this using vision processing in Labview?

(Not badmouthing this at all, just curious if any of the FRC students want to put all that vision processing they did to good use)
Yeah, a working search algorithm doesn't take too much time at all. I'm not exactly sure how getpixelcolor works, but its a VERY slow method. Probably a direct screenshot and some image manipulation would make it work faster.
__________________
Be Healthy. Never Stop Learning. Say It Like It Is. Own It.

Like our values? Flexware Innovation is looking for Automation Engineers. Check us out!
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:36.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi