![]() |
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 |
Re: Autonomous Target Tracking at Regionals
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. |
Re: Autonomous Target Tracking at Regionals
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. |
Re: Autonomous Target Tracking at Regionals
0) 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.
1) 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. 2) 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? |
Re: Autonomous Target Tracking at Regionals
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:
|
Re: Autonomous Target Tracking at Regionals
Quote:
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. |
Re: Autonomous Target Tracking at Regionals
Quote:
|
Re: Autonomous Target Tracking at Regionals
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. |
Re: Autonomous Target Tracking at Regionals
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 |
Re: Autonomous Target Tracking at Regionals
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 :( Sigh. |
Re: Autonomous Target Tracking at Regionals
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 |
Re: Autonomous Target Tracking at Regionals
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.
|
Re: Autonomous Target Tracking at Regionals
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. |
Re: Autonomous Target Tracking at Regionals
Quote:
Can you email me something? Phil.Malone(at)mr-phil.com |
Re: Autonomous Target Tracking at Regionals
Quote:
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 :) 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. |
Re: Autonomous Target Tracking at Regionals
Quote:
Do you have access to your camera.h file? can you attach it? |
Re: Autonomous Target Tracking at Regionals
Quote:
Our sister bot at peachtree could not see the light on the playing field and we finally solved the problem by switching cameras. |
Re: Autonomous Target Tracking at Regionals
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? |
Re: Autonomous Target Tracking at Regionals
0705920, would I be able to get my hands on the solution? I would really appreciate it :) , just send me a PM if you have time.
|
Re: Autonomous Target Tracking at Regionals
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.
|
Re: Autonomous Target Tracking at Regionals
Quote:
|
Re: Autonomous Target Tracking at Regionals
no, two other teams finally tried but they didn't come very close...so right now were still the only ones. we'll have to wait and see what happens in quater finals
|
Re: Autonomous Target Tracking at Regionals
Our sister bot 1369 made two auto modes in finals, both made the diference in winning and loosing.
Again it didn;t work until they switched camers. |
Re: Autonomous Target Tracking at Regionals
We finally got the auto mode working. we found out that the camera color setting is set by the GUI. The last time that we had used the GUI was to focus the camera, so it was still in the RGB mode. After that, we still had to switch our camera out, but then IT WORKED! Unfortunately, we only had 1 match left yesterday, and then the Quarterfinals.
|
Re: Autonomous Target Tracking at Regionals
As the starter of this thread, I'm happy to report that I finally managed to get the camera working on Saturday, and managed to score twice in Autonomous mode. Once in the seed matches and once in eliminations.
Both times were 100% camera directed as the bot started out-off target, stopped, turned towards the light, ran forward, overshot by about 4 inches, backed up and dropped the tube. It was a joy to watch.... I need to post video :) Unfortunately, I had changed two things prior to the match.... so no definiative answer as to the cause/solution. 1) Yes we did change the camera, because once we got the GUI hooked up, we were unable to re-focus the picture. It was focussed prior to shipping, but i couldn't get it to re-focus, so I don't know if there is any way to permanently miss-align the optics. The poorly focussed camera was able to deal with the light in a benign environment, but not on the high intensity field. 2) The other factor that caused me concern is that the target.cfg file that the labview GUI is using has a bunch more parameters than are being set by the default camera.c/h code. It occured to me that it may be a requirement to FIRST load the target parameters using the Labview GUI, and then the Kevin Watson code jsu loads a subset of the commands required for color tuning. Since the last thing we did with the camera before shipping was focus it, we had would have loaded the default "human viewing" camera configurations. It occured to me that these settings may had left some parameters set badly for tracking.... Anyway, we made both of these changes in a vain hope that one or both would make the difference..... Clearly, having a well focussed camera is important, but I KNOW that it was focussed in Pittsburg & we still had the problem on the field, so maybe the trick is ALSO loading the 2006target.cfg once, to set the "other" parameters. Phil. edit: Ha Ha... I see our programmer also just posted the same informnation... Hi Sarah :) |
Re: Autonomous Target Tracking at Regionals
well in the semi -finals/finals we scored in autonmous mode three times in a row, it was pretty sweet. I would like to thank our programmers who are students for working very hard to finish after we had shipped the robot. we could score continously on the practice field but on the playing field we had a few problems. We're thinking of putting shields around the camera, so it can focus better.
|
Re: Autonomous Target Tracking at Regionals
Team 40 also had an extremely difficult time getting the camera to work using a the 2007 camera. The CCD seems to react to the light differently, a good test
would be to fire up Labview and using the same base board grab a screen shot with the 05/06 lens and the 07 lens using the 06 light settings. Chances are you will see the light with the 05/06 lens and you will see nothing with the 07. Increasing the brightness and ACG Gain to 20 seems to help the 07 lens but unfortunately the cameras lock will still be intermittent unlike last year where a steady lock was achieved. Team 40 ended up going to an ultrasonic sensor to backup the camera for distance and were able to score 3 times (once without the light) once the switch was made. |
Re: Autonomous Target Tracking at Regionals
We were using out values from last year (different from the default ones). These values worked fine for us all of last year, including NJ, Pallmetto, and Atlanta. This year we went to NJ and it worked fine but then when we went to NY out camera never really locked on, we ended up taking the camera really close to the field and taking another picture. We found it really hard to find a set of values that worked. In NY the ceiling was alot lower then at any regional that we have been to before and we found the all of the over head lights look exactly like the green one.
|
Re: Autonomous Target Tracking at Regionals
It seems everyone is having tracking problems. If you have a solution, post it on ChiefDelphi, so we can all be successful. It works great in the pits, on the practice field, but not during the matches. I will forward your reply to our student programmer. All FIRST officials say is everything is working fine. It is obvious that it is not.
By the way, it worked sometimes at the BAE Granite State Regional, and would not lock on at all at the Chesapeake Regiona. Very frustrating. Thanks, BuzzRobotics, Team 175 |
Re: Autonomous Target Tracking at Regionals
All I know is that last year we had no problem locking onto the green target, but this year we've been unable to see the target at all, even in our shop. Every light looks like the green light, or no light looks like the green light - we can't seem to find a break where the green light stands out. We're going to keep trying once we get to Lone Star, but we don't know if we'll have any success there.
-Danny |
Re: Autonomous Target Tracking at Regionals
At FLR, we had no trouble locking on to the target light. It worked every time except for the one where our camera module was broken. We are using the same settings we used in 2006, which I believe are the default ones (except for COMJ which we use 133 rather than 132 - Bit 0 set as per the CMUCam2 Manual). Our camera code, however, is custom.
Mike |
Re: Autonomous Target Tracking at Regionals
At Peachtree, we could not see the field lights. Our autonomous mode does not start rolling until it can track the light, so we ended up just deploying the arm.
Thursday evening, we took the robot to the sidelines (which was farther away than the home zone) and could not lock onto the light. However, we had no problem locking on to our practice light, which was up in the stands at least 30' feet away (and higher). We were lucky to have a First official (thanks for your time Eric) come by and use his camera and Labview vi to track and verify the field light. Then we spent Friday chasing mechanical issues. We now have some settings that I think will work, but we will test them at Palmetto. 1369 used our light to refine their settings on the practice field with very good results in the finals. However, their robot was still "hesitant" about starting towards the target. They were the only team that scored in autonomous mode during the finals (that I saw). On to Palmetto. |
Re: Autonomous Target Tracking at Regionals
I dont really know anything about light and photo but.. Green is almost in the middle of the color spectrum, do you think that if they moved to a color such as red, which is at the end of the color spectrum, that it would help make the light stand out more?
|
Re: Autonomous Target Tracking at Regionals
[Shameless plug follows...I am sick of hearing about problems with the CMUCam and would like people to have a stable camera system instead! :) ]
I have created a vsion system (the FALCON) that overcomes the shortcomings inherent in the CMUCam. I will be offering it (in limited quantities for now) for sale to interested FIRST teams. This system differs from the CMUCam in that it can track up to 12 objects under varying lighting conditions. It accomplishes this by first isolating objects (such as the lights) from the background, and then averaging each object's color. This allows the system to maintain a very stable lock. To underscore this, I used the same color calibration values that worked in our 'bot shop on the competition field at the regional, and the system never lost a lock while the target was in view. (At St. Louis, with our old arm, we almost put a tube on the rack, but the tube had fallen out of our gripper while the robot was diving over to the rack. After that, the arm failed for the last time and we played D. :( ) I have a partially competed website up at http://www.falconir.com that has the manual among other things available for download. If you are interested in this system, send me a PM. |
Re: Autonomous Target Tracking at Regionals
I just thought I'd post the files I ended up using at the Annapolis Regions. They worked really well.
My advice on getting the camera working: 1) Connect up the LABView GUI and ensure that the Camera is focussed (use a subject that is at least 10 feet away). Add a dot of hot glue to keep the lense in place once it's focussed. 2) Before disonnecting, load your specific Target.cfg file into Labview AND upload it to the camera. 3) Verify the MPLAB camera code by setting the _DEBUG #define in the camera.h file. This ensures that the camera is initializing and sending good x/y position data. The attached target file (Annapolis_target.cfg) is based on the 2006_target.cfg file, but it has filtering set to 1 and the Green range is 15-17 (rather than 15-16). The camera.h should have matching values. It's important to make sure these files match to get consistant results. Filtering prevented the occasional "flyaway" points occuring from other bright sources. The wider Green values gave a higher confidence reading on the actual target lamp. We have a "CamLock" flag that is set if the target confidence is greater than 9 |
Re: Autonomous Target Tracking at Regionals
Quote:
Quote:
|
Re: Autonomous Target Tracking at Regionals
Quote:
One thing we do is the bot will stop if it doesn't see the light. That is why 1369 was hesitant because it would see the light start out loose the light stop see the light etc, but once it got close enough would have not probrems. We are going to make the change to move forward no matter what even if it looses the light with the idea it will acquire the light. That should change the hesitant moves by 1369 in auto mode. |
Re: Autonomous Target Tracking at Regionals
Team 79 expected trouble at the beginning of the season. We knew that we would be pointing the camera upward toward the lights. So we evaluated many ways to minimize background lighting. We found that the green target lights are fairly uniform.
In the end we used nearly the same camera numbers as given in the default code. However, we ran many tests with labview to tighten the tracking color numbers. We developed a procedure to find the best numbers at any event. Our 2007 camera responds differently than our 2006 camera. We had two sets of numbers. Each camera is unique. Simply changing the camera may give better results. but it may not. The tracking color values are much easier to change than the camera. Unfortunately, the colors of the background lights on the field are different from those in the pits. We needed the camera out on the field to do calibration. So the challenge for us was to set up the camera on the regional field and use our procedure to suppress the background lights. We placed the 2006 camera at the edge of the field. After running the procedure we found the tracking colors were very close to the numbers we last set before shipping. So we made no change at the regional. We tracked the target-lights well during matches. Jerry w (i am looking for the latest version of our procedure to post.) |
Re: Autonomous Target Tracking at Regionals
Team Update 18:
Quote:
My SWAG is that most problems are attributable to a) AV rack lighting reflecting off the target light diffusers, washing out the green (I saw 50 Tracking Conf. points difference between #1/#5 and #3/#7 when I was checking them), b) tracking two lights resulting in single-digit Tracking Conf., c) calibrating to the practice field light, and d) basic doh! things like focus, crud on the lens, etc. |
Re: Autonomous Target Tracking at Regionals
Ive heard many different problems with the cameras and tracking.
At GLR a robot locked onto team 66's neon red sign they had hanging over their teams location in the stands, it was cool but not for the game. |
Re: Autonomous Target Tracking at Regionals
I have given the FALCON system some more thought in light of the open-source competition for this tye of system.
If some people on ChiefDelphi can offer convincing reasons why the FALCON system should become an open source project, I would be willing to make it so. PM me with your reasons, or start another thread. :) I hope to hear some good ones! :D |
Re: Autonomous Target Tracking at Regionals
We had trouble on our home field constantly tracking the light with the camera while the robot was moving.
Our solution was simple. We move the robot reasonably close to the rack through dead reckoning, then the robot doesn't move until the camera locks on. From 6-8 feet away from the rack, with our camera mounted on the top of our 4 foot mast, not once have we had trouble locking on to the light. One VERY annoying thing that I wonder if other teams noticed - the practice field at the Detroit Regional had the light mounted a full 2 feet in the wrong location. I happily did not see anyone piling into the rack on the competition field because of the practice field error - but I would expect the practice fields to at least be built correctly or have a warning sign on them. :mad: |
Re: Autonomous Target Tracking at Regionals
We had problems picking up the light on the actual field(with it working fine on the practice field etc), then we broadened the range of light it considered green and then it worked fairly well if not perfectly.
|
Re: Autonomous Target Tracking at Regionals
What specifically did you do to "broaden the green light range"?
|
Re: Autonomous Target Tracking at Regionals
You will want to change the values in camera.h:
Code:
#define R_MIN_DEFAULT 85 // Rmin for call to Track_Color() |
Re: Autonomous Target Tracking at Regionals
If you are using Kevin's code - you can also lower the required confidence requirement or you can increase the delay after each camera search increment.
You can also use his newest code for the 0-90 degree mapping of the full 255 pwm range for increased accuracy - though we didn't use it at the Detroit regional. On thing I hope many teams considered is that using degrees is very inefficient. Use the straight PWM values so you don't have to do any floating point or lose any accuracy through integer math. You can go further than that too if you limit where you want to lock your camera so you only use about a 45 degree range - tracking with the camara isn't necessary if you've got a gyro and geartooth encoders, you simply need your initial angle and distance. |
Re: Autonomous Target Tracking at Regionals
Quote:
|
Re: Autonomous Target Tracking at Regionals
Quote:
It looks like we've finally figured out our autonomous problems in the fix-it-windows, which means we should have a working auto at the Championship (didn't have enough time for it at AZ). I hope we don't have camera tracking problems there, I'd like to see a good amount of autonomous modes there. |
Re: Autonomous Target Tracking at Regionals
Exactly right.
You need the camera once. So to avoid all the problems we've seen and have experienced, we get close, stop, and take one snapshot of where we are vs. the light. It doesn't lend itself to any fancy turning / driving. We just turn once and then we drive straight ahead. But we do it often enough that we are pretty happy. |
Re: Autonomous Target Tracking at Regionals
It's already been mentioned how to change it is Kevin's code(as I recall there's also an online window you could change it from), in EasyC they have a camera config menu, go to that and then offset your two ends of the three colors away from eachother by whatever seems apropriate.
edit: also dead reconing off your initial camera value means that if your steering is just a little bit off you might not get it, I personally think think tracking is the way to go. |
| All times are GMT -5. The time now is 05:18. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi