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

Did you use the default values for the green light of modified values?

A simple question perhaps but did you make sure it was focused?

I agree with Dave, shipping the robot could have easily produced enough vibration to un-focus the lense.

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

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!

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

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”.

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.

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 :slight_smile:

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.

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.

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.

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.

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 :slight_smile:

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?

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