Go to Post To label hard work as unfair is really a bitter assessment. - Koko Ed [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 05-04-2006, 19:37
Alan Ing Alan Ing is offline
Registered User
None #0368 (Kika Mana)
Team Role: Mentor
 
Join Date: Oct 2001
Location: Honolulu, Hawaii
Posts: 76
Alan Ing has a reputation beyond reputeAlan Ing has a reputation beyond reputeAlan Ing has a reputation beyond reputeAlan Ing has a reputation beyond reputeAlan Ing has a reputation beyond reputeAlan Ing has a reputation beyond reputeAlan Ing has a reputation beyond reputeAlan Ing has a reputation beyond reputeAlan Ing has a reputation beyond reputeAlan Ing has a reputation beyond reputeAlan Ing has a reputation beyond repute
Camera did not work for well at the regionals, but worked great at home.

Hi all,

Our season is over for us having gone to two regionals (SCR & Sacremento)this year and we had a great time. Now that the season is over for us, I was wondering if everyone might help us figure out what we did wrong with the camera.

Our programing team spent a lot of hours modifying the default code to aim our turret (both pan and tilt) and it worked great at home. I was amazed how quickly the camera acquired the target light and adjusted our turret for both pan and tilt even while the robot was moving and turning. At home, we can nail the goal from just about anywhere on the field from half court all the way to front. All of this was done using the default settings for the camera in one of the High School's auditoriums.

At the competition it was a completely different story. Our Camera had an incredibly hard time finding the target at all. We brought our target light with us and in the pit the camera could track the light, but not as well as it should have. It often locked on to the overhead lights in the pits. On the competition floor, it rarely could find the target and just kept searching making our shooter very ineffective.

Any ideas what went wrong and how to correct it? I was hoping that the default settings would work at all the regionals but for us that didn't happen.
After a whole regional and two matches, we eventually took the camera completely off and went to 100% manual control and started doing a lot better.

Did anyone else run into the same problem? Could they solve it at the regionals?

I am mainly the mechanical mentor for the team so I don't claim to know the program.

If other teams had trouble with the default settings at the competition, I'd like to know.

If it is a problem, perhaps FIRST might be able to find the optimal settings for each regional as it is very difficult to dial in the settings during practice sessions. Or perhaps they could let us on the side of the field during other teams practice sessions so we can dial in the settings while under the competition lights and using the actual targets.

By the way, I do think FIRST made a very good attempt with the camera this year. Just need to work it out a bit more so that more teams can be successful with it.

Regards,
Alan Ing
Engineering Mentor
Team 368
Honolulu, Hawaii
  #2   Spotlight this post!  
Unread 05-04-2006, 19:40
Bharat Nain's Avatar
Bharat Nain Bharat Nain is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Jan 2004
Rookie Year: 2003
Location: New York
Posts: 2,000
Bharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond repute
Send a message via AIM to Bharat Nain Send a message via MSN to Bharat Nain
Re: Camera did not work for well at the regionals, but worked great at home.

Did you use the default values for the green light of modified values?
__________________
-= Bharat Nain =-

Whatever you do, you need courage. Whatever course you decide upon, there is always someone to tell you that you are wrong. There are always difficulties arising that tempt you to believe your critics are right. To map out a course of action and follow it to an end requires some of the same courage that a soldier needs. Peace has its victories, but it takes brave men and women to win them. - Ralph Waldo Emerson
  #3   Spotlight this post!  
Unread 05-04-2006, 19:46
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: Camera did not work for well at the regionals, but worked great at home.

A simple question perhaps but did you make sure it was focused?
  #4   Spotlight this post!  
Unread 05-04-2006, 19:49
coastertux coastertux is offline
Penn State Class of 2010!
AKA: Steve
FRC #1640 (sab-BOT-age)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Downingtown, PA
Posts: 264
coastertux is just really nicecoastertux is just really nicecoastertux is just really nicecoastertux is just really nicecoastertux is just really nice
Send a message via AIM to coastertux
Re: Camera did not work for well at the regionals, but worked great at home.

I agree with Dave, shipping the robot could have easily produced enough vibration to un-focus the lense.
__________________
"The important thing is not to stop questioning. Curiosity has its own reason for existing. One cannot help but be in awe when he contemplates the mysteries of eternity, of life, of the marvellous structure of reality." ~Albert Einstein
DHSE '06, PSU '10 (Eberly College of Science - Chemistry)
  #5   Spotlight this post!  
Unread 05-04-2006, 20:10
eugenebrooks eugenebrooks is offline
Team Role: Engineer
AKA: Dr. Brooks
no team (WRRF)
 
Join Date: Jan 2004
Rookie Year: 2001
Location: Livermore, CA
Posts: 601
eugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond repute
Re: Camera did not work for well at the regionals, but worked great at home.

The lighting in the arena could confuse the camera, this becomes very clear when you see the camera lock on to one of the lights. We saw problems in our shop environment with fluorescent lights where the aim of the camera would be off and the confidence value would fluctuate. When we turned the lights off the problem would go away, so we knew it was the lights.

We addressed this issue as follows:

1) Track the confidence value in your code. If bad confidence comes up use the most recent data report from the camera with a good confidence. Our cutoff in this regard was a confidence of 100, bad values were perhaps 30 or less, and typical good values were 160 or greater. When the camera was being confused by the lights, this confusion would fluctuate frame to frame and the ones that were good were marked by good confidence.

2) Don't use automatic search. Use operator control of the turrent to get it pointed in the right direction and have the operator flip a switch to release control to the computer when the green light is seen with a confidence above the cutoff, 100. Your turrent looks a lot smarter to the judges this way. All you need do is indicate good confidence on the OI with an LED.

3) In spite of this, we still had problems at the San Jose regional. This problem was solved by putting a blinder on the camera that kept the arena lighting out of it.

Our shooter did not tilt and the camera was hard mounted to it. The fact that the camera did not tilt probably made it easier for us to construct a blinder that worked. It was cut from cardboard right at the regional and stuck on with velcro, after blackening it with a sharpie pen. It worked really well.

Eugene

Last edited by eugenebrooks : 05-04-2006 at 20:12.
  #6   Spotlight this post!  
Unread 05-04-2006, 20:36
Tim Baird's Avatar
Tim Baird Tim Baird is offline
Design Ninja
FRC #0126 (Gael Force)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1999
Location: Clinton, MA
Posts: 241
Tim Baird has a reputation beyond reputeTim Baird has a reputation beyond reputeTim Baird has a reputation beyond reputeTim Baird has a reputation beyond reputeTim Baird has a reputation beyond reputeTim Baird has a reputation beyond reputeTim Baird has a reputation beyond reputeTim Baird has a reputation beyond reputeTim Baird has a reputation beyond reputeTim Baird has a reputation beyond reputeTim Baird has a reputation beyond repute
Send a message via AIM to Tim Baird
Re: Camera did not work for well at the regionals, but worked great at home.

One question: Did you find it working great tethered and then horribly on the game radio?

We had that problem at Boston. Our radio stopped working correctly right after UTC. The robot worked great on the practice field while tethered, but then ran unpredictably on the field. Once we realized it was the radio and put a new one on, we were back in business.

You might want to try it. Goodluck!
__________________
Tim Baird
FRC Alum and FRC/FLL Volunteer
Project Engineer @ Nypro

History:
Gael Force 126: 1999-2000
WPI 190: 2001-2004
Gael Force 126: 2005-2010
Event Volunteer Only: 2011-Present
  #7   Spotlight this post!  
Unread 06-04-2006, 03:32
Chris Orimoto Chris Orimoto is offline
Stay in school kids ^.^
FRC #0368 (TKM.368 (Team Kika Mana))
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 2000
Location: Honolulu, Hawaii
Posts: 10
Chris Orimoto is an unknown quantity at this point
Send a message via AIM to Chris Orimoto
Re: Camera did not work for well at the regionals, but worked great at home.

Thanks to everyone for all the responses. I'll clarify a bit on the questions asked:

Quote:
Did you use the default values for the green light of modified values?
We actually tested both the default values and a set of modified values. When at home, we found small fluctuations in the green light's color and made modifications accordingly. When these values didn't seem to work at the regional, we went back to default values and found less interference from the arena's lights...however, not enough to call our camera "effective".


Quote:
A simple question perhaps but did you make sure it was focused?
Actually, this was a big problem in our camera missing the light during our build season. This was one of the first things we adjusted at the regional events. The camera was able to track the green light on the practice field (where the arena's lights were absent), but caught lots of interference on the "game" field.


Quote:
One question: Did you find it working great tethered and then horribly on the game radio?

We had that problem at Boston. Our radio stopped working correctly right after UTC. The robot worked great on the practice field while tethered, but then ran unpredictably on the field. Once we realized it was the radio and put a new one on, we were back in business.

You might want to try it. Goodluck!
This was something we did NOT try at the regional. We assumed that the radio was functioning correctly since it worked well at home. But then again, we thought the same thing about the entire camera module. Thanks for the tip...it'll be good insight to take into next year


Quote:
The lighting in the arena could confuse the camera, this becomes very clear when you see the camera lock on to one of the lights. We saw problems in our shop environment with fluorescent lights where the aim of the camera would be off and the confidence value would fluctuate. When we turned the lights off the problem would go away, so we knew it was the lights.

We addressed this issue as follows:

1) Track the confidence value in your code. If bad confidence comes up use the most recent data report from the camera with a good confidence. Our cutoff in this regard was a confidence of 100, bad values were perhaps 30 or less, and typical good values were 160 or greater. When the camera was being confused by the lights, this confusion would fluctuate frame to frame and the ones that were good were marked by good confidence.

2) Don't use automatic search. Use operator control of the turrent to get it pointed in the right direction and have the operator flip a switch to release control to the computer when the green light is seen with a confidence above the cutoff, 100. Your turrent looks a lot smarter to the judges this way. All you need do is indicate good confidence on the OI with an LED.

3) In spite of this, we still had problems at the San Jose regional. This problem was solved by putting a blinder on the camera that kept the arena lighting out of it.

Our shooter did not tilt and the camera was hard mounted to it. The fact that the camera did not tilt probably made it easier for us to construct a blinder that worked. It was cut from cardboard right at the regional and stuck on with velcro, after blackening it with a sharpie pen. It worked really well.

Eugene
This sounds similar to our problems at San Jose (and Davis for that matter). At a point during our build season, our programming team noticed interference in the camera coming from the fluorescent lights in our auditorium. Hence, we actually use a similar method to light-tracking...using the "confidence" data packet to determine what type of light was seen (confidence value of 80...which pretty much eliminated our fluorescent light problem).

As for turret vs. camera, our camera functions completely independently of the turret. It works on its own pan/tilt axis (via the provided camera-servo mount) and our operator decides when the turret should auto-adjust to the camera's values. We did experiment with polarized sunglass-lenses over the camera, but not to a large extent.

The blinder is an interesting idea; we never thought of doing something like that. Our camera does require a lot of freedom of motion in its current design however, so the "blinder" would not essentially "blind" us much. Maybe we tried to do too much with the camera?

One thing I wonder is: Could the "color values" of the green light be slightly different ON the field given that the field is brightly lit with "arena-style lighting" while all background is completely dark (or backlit by other lights)?

Again, thanks to everyone for the replies...they really help us think through this problem.
__________________
Chris Orimoto
TKM.368 (Team Kika Mana)
Honolulu, Hawaii
2000 - 2001: Student
2006 - Present: Mentor
  #8   Spotlight this post!  
Unread 06-04-2006, 04:43
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: Camera did not work for well at the regionals, but worked great at home.

Did you set the saturation value to 3 or some other really low number?
If not, that's probably why it found a lot of other lights, as the sensor is easily saturated, making all the lights look the same.
__________________
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 06-04-2006, 06:41
X-Istence X-Istence is offline
Melt the RC controller!
AKA: Bert JW Regeer
no team
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Montville
Posts: 151
X-Istence will become famous soon enoughX-Istence will become famous soon enough
Send a message via AIM to X-Istence Send a message via MSN to X-Istence
Re: Camera did not work for well at the regionals, but worked great at home.

At the NJ regional my team used the standard values provided by Kevin Watson and they worked like a charm. We did not have it mounted on the tilt pan stand, but rather fixed to the side of the shooter. Never had a problem.

The focusing really did help, if we made sure to focus it from half court, it would work better than if we did not focus it, and made sure it worked from really close by.
__________________
My Blog!
  #10   Spotlight this post!  
Unread 06-04-2006, 08:48
Gdeaver Gdeaver is offline
Registered User
FRC #1640
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 2001
Location: West Chester, Pa.
Posts: 1,370
Gdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond repute
Re: Camera did not work for well at the regionals, but worked great at home.

The light from some HID lighting can cause problems. As someone mention on an early season post, A lens from sunglasses can improve the camera performance.
  #11   Spotlight this post!  
Unread 06-04-2006, 23:10
Alan Ing Alan Ing is offline
Registered User
None #0368 (Kika Mana)
Team Role: Mentor
 
Join Date: Oct 2001
Location: Honolulu, Hawaii
Posts: 76
Alan Ing has a reputation beyond reputeAlan Ing has a reputation beyond reputeAlan Ing has a reputation beyond reputeAlan Ing has a reputation beyond reputeAlan Ing has a reputation beyond reputeAlan Ing has a reputation beyond reputeAlan Ing has a reputation beyond reputeAlan Ing has a reputation beyond reputeAlan Ing has a reputation beyond reputeAlan Ing has a reputation beyond reputeAlan Ing has a reputation beyond repute
Re: Camera did not work for well at the regionals, but worked great at home.

Chris, thank you for responding on behalf of our team regarding my question about the camera.

As I mentioned, I'm mainly the mechanical guy and not a programmer.

I really appreciate everyones advice for our team and apparantly there is a lot to be learned when using the camera.

Our programming team did their best to work out problems with the camera before and at the competition. I'm especially proud of their round the clock efforts to adapt our shooter to 100% manual control at the competition.

Being the mechanical guy on the team, it was a bit frustrating watching our performance when you knew that everything was working fine at home, but not at the competition. Mechanical problems (at least for me) are easy to spot and check. This camera thing is a lot harder and it felt like we were guessing too much on how to correct the problem. We put most (not all) of our eggs into this basket and we scrambled to adapt our controls to more effectively shoot in manual only.

I think it would be great if teams who needed to adjust their cameras at the regionals could come up with some sort of document on how they did it. Unfortunately, the short practice sessions don't allow you to just sit with your machine on the actual playing field with a computer and adjust your camera until it works.

Like I said, our camera works perfectly at home and we had a short demo for the local news. Our machine is a completely different animal back home with the camera working. We had a good time at the competition, but I wonder what would have happened if the machine was fully functional
  #12   Spotlight this post!  
Unread 07-04-2006, 03:44
X-Istence X-Istence is offline
Melt the RC controller!
AKA: Bert JW Regeer
no team
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Montville
Posts: 151
X-Istence will become famous soon enoughX-Istence will become famous soon enough
Send a message via AIM to X-Istence Send a message via MSN to X-Istence
Re: Camera did not work for well at the regionals, but worked great at home.

Alan Ing: I know that at the NJ regional, one of the judges or support staff that was there went out onto the field before the day started and would check the camera settings, and would pass them onto the pit administration so that teams could check their code, modify it, and get on the field with good values. I never used them, as they seemed to be straight backwards to what I had, and our camera worked perfectly without em.

Maybe this was something that was available at the regional you guys were at, but did not know it?
__________________
My Blog!
  #13   Spotlight this post!  
Unread 17-04-2006, 17:43
Terry Sherman's Avatar
Terry Sherman Terry Sherman is offline
Mentor -- Software
FRC #0093 (NEW Apple Corps.)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2003
Location: Wisconsin
Posts: 25
Terry Sherman is an unknown quantity at this point
Re: Camera did not work for well at the regionals, but worked great at home.

We had alot of difficulty at regionals as well until we discovered that for some reason the camera attribute 'noise filter' in our configuration was set to 0. At home this was not a problem. In Ohio they were gracious enough to let us walk on the field with just our camera and our laptop during lunch to figure out was was going on. Thats when we discovered that we were getting 1 to 2 pixels of tracked image for each of the arena lights. Adding up this noise, we met the tolerance condition of 10 pixels and tracked! Once we bumped up our noise filter to 3 we were good to go. I'd suggest trying it!

-Terry
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
CMU Camera kills robot controller if not found. Chris_Elston Programming 21 27-03-2006 14:30
So what happend with our camera? Rombus Programming 12 19-03-2006 00:34
Camera shows no love to drive motors anifinder Programming 4 13-02-2006 10:31
Getting the Camera and Default Code to Work nukem Programming 5 18-01-2006 11:48
Does anyone on this board work at home depot? mnkysp6353 General Forum 2 30-12-2001 13:27


All times are GMT -5. The time now is 13:55.

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