Go to Post Using a mouse is so 20th century! - Tom Bottiglieri [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 21-01-2006, 22:05
CronosPrime1 CronosPrime1 is offline
Registered User
FRC #0321
 
Join Date: Jan 2006
Location: Hyperspace
Posts: 53
CronosPrime1 is an unknown quantity at this point
Post Scoring Corner Goals During Autonomous

My team is not building a robot with the ability to shoot into the center goal. Instead, we will simply gather balls and dump them into the corner goals. During autonomous mode, we simply want the robot to drive up to the corner goal and dump all 10 starting balls into it.

The problem seems to be that there are no vision lights on the corner goals. There is no green light above the corner goals for sure, and unless I am very much mistaken there is also no infrared source (any infrared beacon) near the corner goals. So, can anyone think of any way of making an autonomous mode that will have the robot drive up to a corner goal? I have heard something somewhere about it being possible to use the infrared sensors to detect obstacles, and thus being able to detect a hole in a wall. Is this true? Is it possible? If so, how difficult would it be to implement?

Also, it has been suggested to me that I could use the CMU cam to look for shapes. Then, I could look for the red or blue rectangle surrounding the corner goals. I am completely new to using sensors: in previous years, our robot had no autonomous mode. I believe that the CMU cam idea will not work because there are lots of red or blue rectangles on the field, for instance the starting positions. However, I would very much appreciate someone else's opinion on this and any ideas on how to implement the autonomous mode I described.
  #2   Spotlight this post!  
Unread 21-01-2006, 22:10
Ryan Foley Ryan Foley is offline
Registered User
FRC #5687 (The Outliers)
Team Role: Mentor
 
Join Date: Jun 2002
Rookie Year: 2001
Location: ME
Posts: 447
Ryan Foley has a reputation beyond reputeRyan Foley has a reputation beyond reputeRyan Foley has a reputation beyond reputeRyan Foley has a reputation beyond reputeRyan Foley has a reputation beyond reputeRyan Foley has a reputation beyond reputeRyan Foley has a reputation beyond reputeRyan Foley has a reputation beyond reputeRyan Foley has a reputation beyond reputeRyan Foley has a reputation beyond reputeRyan Foley has a reputation beyond repute
Re: Scoring Corner Goals During Autonomous

How about at the start of a match you place your robot so it is aimed to drive right at the corner goal nearest to the start position. You could program it to follow the wall (mechanically by having a horizontal wheel run along it, and having your robot have a bit of drift into the wall or electrically by using sensors). Dead reckoning has been used a lot in the past, may work really well for getting the corner goals. Also, dead reckoning would be quicker and easier programming than the CMU cam.

Good luck!
__________________
Ryan

FRC #5687: The Outliers [2015-?]
FRC #1995: Fatal Error [2007-2009]
FRC #350: Timberlane Robotics [2001-2004]

FRC/FLL volunteer since 2005
  #3   Spotlight this post!  
Unread 21-01-2006, 22:14
CyberWolf_22's Avatar
CyberWolf_22 CyberWolf_22 is offline
Programming and Electrical Mentor
AKA: Allen Gregory
FRC #2587 (Afrobots)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Houston, Texas
Posts: 227
CyberWolf_22 is just really niceCyberWolf_22 is just really niceCyberWolf_22 is just really niceCyberWolf_22 is just really nice
Re: Scoring Corner Goals During Autonomous

A good dead reckoning program with time could do what you want if you just wanted to drive strait to the goal in line with your robot's starting position or using wheel encoders and a gyro you could get your robot to where you want it to go.

Range sensors do exist. So, you could measure the distance from the wall and have the robot stop at the same distance each time. If you have a radio shack near by they sell VEX Ultrasonic Range Sensors which do this. There are also IR range finders as well.
__________________
  #4   Spotlight this post!  
Unread 21-01-2006, 22:18
Eldarion's Avatar
Eldarion Eldarion is offline
Electrical Engineer / Computer Geek
AKA: Eldarion Telcontar
no team (Teamless Orphan)
Team Role: Alumni
 
Join Date: Nov 2005
Rookie Year: 2005
Location: Númenor
Posts: 558
Eldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond repute
Send a message via AIM to Eldarion Send a message via Yahoo to Eldarion
Re: Scoring Corner Goals During Autonomous

Quote:
Originally Posted by CronosPrime1
Also, it has been suggested to me that I could use the CMU cam to look for shapes. Then, I could look for the red or blue rectangle surrounding the corner goals. I am completely new to using sensors: in previous years, our robot had no autonomous mode. I believe that the CMU cam idea will not work because there are lots of red or blue rectangles on the field, for instance the starting positions. However, I would very much appreciate someone else's opinion on this and any ideas on how to implement the autonomous mode I described.
Where did you hear this? The CMUCam is not able to distinguish shapes, only specific colors.
__________________
CMUCam not working? Tracks sporadically? Try this instead: http://www.falconir.com!
PM me for more information if you are interested (it's open source!).

Want the FIRST Email blasts? See here: http://www.chiefdelphi.com/forums/sh...ad.php?t=50809

"The harder the conflict, the more glorious the triumph. What we obtain too cheaply, we esteem too lightly; it is dearness only that gives everything its value."
-- Thomas Paine

If it's falling apart it's a mechanical problem. If it's spewing smoke it's a electrical problem.
If it's rampaging around destroying things it's a programming problem.

"All technology is run on 'Magic Smoke' contained within the device. As everyone knows, whenever the magic smoke is released, the device ceases to function."
-- Anonymous

I currently speak: English, some German, Verilog, x86 and 8051 Assembler, C, C++, VB, VB.NET, ASP, PHP, HTML, UNIX and SQL
  #5   Spotlight this post!  
Unread 21-01-2006, 22:18
CronosPrime1 CronosPrime1 is offline
Registered User
FRC #0321
 
Join Date: Jan 2006
Location: Hyperspace
Posts: 53
CronosPrime1 is an unknown quantity at this point
Smile Re: Scoring Corner Goals During Autonomous

Wow thanks for the amazingly quick replies. It's nice to know that for once in your life you're in a forum that's actually helpful. I am a newbie to programming using sensors. Could someone explain to me what dead reckoning is and what would be involved in making such a program? And about the CMU cam - what exactly does it do? Does it return a matrix of pixels or what? Yes, I am planning to position the robot to drive straight to a corner goal in the beginning of the match. It has also been suggested to me that I might know that a corner goal is there by detecting the robot go up a ramp - the corner goal is up a light ramp. Could someone please give me an opinion on this idea?
  #6   Spotlight this post!  
Unread 21-01-2006, 22:23
CyberWolf_22's Avatar
CyberWolf_22 CyberWolf_22 is offline
Programming and Electrical Mentor
AKA: Allen Gregory
FRC #2587 (Afrobots)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Houston, Texas
Posts: 227
CyberWolf_22 is just really niceCyberWolf_22 is just really niceCyberWolf_22 is just really niceCyberWolf_22 is just really nice
Re: Scoring Corner Goals During Autonomous

Dead Reckoning is usually just telling your robot to do something for a specific time and not take any information from the out side world. It would involve setting up a timer or using the 26ms loop and have your robot do something for so many loops like drive for 2 sec and then turn for 1 sec something like that. It is not the most reliable way to do autonomous but it will work.
__________________
  #7   Spotlight this post!  
Unread 21-01-2006, 22:30
sciencenerd's Avatar
sciencenerd sciencenerd is offline
ooh, what does this button do?
AKA: Kyle
FRC #1318 (the IRS (Issaquah Robotics Society))
Team Role: Coach
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Bellevue, Washington
Posts: 206
sciencenerd has much to be proud ofsciencenerd has much to be proud ofsciencenerd has much to be proud ofsciencenerd has much to be proud ofsciencenerd has much to be proud ofsciencenerd has much to be proud ofsciencenerd has much to be proud ofsciencenerd has much to be proud of
Re: Scoring Corner Goals During Autonomous

Quote:
Originally Posted by CronosPrime1
Wow thanks for the amazingly quick replies. It's nice to know that for once in your life you're in a forum that's actually helpful. I am a newbie to programming using sensors. Could someone explain to me what dead reckoning is and what would be involved in making such a program? And about the CMU cam - what exactly does it do? Does it return a matrix of pixels or what? Yes, I am planning to position the robot to drive straight to a corner goal in the beginning of the match. It has also been suggested to me that I might know that a corner goal is there by detecting the robot go up a ramp - the corner goal is up a light ramp. Could someone please give me an opinion on this idea?
One option is to simply tell your robot to drive forward for X number of seconds (time your robot doing the run to see how long to set X for), then release all your balls. That way, if you start it facing the near corner goal it will drive straight up to it and drop all the balls, just like you want it to do. It will take a little experimentation to get this working just right, but it is an easy way to get an autonomous mode working, and if you have trouble, there are plenty of smart people on this forums that can help!
__________________
Oh, maybe I shouldn't have pushed that...
  #8   Spotlight this post!  
Unread 21-01-2006, 22:32
Eldarion's Avatar
Eldarion Eldarion is offline
Electrical Engineer / Computer Geek
AKA: Eldarion Telcontar
no team (Teamless Orphan)
Team Role: Alumni
 
Join Date: Nov 2005
Rookie Year: 2005
Location: Númenor
Posts: 558
Eldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond repute
Send a message via AIM to Eldarion Send a message via Yahoo to Eldarion
Re: Scoring Corner Goals During Autonomous

Quote:
Originally Posted by CronosPrime1
And about the CMU cam - what exactly does it do? Does it return a matrix of pixels or what?
You program in a specific color, and it finds the biggest area(s) of that color in the image. It then finds the middle of the object and sends it to the RC.
__________________
CMUCam not working? Tracks sporadically? Try this instead: http://www.falconir.com!
PM me for more information if you are interested (it's open source!).

Want the FIRST Email blasts? See here: http://www.chiefdelphi.com/forums/sh...ad.php?t=50809

"The harder the conflict, the more glorious the triumph. What we obtain too cheaply, we esteem too lightly; it is dearness only that gives everything its value."
-- Thomas Paine

If it's falling apart it's a mechanical problem. If it's spewing smoke it's a electrical problem.
If it's rampaging around destroying things it's a programming problem.

"All technology is run on 'Magic Smoke' contained within the device. As everyone knows, whenever the magic smoke is released, the device ceases to function."
-- Anonymous

I currently speak: English, some German, Verilog, x86 and 8051 Assembler, C, C++, VB, VB.NET, ASP, PHP, HTML, UNIX and SQL
  #9   Spotlight this post!  
Unread 21-01-2006, 22:33
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: Scoring Corner Goals During Autonomous

Let's handle these one at a time

Quote:
Originally Posted by CronosPrime1
Wow thanks for the amazingly quick replies. It's nice to know that for once in your life you're in a forum that's actually helpful. I am a newbie to programming using sensors. Could someone explain to me what dead reckoning is and what would be involved in making such a program?
Dead reckoning is the simplest form of autonomous movement, in that it doesn't require feedback, you just do things based on timing loops. All you do is tell your bot to do things like "turn left for 0.1 seconds and then drive straight forward for 4 seconds, and then activate your ball dumper". It's very simple to do (I can give you some sample code, as our team's bot usually has some sort of dead reckoning code written in case we have problems with the feedback sensors). The obvious problem is that many things can go wrong (wheel slip and other robots getting in the way being the obvious ones), and precise alignment isn't easy.

Quote:
And about the CMU cam - what exactly does it do? Does it return a matrix of pixels or what?
There are some very complete documents on www.kevin.org on what the CMUcam2 does, but basically it checks to see if it's looking at the target, and if it is, it returns the size of the target and it's centroid.

Quote:
Yes, I am planning to position the robot to drive straight to a corner goal in the beginning of the match. It has also been suggested to me that I might know that a corner goal is there by detecting the robot go up a ramp - the corner goal is up a light ramp. Could someone please give me an opinion on this idea?
As long as you start your bot in the position nearest the ramp, this should be doable, either as dead-reckoning, or with simple feedback (i.e. 'drive towards ramp until you detect the ramp (with a tilt meter or contact switch, for example) and then dump all the balls').

The best way to develop stuff like this is incrementally. Do something like you propose above, and then come up with improvements and alternatives. It's nice to have a "library" of autonomous functions your bot can do, so you can select one before the match (including the most impressive "sit there and look pretty" autonomous mode, 'cause sometimes you'll be in a match where that's the best strategy, since you might be teamed with other bot's whose autonomous modes and capabilities might conflict with yours).

And remember, it's often better to do one thing really well, than do a bunch of things poorly.

Good luck, and ask lots of questions. The folks here are very helpful.
  #10   Spotlight this post!  
Unread 21-01-2006, 22:51
CronosPrime1 CronosPrime1 is offline
Registered User
FRC #0321
 
Join Date: Jan 2006
Location: Hyperspace
Posts: 53
CronosPrime1 is an unknown quantity at this point
Re: Scoring Corner Goals During Autonomous

Quote:
Range sensors do exist. So, you could measure the distance from the wall and have the robot stop at the same distance each time. If you have a radio shack near by they sell VEX Ultrasonic Range Sensors which do this. There are also IR range finders as well.
Could you please tell me more about this? What exactly will VEX Ultrasonic Range Sensors do? How will they tell me where a hole in the wall is located? That is, what values do these sensors typically return? And does FIRST definitely allow these and other off-kit electronics? Also, what are infrared range finders? What kind of values will these return? I really know nothing about sensors. Lastly, what price ranges are all of these components in? Are we looking at something extremely pricey?
  #11   Spotlight this post!  
Unread 22-01-2006, 00:34
EricH's Avatar
EricH EricH is offline
New year, new team
FRC #1197 (Torbots)
Team Role: Engineer
 
Join Date: Jan 2005
Rookie Year: 2003
Location: SoCal
Posts: 19,803
EricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond repute
Re: Scoring Corner Goals During Autonomous

Quote:
Originally Posted by CronosPrime1
What exactly will VEX Ultrasonic Range Sensors do? How will they tell me where a hole in the wall is located? ...And does FIRST definitely allow these and other off-kit electronics?
Ultrasonic sensors use high-frequency sound waves and bounce them off of things--think sonar for an example. If you get feedback, you can tell using return time how far away something is. In this case, you could use it to end up at the ramp (drive forward until value is (whatever it returns at the bottom of the ramp.)
FIRST most definitely allows non-kit, Commercial Off-The-Shelf (COTS) sensors. You have a limit of $200 USD per electronic item max.
__________________
Past teams:
2003-2007: FRC0330 BeachBots
2008: FRC1135 Shmoebotics
2012: FRC4046 Schroedinger's Dragons

"Rockets are tricky..."--Elon Musk

  #12   Spotlight this post!  
Unread 22-01-2006, 00:37
dlavery's Avatar
dlavery dlavery is offline
Curmudgeon
FRC #0116 (Epsilon Delta)
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Herndon, VA
Posts: 3,176
dlavery has a reputation beyond reputedlavery has a reputation beyond reputedlavery has a reputation beyond reputedlavery has a reputation beyond reputedlavery has a reputation beyond reputedlavery has a reputation beyond reputedlavery has a reputation beyond reputedlavery has a reputation beyond reputedlavery has a reputation beyond reputedlavery has a reputation beyond reputedlavery has a reputation beyond repute
Re: Scoring Corner Goals During Autonomous

Since you say you are completely new to sensor systems, let's start off with the ultimate in simplicity and go from there. An extremely simple (and it turns out, very effective and incredibly inexpensive) solution works like this:

step 1: Attach two simple bump sensors to the front corners of your robot. These "bump sensors" can be simple microswitches that are normally open (i.e. when connected to the digital I/O ports on the RC, they provide a "0" indication), and close when they make contact with some object (and thereby change the state of the digital input to "1'").

step 2: Position the robot in the starting square closest to and facing the corner goal (i.e. as you stand at the center of the long edge of the field, facing the field, put your robot in the square to your right, and have it face the corner goal to your right). Then have the robot execute the following instructions:

step 3: Turn to the right until the bump sensor on the right front corner of the robot hits the edge of the field. This aligns the robot drive direction with the edge of the field, heading toward the corner goal.

step 4: Drive forward until BOTH sensors detect contact. This will indicate you have hit the player station wall. Stop driving.

step 5: Spew out the balls into the corner goal as fast as you can.

step 6: All done.

Once you get this simple sensor implementation nailed down and working, then you can start to get a little fancier. Ultrasonic sensors will allow you to do fundamentally the same thing that the bump sensors do. The only difference is that instead of just telling you when you have actually made contact something by bumping into it, the ultrasonic sensors can tell you the approximate range to an object as you begin to get close to it. So you can slow down and smoothly stop your robot just before it reaches the end wall, instead of running into it at full speed and then figuring out "ohh! there is a wall there!" And yes, using the ultrasonic sensors from a VEX kit is permissible under the current rules.
__________________
"I know what you're thinking, punk," hissed Wordy Harry to his new editor, "you're thinking, 'Did he use six superfluous adjectives or only five?' - and to tell the truth, I forgot myself in all this excitement; but being as this is English, the most powerful language in the world, whose subtle nuances will blow your head clean off, you've got to ask yourself one question: 'Do I feel loquacious?' - well do you, punk?"
- Stuart Vasepuru, 2006 Bulwer-Lytton Fiction Contest



My OTHER CAR is still on Mars!!!
  #13   Spotlight this post!  
Unread 22-01-2006, 13:58
CronosPrime1 CronosPrime1 is offline
Registered User
FRC #0321
 
Join Date: Jan 2006
Location: Hyperspace
Posts: 53
CronosPrime1 is an unknown quantity at this point
Cool Re: Scoring Corner Goals During Autonomous

Thanks for all the ideas, people. There's definitely enough here to get me started. Though about that idea with bumper sensors - it's a logical idea, but if I have bumpers on my robot and go at full power until I run into a wall, and I have bumpers, don't you think that the robot will bounce off the wall and back down the ramp? If it accelerates halfway across the field, the impact will be very strong, almost dangerous. Could someone give me an opinion on this thought please?
  #14   Spotlight this post!  
Unread 22-01-2006, 14:12
Cuog's Avatar
Cuog Cuog is offline
Registered Linux User: 390661
AKA: Alex
FRC #0422
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2004
Location: Richmond, Virginia
Posts: 852
Cuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond reputeCuog has a reputation beyond repute
Send a message via AIM to Cuog
Re: Scoring Corner Goals During Autonomous

since you know the approximate distance to the wall you can use sort of dead reckoning and tell the robot to slow to half or quarter speed at a certain time during its autonomous journey.
__________________
KK4KQO
http://voltair.us
Too many projects, too little time.
  #15   Spotlight this post!  
Unread 22-01-2006, 14:15
Matt Krass's Avatar
Matt Krass Matt Krass is offline
"Old" and Cranky. Get off my lawn!
AKA: Dark Ages
FRC #0263 (Sachem Aftershock)
Team Role: Mentor
 
Join Date: Oct 2002
Rookie Year: 2002
Location: Long Island, NY
Posts: 1,187
Matt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond repute
Send a message via AIM to Matt Krass
Re: Scoring Corner Goals During Autonomous

Not to pop the simple bubble, but I have another idea. AFTER you get something simple working, I say try the camera, the light may not be over a corner goal, but its in the same spot all the time and your camera will be in a fixed spot on your robot. It's actually fairly simple to lock on to the camera and use it to figure out where you are based on the servo values, PM me if you'd like more help, I've already written a simple autonomous mode to go to field waypoints based on the light and camera, you could easily use it to drive up to the corner goal, know for sure you're there and dump, and a properly mounted camera deep inside the robot will probably be less likely to be damaged. And it's honestly not very much more complex, Kevin's camera code does a fantastic job of making it track, you just need to take the information from that and use it to drive, it can be very simple, a proportional control will probably do.

Code:
#define Kgain 1 // Adjust this, trial and error for best results, varies by robot
#define TARGET 160 // This is the servo position you want the goal to be at, also trial and error

signed int pan_error;

pan_error = PAN_SERVO - TARGET; //This calculates a positive or negative error for the target, negative is too far left,  positive is too far right

pwm_XX = pan_error * Kgain;
That's heavy pseudo coding but it illustrates the procedure, Kgain is adjustable for responsiveness and the target position is where the camera points when you're facing the goal from say, the start position. Then you could drive forward until the pan matches a second target for being right in front of the goal, but I'm not sure if the camera can pan that far, but you can use it for initial positioning before just driving up and unloading. Safer and more accurate then bump sensors, but more complex, but not terribly much so, and I'll help you as best as I can if you'd like, just drop me a PM
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!

I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
Closed Thread


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How fast can the corner goals detect balls going in? Excelsior Technical Discussion 3 22-01-2006 01:24
Question: Can robot block lower goals to prevent scoring? Seems unfair. 456RoboChick Rules/Strategy 1 11-01-2006 20:04
A Warning to Human Players During Autonomous The Lucas General Forum 21 07-04-2005 02:29
Curie Division Robots information... (not complete) archiver 2001 3 24-06-2002 03:13


All times are GMT -5. The time now is 05:22.

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