Go to Post I didn't get inspired watching my peers and I, I was inspired watching professionals. - AdamHeard [more]
Home
Go Back   Chief Delphi > Technical > Kit & Additional Hardware
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 30-04-2012, 13:25
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Colour Recognition

What will you be using to detect the color you need to follow?

What programming language are you using?

What is the robot drivebase like? How many motors, what kind of wheels, what sort of steering, that kind of thing.
  #2   Spotlight this post!  
Unread 03-05-2012, 13:28
reidmc reidmc is offline
Registered User
no team
 
Join Date: Apr 2012
Location: Toronto, Ontario
Posts: 5
reidmc is an unknown quantity at this point
Re: Colour Recognition

A camera, Labview, tankdrive (I think thats what your talking about), 4 motors, 4 wheels.

I don't know how I would find out anything much more detailed.
  #3   Spotlight this post!  
Unread 05-05-2012, 19:41
PAR_WIG1350's Avatar
PAR_WIG1350 PAR_WIG1350 is offline
Registered User
AKA: Alan Wells
FRC #1350 (Rambots)
Team Role: Alumni
 
Join Date: Dec 2009
Rookie Year: 2009
Location: Rhode Island
Posts: 1,189
PAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond repute
Re: Colour Recognition

well, just to point you in the right direction,
Spoiler for not the most efficient algorithm, but one of the simplest:
if the camera picks up the color drive forwards, otherwise, turn.

I don't use LabView, and I'm not good a image processing, so I'll be of little help with that, but I'd be surprised if there wasn't some pre-written library with a function, or whatever LV calls it, that can tell you if a certain color appears in an image.
__________________

Last edited by PAR_WIG1350 : 05-05-2012 at 19:45.
  #4   Spotlight this post!  
Unread 05-05-2012, 20:04
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 6,998
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Colour Recognition

Others will fill in the details, here's the "big picture" version:

To follow a line, you look down with 3 sensors (one left, one center, and one right). If the center sensor "sees" the line, you go forward. If the left sensor "sees" the line, you turn left (towards the line). Right sensor, same thing.

OK, now let's say you must follow the RED line and ignore all the others. You make your sensor able to tell the difference, and just do what I wrote above.

Now, instead of 3 sensors, you have a color camera.

The 'follow' part just analyzes the camera image, and if the 'line' is to the left, you turn left (towards the line) until it's centered...then go forward. If it's a RED line, then you just "look" at red.

The color part is actually pretty easy. A color camera gives you four 'channels' of information, red, green, blue and luminance (think 'brightness'). These can be separated and analyzed separately in software.

The 'follow' thing is a tiny bit harder, but basically you identify the "blob" representing the line, and do some math to find the center of the blob. The center will be either left, right or center.... get it?
(By the way, you only have to evaluate the 'blob' along a horizontal line, not the full height of the camera image - that makes it a lot easier, since it is in one dimension and not 2)

I hope this helps you understand the concepts behind what you are trying to do. Of course, you can get really crazy and follow the "thin" line, or the double yellow, or look ahead and anticipate the next turn, or... But let's get the basics down, then you can run wild with the cool-factor stuff.

Don
__________________

I am N2IRZ - What's your callsign?
  #5   Spotlight this post!  
Unread 07-05-2012, 13:31
reidmc reidmc is offline
Registered User
no team
 
Join Date: Apr 2012
Location: Toronto, Ontario
Posts: 5
reidmc is an unknown quantity at this point
Re: Colour Recognition

Thanks for the response, I read a few other tutorials and I understand the concept now, I just need to know how to technically program it.

I can find examples of what I need but none of them have notes. could some one break down the major part of a colour reading program and tell me what each part does?
  #6   Spotlight this post!  
Unread 07-05-2012, 14:22
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Colour Recognition

Do you have access to the 2012 LabVIEW software package for FRC teams? There's a vision assistant program included. It lets you plug together various functions for detecting and analyzing colors and objects.

What camera are you using? How are the four motors connected to the four wheels, and what sort of wheels are they?
  #7   Spotlight this post!  
Unread 08-05-2012, 12:31
reidmc reidmc is offline
Registered User
no team
 
Join Date: Apr 2012
Location: Toronto, Ontario
Posts: 5
reidmc is an unknown quantity at this point
Re: Colour Recognition

Yes I do have access to the 2012 frc package according to my teacher. Ill try to find it.

The cameras are Axis M1031-W with a ring of lights around the lens. On the bot Im working on there is one motor for each wheel (mechanome I belive was the phrase my teacher used) and the wheels are "omni-wheels" (I dont know if thats a technical term or a class nic name)

If thats a problem there is another robot I could use that has a pair of motors for a pair of wheels and has traditional wheels.

EDIT: Found the example, trying to make sense of it.

Last edited by reidmc : 08-05-2012 at 12:54.
  #8   Spotlight this post!  
Unread 08-05-2012, 14:31
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Colour Recognition

You're in luck. The WPI function libraries for FRC support the Axis camera communication protocol. You'll have to follow the documentation for setting everything up properly before it will work; look here and find the section dealing with the camera. You should be able to use the Vision Assistant to play with image processing and figure out a sequence of steps to find the color you want to follow.

The 2012 Vision Whitepaper posted on the firstforge site might be helpful.

Your drivebase sounds like a mecanum setup, with diagonal rollers on otherwise conventionally-mounted wheels. It's capable of moving in any direction at any time, either while facing in a constant direction or while turning. Again, you're in luck. The FRC libraries support mecanum drive directly. Just supply a number from -1 to 1 to control how quickly it moves forward or reverse, another number from -1 to 1 to control how quickly it moves left or right, and yet another number to control how quickly it spins counterclockwise or clockwise.
  #9   Spotlight this post!  
Unread 09-05-2012, 13:52
reidmc reidmc is offline
Registered User
no team
 
Join Date: Apr 2012
Location: Toronto, Ontario
Posts: 5
reidmc is an unknown quantity at this point
Re: Colour Recognition

Thanks for the help, I tnink I can manage from here but Ill post if I hit another roadblock.
  #10   Spotlight this post!  
Unread 09-05-2012, 20:27
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 6,998
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Colour Recognition

We'd all love to hear how you made out, once you're done.
__________________

I am N2IRZ - What's your callsign?
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


All times are GMT -5. The time now is 07:49.

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