Autonomous Target Tracking at Regionals

I’m at my witts end with trying to get my auto code running this year. I’m trying to find the “silver bullet” that will explain what I’m not seeing this year.

Background…

We had great auto modes last year. Dependable target tracking etc. We avoided the pan-tilt unit and just scanned our robot directly.

This year, we have several auto-ringer placing auto modes, that all work great at our home facillity and at the regional practice fields, but we can’t get any joy on the actual playing field. The bot just DOES NOT see the lamps.

We had the problem at Pittsburgh and now again at the Chesapeake regional. I polled some of the other teams and many of the teams that are trying to get auto mode working are having the same trouble. Good on practice, bad on real field.

I started suspecting that the Rack’s lamp power supply wasn’t able to drive all four lamps. This would explain why single lamp test racks all seemed to work. I raised this possiblity at the Chesapeake regional and I was shown the camera verification setup they use to ensure that the arena lamps are all working properly.

They use the Labview GUI to load the “default” settings and show the tracking numbers. It looked fine.

I verified that my camera.h file data was the same & matched the on-screen numbers. (I’m using the streamlined 2.1 camera code.)

At this point I’m convinced that there is some subtle difference between the GUI program (which works fine) and the camera.c/h code (that hardly anyone can get working on a real playing field). (something like a flag that only has an effect in a really bright environment)

I even spoke to Dave Lavery on the sidelines today, but he re-affirmed that everything sould be fine.

Ask yourself… how many relaible auto-modes have you seen this year (compared to last year)… There was maybe two at pittsburgh and none so far at Annapolis…

In my case the camera initializes fine. but does not show any targets with any non-zero confidence levels despite how close I get to the spiders… (Unlike in the pits where I get a great target)

Any brainstorms…

I’ve attached my .h file… I’ve tried filtering on/off to no avail.
Unfortunatly we can’t get on the field with a computer attached…

Phil

I would check to make sure that your camera is focused. When you are a large distance away(like on the field) that makes a difference but when you are closer like in the pits its much easier for the camera to see the lights.

Also check the camera manual to see if there is anything that may help you adjust for the different light, I know there are some but I don’t remember how to use them atm, and my copy of the manual is AWOL.

check your focus, check your autonomous switches, check everything.
a problem that we encountered was EMI that was interfering with the camera and causing it to cycle out until it completely lost the target. perhaps your robot may be experiencing this?

We have actually had some very successful auto modes this competition… after we got away from the silly mechanical errors we were fine.

EDIT: actually, come to think of it, the light gains that we perfected last year have served us very well… we went through about 3 hours just adjusting the color gains and the ranges until they were just right… i guess we just got lucky that it worked all around.

  1. Double check your color numbers (R, G, and B). I remember at GTR last year they changed them a few times over the course of the regional to try and improve detection, such that to use our test lamp we had to change the code from our competition code. It was one of the things on our pre-match checklist to make sure that we had the correct camera colours.

  2. See if you might be able to add shades or blinders around the camera so that you aren’t picking up particularely high or low arena lights. Bright arena lights can get confused for the target. They may not exist on the practice fields, but they are there in the real thing.

  3. I guess it is too late for it now, but maybe ask to be let onto the field with labview and see what it is?

There has been some discussion on the light this morning in another thread here. I wish I knew for sure on how to fix it. We had the exact same problem on the Wisconsin Regional Field. There was a value that we changed that fixed a lot of noise and I believe it was the Noise Filter like what petek mentioned in post 598538. I hope you get it. If you figure something out I would be interested to know for future designs in Off-Season project :yikes:

We have a new camera and a spare. We focussed both. We also have a full size field at home and the routines worked fine there so we are pretty comfortable that it’s not a camera optics or allignment problem.

Also, we do get right up in the face of the rack (closer than in the pits even) and still not lock indication.

I’m really looking for information from anyone who has actually GOT target lock during Rack 'n Roll “competiton”… any special trick you discovered.

I also discovered that the noise filter is good at removing “fly aways” at my home field, but right now I’d just like to see ANY target :slight_smile:

We had no problem seeing the camera at Forida regional.

Our sister bot 1369 is at peachtree with our main programmer of 1902. they could not see the light on the playing field. They switched cameras and now it is working.

uhmm

maybe the lighting has something to do with it

at home our camera couldn’t track a green light for anything(it kept looking out the window)

but at night or in a darker area it tracked it real well.

so maybe adjusting the noise filter like the other teams said will fix it

Arg.

Developing proficient camera image analyzation software in an uncontrolled environment while having to account for thousands of small environmental nuances is a near impossible task in and of itself. Then realize that it has to be written in a few days (programmer deadline’s are a little shorter than six weeks) by high school kids.

I mean I guess I should be happy that the robot even moves, but I swear: give me one overnighter and an open field and it’ll be perfect… I would’ve stayed over at the convention center tonight! I JUST WANT ONE NIGHTTT :frowning:

Sigh.

We haven’t been at a regional yet, but our gym has similar lighting to that of a regional. When we tested everything out in our robotics portable it worked like a charm from lab views values, but in the gym, during the last couple days, I spent a good 4-5 hours changing this and that, because lab view’s values simply didn’t give us values which were tracking from. I literately changed everything in hopes it would work… eventually I hit the right combination of tweaks and my autonomous worked right then and there… what I found out from the experience was that in that lighting environment, Lab view tended to to give lower values then the needed, to confirm we slowly turned off the lights one by one, and as it got dimmer the Lab view values would become closer to the needed values. We tried it on our other camera, and found the same thing happened but at a different rate… so we don’t know if its labview, camera or what. hope that helps.

David

Tomorrow before matches if you can go out on the field with either LABVIEw or the GUI and your camera and check the numbers and make sure they fall into your range. If you have no luck with that then see if you can switch in another camera.

We had the same problem in Arizona. I fixed it in the code and now it works perfect.
message me if you want the solution.

Hi… I don’t have IM… & only limited connectivity…

Can you email me something? Phil.Malone(at)mr-phil.com

That’s what I’d love to do, but despite how helpfull the staff have been, they draw the line at letting anyone on the field…

I’m going to see what I can try from the sidelines…

Note to organizers… maybe next year, consider lowering the lights during auto mode :slight_smile:
The the general concensus becomes that “Auto mode is too hard and not worth it” then one key part of the engineering challenge will be lost.

What software were you using??? MPLAB or other.

Do you have access to your camera.h file? can you attach it?

We used easyc pro. The camera acquired the light all 16 times at the regional and made the ringer 13 times.

Our sister bot at peachtree could not see the light on the playing field and we finally solved the problem by switching cameras.

Team 648 is having a similar problem at the Midwest Regional. Even tho we hang autonomously on the practice field well, we have only scored once during competition - so far! (It is our first year using the camera, so we may have to work some bugs out yet)

At least we are trying - no one else here is trying to score in autonomous mode. Is that true at other regionals?

0705920, would I be able to get my hands on the solution? I would really appreciate it :slight_smile: , just send me a PM if you have time.

Our camera was able to lock on at Arizona with the default values; it was having problems initially, but this was because our limits on the maximum tilt and pan angles didn’t allow the camera to look up high enough to see the lights. It did it in all our matches Saturday, and one or two on Friday as well.