Go to Post If you see Navy ships in port, you're going to be fine. If you see ships pulling out, or no ships at all, go East. Fast. - Matt Howard [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 10-01-2009, 18:23
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,082
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Finding green/pink flags

Quote:
Originally Posted by DaveD View Post
There are bugs in the current versions of FindColor, GetLargestParticle and InArea. These have been fixed at the beta level and should be published shortly along with the pink-green demo that Brad mentioned above.

Dave D
Shortly, eh?
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #2   Spotlight this post!  
Unread 10-01-2009, 18:42
Uberbots's Avatar
Uberbots Uberbots is offline
Mad Programmer
AKA: Billy Sisson
FRC #1124 (ÜberBots)
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Avon
Posts: 739
Uberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond repute
Re: Finding green/pink flags

I helped team 1124 make the red/blue target tracker with great success (double thumbs up).

in labview, you basically copy the image from the camera, do a color threshold for each picture, do a particle report for each picture, and decide which one of those reports is the "top" color and which is the "bottom" color.

once you have that data, you run a loop as follows:
for each "top color:
check if the area of the color is big enough. if so:
for each "bottom" color:
check if the bottom color is directly below (with some tolerance) the "top" color.
add the "top" target to the output targets array

that basic algorithm allowed us to differentiate between red/green targets and green/red targets. there was a slight bit of extra post-processing to deal with multiple visible targets (basically you pick the uppermost one or the largest one etc).

what you do with the final target(s) is up to you... we cached the previous target position and velocity to do second-degree motion prediction for the target in case we lose it. (amongst other things)
__________________
A few of my favorite numbers:
175 176 177 195 230 558 716 1024 1071 1592 1784 1816
RPI 2012
BREAKAWAY

Last edited by Uberbots : 10-01-2009 at 18:43. Reason: borat
Reply With Quote
  #3   Spotlight this post!  
Unread 13-01-2009, 20:51
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 325
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: Finding green/pink flags

It appears as though an update on this matter has been posted (an example)

http://first.wpi.edu/FRC/frcupdates.html
__________________
Programming in LabVIEW? Try VI Snippets!

FIRST LEGO League 2004 - 2005
FRC Team 870 Student 2006 - 2009
FRC Team 3005 Mentor 2013 -
Reply With Quote
  #4   Spotlight this post!  
Unread 18-01-2009, 18:14
fordchrist675's Avatar
fordchrist675 fordchrist675 is offline
"Wilfordito"
AKA: Wilford Jay Harris III
FRC #0675 (Technology High School Robotics)
Team Role: Mentor
 
Join Date: Jun 2007
Rookie Year: 2006
Location: Rohnert Park, California
Posts: 298
fordchrist675 is a name known to allfordchrist675 is a name known to allfordchrist675 is a name known to allfordchrist675 is a name known to allfordchrist675 is a name known to allfordchrist675 is a name known to all
Send a message via AIM to fordchrist675 Send a message via MSN to fordchrist675 Send a message via Yahoo to fordchrist675
Re: Finding green/pink flags

Our programming team has tried all of the listed ideas, and still have had no luck, so we really need some help. Any suggestions please
__________________
It's not by how much you win, it's how you win. Respect your enemies, otherwise your no better than them which if you think about it that's true because we are striving for the same thing. To be FIRST

2010 SVR Creativity Award
2010 SVR Regional Finalists
2010 SAC Innovation in Control Award
Reply With Quote
  #5   Spotlight this post!  
Unread 18-01-2009, 18:22
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Finding green/pink flags

If you really want help, can you break it down? What works, what doesn't, what have you tried, what environment are you using?

My first suggestion would be to try running and learning from one of the vision examples.

Greg McKaskle
Reply With Quote
  #6   Spotlight this post!  
Unread 18-01-2009, 19:11
fordchrist675's Avatar
fordchrist675 fordchrist675 is offline
"Wilfordito"
AKA: Wilford Jay Harris III
FRC #0675 (Technology High School Robotics)
Team Role: Mentor
 
Join Date: Jun 2007
Rookie Year: 2006
Location: Rohnert Park, California
Posts: 298
fordchrist675 is a name known to allfordchrist675 is a name known to allfordchrist675 is a name known to allfordchrist675 is a name known to allfordchrist675 is a name known to allfordchrist675 is a name known to all
Send a message via AIM to fordchrist675 Send a message via MSN to fordchrist675 Send a message via Yahoo to fordchrist675
Re: Finding green/pink flags

We have set up the camera correctly, with the CAT-5 cable. We debugged the code, tried it with the bug , updated all firmware and software and gotten nothing. The CRIO is still getting nothing from the camera
__________________
It's not by how much you win, it's how you win. Respect your enemies, otherwise your no better than them which if you think about it that's true because we are striving for the same thing. To be FIRST

2010 SVR Creativity Award
2010 SVR Regional Finalists
2010 SAC Innovation in Control Award
Reply With Quote
  #7   Spotlight this post!  
Unread 18-01-2009, 19:12
fordchrist675's Avatar
fordchrist675 fordchrist675 is offline
"Wilfordito"
AKA: Wilford Jay Harris III
FRC #0675 (Technology High School Robotics)
Team Role: Mentor
 
Join Date: Jun 2007
Rookie Year: 2006
Location: Rohnert Park, California
Posts: 298
fordchrist675 is a name known to allfordchrist675 is a name known to allfordchrist675 is a name known to allfordchrist675 is a name known to allfordchrist675 is a name known to allfordchrist675 is a name known to all
Send a message via AIM to fordchrist675 Send a message via MSN to fordchrist675 Send a message via Yahoo to fordchrist675
Re: Finding green/pink flags

The CRIO kept posting error messages
__________________
It's not by how much you win, it's how you win. Respect your enemies, otherwise your no better than them which if you think about it that's true because we are striving for the same thing. To be FIRST

2010 SVR Creativity Award
2010 SVR Regional Finalists
2010 SAC Innovation in Control Award
Reply With Quote
  #8   Spotlight this post!  
Unread 18-01-2009, 21:51
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Finding green/pink flags

Make sure you are using the orange cross over cable. What are do the error messages.

Greg McKaskle
Reply With Quote
  #9   Spotlight this post!  
Unread 19-01-2009, 08:20
gokul gokul is offline
Registered User
FRC #0571
 
Join Date: Jan 2006
Location: CT
Posts: 25
gokul is an unknown quantity at this point
Re: Finding green/pink flags

Quote:
Originally Posted by fordchrist675 View Post
The CRIO kept posting error messages
It will help if we know what these error messages are.

1. Use the Orange Crossover cable with the camera.
2. Make sure the camera is set correctly (Brightness = 40, Light settings = Flourescent 1) using the Axis instructions after connecting the Cam to your PC. Make sure you hit "Save" after the changes to the cam.
3. Make sure that the Green/Pink is the right way up as the program expects it - in the program (C/C++) there is a setting for ABOVE and BELOW. If the colors are reversed to what the program expects it won't find it.
4. Make sure that the cam is receiving signal by watching for the Green light around the lens.
5. Make sure your target is not too close or too bright.
6. For the C/C++ code, teams will have to play around a bit with cam settings and HSL values to make sure everything works.
7. The C/C++ code is based on SimpleRobot so once it is out of Autonomous, it won't go back to Auto even if you flip the DS Auto/Tele Switch - you will have reboot the cRIO with the Autonomous enabled on the DS.
Reply With Quote
  #10   Spotlight this post!  
Unread 06-02-2009, 20:04
aerophd2001 aerophd2001 is offline
Software Mentor - Team 2366
AKA: Andy
FRC #2366 (Tesla Robotics)
Team Role: Mentor
 
Join Date: Mar 2008
Rookie Year: 2008
Location: Blue Springs, MO
Posts: 7
aerophd2001 will become famous soon enough
Re: Finding green/pink flags

One thing that may solve many peoples problems:

>> Test the two-color tracking routines in a room WITHOUT windows <<

Daylight coming in from outside *can* change the color of the targets from the camera's perspective. You will want to test in a room with only fluorescent lighting.

Additionally, you will want to have equal lighting on the target from all directions (no shadows around the periphery of the target).

I hope these tips help.
__________________
(Test + Refine Code + Deploy) ^ n
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Flags???? cprogrammer Programming 4 25-07-2005 20:21
Flags trdragons204 General Forum 2 23-03-2005 10:29
Concerns regarding the green paneling/green shirts Petey General Forum 127 15-01-2005 10:35
6 Flags Raven_Writer Chit-Chat 12 30-07-2004 23:01
Six Flags? Hermione692 Championship Event 29 29-04-2003 21:12


All times are GMT -5. The time now is 03:17.

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