Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Control System (http://www.chiefdelphi.com/forums/forumdisplay.php?f=177)
-   -   Autonomous Target Tracking at Regionals (http://www.chiefdelphi.com/forums/showthread.php?t=55794)

Mike Bortfeldt 19-03-2007 13:01

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

Feisty_one 19-03-2007 13:55

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.

bear24rw 19-03-2007 16:56

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?

Eldarion 19-03-2007 23:16

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.

PhilBot 20-03-2007 10:39

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

Dave Flowerday 20-03-2007 10:56

Re: Autonomous Target Tracking at Regionals
 
Quote:

Originally Posted by PhilBot (Post 601565)
I just thought I'd post the files I ended up using at the Annapolis Regions. They worked really well.

You might want to respect Kevin Watson's wishes and remove that file. As indicated in the comments at the top of camera.h:
Quote:

You are free to use this source code for any non-commercial use. Please do not make copies of this source code, modified or un-modified, publicly available on the internet or elsewhere without permission. Thanks.
It might seem trivial, but if you ask me it's a small price to pay for the very high quality software that Kevin provides to everyone in FIRST free of charge. We should all encourage him to continue his efforts by abiding by his license.

Doug Leppard 20-03-2007 10:58

Re: Autonomous Target Tracking at Regionals
 
Quote:

Originally Posted by Feisty_one (Post 600880)

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

I was working REMOTELY with the programmer (from 1902) that was helping 1369. Thanks to you guys or whom ever, when they switched cameras it got working.

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.

jerry w 20-03-2007 20:59

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

petek 20-03-2007 22:04

Re: Autonomous Target Tracking at Regionals
 
Team Update 18:
Quote:

Section 3 – At the Events
We understand that there have been reports of teams having difficulty with the target light acquisition. We are reviewing the situation and hope to have more information prior to the Week 4 practice day.
I guess it's a good thing that FIRST acknowledged that they have heard that some teams are having problems...

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.

65_Xero_Huskie 21-03-2007 08:41

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.

Eldarion 21-03-2007 14:19

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

Tom Line 21-03-2007 15:52

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:

Vogel648 21-03-2007 18:01

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.

marccenter 22-03-2007 13:11

Re: Autonomous Target Tracking at Regionals
 
What specifically did you do to "broaden the green light range"?

ace123 22-03-2007 23:59

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()
#define R_MAX_DEFAULT  115            // Rmax for call to Track_Color()
#define G_MIN_DEFAULT  15              // Gmin for call to Track_Color()
#define G_MAX_DEFAULT  17              // Gmax for call to Track_Color()
#define B_MIN_DEFAULT  100    // Bmin for call to Track_Color()
#define B_MAX_DEFAULT  145    // Bmax for call to Track_Color()

The values might be in YCrCb, so they might not correspond to what you expect... be careful that you don't go too far, or you will end up with ambient noise coming in.


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