Go to Post Figure out where you have to start and what end result you want, from there, all you have to fill in is the middle. - Beth Sweet [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 22-01-2006, 13:29
BrittanyV BrittanyV is offline
Registered User
FRC #1025 (Impi Robotics)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Royal Oak, MI
Posts: 28
BrittanyV is on a distinguished road
Camera Is Spazzing Out!

I've posted a few questions in various places and I've decided to bring it all together in one thread. We're having major issues with our camera and we can't figure out what's wrong.

At first, we couldn't get the camera to scan, but now we can. Also, we can't figure out what we changed in order to allow the camera to scan. Now, when we turn our robot on, "scanning..." appears for a little bit. After that, the camera will start saying that it sees the target, as if everything is green. The red light on the camera, which we noticed is on when the camera tracks, will blink randomly as the camera says it can see the target. If you put the lens cap on, the camera scans perfectly, so we know there's something wrong with what the camera is seeing. The camera is perfectly calibrated in LabVIEW, and we've done exactly what the manual says. We just don't understand what is making the camera do this.

We're all novice programmers, so we just don't know what to do. Any help at all would be absolutely amazing. Please help!
  #2   Spotlight this post!  
Unread 22-01-2006, 13:40
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Camera Is Spazzing Out!

Quote:
Originally Posted by BrittanyV
I've posted a few questions in various places and I've decided to bring it all together in one thread. We're having major issues with our camera and we can't figure out what's wrong.

At first, we couldn't get the camera to scan, but now we can. Also, we can't figure out what we changed in order to allow the camera to scan. Now, when we turn our robot on, "scanning..." appears for a little bit. After that, the camera will start saying that it sees the target, as if everything is green. The red light on the camera, which we noticed is on when the camera tracks, will blink randomly as the camera says it can see the target. If you put the lens cap on, the camera scans perfectly, so we know there's something wrong with what the camera is seeing. The camera is perfectly calibrated in LabVIEW, and we've done exactly what the manual says. We just don't understand what is making the camera do this.

We're all novice programmers, so we just don't know what to do. Any help at all would be absolutely amazing. Please help!
As was pointed out elsewhere, if you're using the FIRST green light, you don't need to calibrate anything. Just load the camera.hex file and it should just work.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #3   Spotlight this post!  
Unread 22-01-2006, 13:59
maniac_2040's Avatar
maniac_2040 maniac_2040 is offline
Registered User
AKA: Matt
FRC #3302 (Turbo Trojans)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Clawson, Michigan
Posts: 34
maniac_2040 is infamous around these partsmaniac_2040 is infamous around these partsmaniac_2040 is infamous around these partsmaniac_2040 is infamous around these parts
Send a message via MSN to maniac_2040
Re: Camera Is Spazzing Out!

Our team is having the same problem. I think it has something to do with very bright lights. Sometimes the camera will sort of lock onto a ceiling light or something and not continue the search algorithm. It'll just sort of jerk/vibrate around in one area. It tracks the vision target fine if it sees it first, but sometimes it'll catch something else....i dunno how to counter/fix this... The camera even locked onto a window when there was a reflection of a bright light! (This is using the default camera driver, no changes)
  #4   Spotlight this post!  
Unread 22-01-2006, 14:09
ctshirk7's Avatar
ctshirk7 ctshirk7 is offline
Curtis Shirk
AKA: Curtis Shirk
FRC #1108 (Panther Robotics)
Team Role: Student
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Paola, KS
Posts: 52
ctshirk7 is on a distinguished road
Send a message via AIM to ctshirk7 Send a message via MSN to ctshirk7 Send a message via Yahoo to ctshirk7
Re: Camera Is Spazzing Out!

the first time we got ours to work properly we had to show it the green light several times and it took a while before it "saw the light" i think maybe it was because the room we are in was pretty bright try it in a darker room see if that helps any.
__________________
Curtis Shirk-Panther Robotics 1108
  #5   Spotlight this post!  
Unread 22-01-2006, 14:55
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Camera Is Spazzing Out!

Quote:
Originally Posted by maniac_2040
Our team is having the same problem. I think it has something to do with very bright lights. Sometimes the camera will sort of lock onto a ceiling light or something and not continue the search algorithm. It'll just sort of jerk/vibrate around in one area. It tracks the vision target fine if it sees it first, but sometimes it'll catch something else....i dunno how to counter/fix this... The camera even locked onto a window when there was a reflection of a bright light! (This is using the default camera driver, no changes)
Quote:
Originally Posted by ctshirk7
the first time we got ours to work properly we had to show it the green light several times and it took a while before it "saw the light" i think maybe it was because the room we are in was pretty bright try it in a darker room see if that helps any.
Sometimes the camera doesn't have enough time to let the tracking software know that it has found the green light. Try increasing the value of SEARCH_DELAY_DEFAULT by one or two. This can be found in tracking.h.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #6   Spotlight this post!  
Unread 23-01-2006, 10:43
BrittanyV BrittanyV is offline
Registered User
FRC #1025 (Impi Robotics)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Royal Oak, MI
Posts: 28
BrittanyV is on a distinguished road
Re: Camera Is Spazzing Out!

Quote:
Originally Posted by Kevin Watson
Sometimes the camera doesn't have enough time to let the tracking software know that it has found the green light. Try increasing the value of SEARCH_DELAY_DEFAULT by one or two. This can be found in tracking.h.

-Kevin

We actually decreased the value of SEARCH_DELAY_DEFAULT to 3, and it seems to work better, but only when there isn't any fluorescent lighting around. Unfortunately, all competitions will have fluorescent lighting. If you don't have to calibrate the camera for camera_s, how can you make the camera so it doesn't see the white lights?
__________________
I have a higher and grander standard of principle than George Washington. He could not lie; I can, but I won't. -Mark Twain
  #7   Spotlight this post!  
Unread 23-01-2006, 10:50
BrittanyV BrittanyV is offline
Registered User
FRC #1025 (Impi Robotics)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Royal Oak, MI
Posts: 28
BrittanyV is on a distinguished road
Re: Camera Is Spazzing Out!

Oh, I forgot something. Also, once you show it the green light, the camera will stay locked on it, until something comes between the camera and the light. The camera kind of reminds me of my grandma's dog. He can't find his ball by himself, but once you point it out to him, he goes running for it. (I hate yappy little dogs) Does anyone else have this problem and what have you done about it?
__________________
I have a higher and grander standard of principle than George Washington. He could not lie; I can, but I won't. -Mark Twain
  #8   Spotlight this post!  
Unread 23-01-2006, 10:54
steveg's Avatar
steveg steveg is offline
Livin' the Dream
AKA: Stephen Guerrera
no team
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Boston, MA
Posts: 70
steveg is a splendid one to beholdsteveg is a splendid one to beholdsteveg is a splendid one to beholdsteveg is a splendid one to beholdsteveg is a splendid one to beholdsteveg is a splendid one to beholdsteveg is a splendid one to beholdsteveg is a splendid one to behold
Send a message via AIM to steveg
Re: Camera Is Spazzing Out!

Another couple of things to check is to be sure that your camera is in focus and that the backup battery is fully charged. A lot of times when the backup battery is low, you can get some pretty strange behavior from the camera. Also, we're using a custom scanning algorithm, and received sort of a weird jerky motion when the max angle that the camera was allowed to tilt to was less than the angle it needed to be at to track.

The scanning algorithm wasn't paying attention to the maxes set by Kevin's code, so it would find the target, then When tracking, it would say "Hey, I'm too far up, let me tilt down" and lose the target, then it would go back to the scanning code... ad infinitum.
  #9   Spotlight this post!  
Unread 23-01-2006, 10:56
steveg's Avatar
steveg steveg is offline
Livin' the Dream
AKA: Stephen Guerrera
no team
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Boston, MA
Posts: 70
steveg is a splendid one to beholdsteveg is a splendid one to beholdsteveg is a splendid one to beholdsteveg is a splendid one to beholdsteveg is a splendid one to beholdsteveg is a splendid one to beholdsteveg is a splendid one to beholdsteveg is a splendid one to behold
Send a message via AIM to steveg
Re: Camera Is Spazzing Out!

Quote:
Originally Posted by BrittanyV
Oh, I forgot something. Also, once you show it the green light, the camera will stay locked on it, until something comes between the camera and the light. The camera kind of reminds me of my grandma's dog. He can't find his ball by himself, but once you point it out to him, he goes running for it. (I hate yappy little dogs) Does anyone else have this problem and what have you done about it?
What you can do there is incorporate a delay before the camera starts looking for the target again. So, after it's held a track for a while, if it looses the track, don't start scanning for x number of loops.
  #10   Spotlight this post!  
Unread 01-02-2006, 19:16
maniac_2040's Avatar
maniac_2040 maniac_2040 is offline
Registered User
AKA: Matt
FRC #3302 (Turbo Trojans)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Clawson, Michigan
Posts: 34
maniac_2040 is infamous around these partsmaniac_2040 is infamous around these partsmaniac_2040 is infamous around these partsmaniac_2040 is infamous around these parts
Send a message via MSN to maniac_2040
Re: Camera Is Spazzing Out!

One way to combat the camera locking onto fluorescent lighting or really bright lights is to make the camera code check the confidence level of the tracked blob. For us, when the camera "locked" onto any light other than the actual vision target it would have a very low confidence level and sort of "spaz out" (i.e. jerky). I made the code check the confidence level for a higher value and it seemed to fix the problem.

The code you need to change is in tracking.c, in the function Servo_Track() near the beginning. There's a line that looks like this:

if(T_Packet_Data.my != 0)

Which checks if the camera found a target, you simply change it to make sure the camera found a 'good' target like so:

if(T_Packet_Data.my != 0 && T_Packet_Data.confidence > some_value)

I just sort of tweaked around 'some_value' till I got good results. A confidence of 80-90 seems pretty good.
  #11   Spotlight this post!  
Unread 01-02-2006, 19:28
Anime-niac_2.9's Avatar
Anime-niac_2.9 Anime-niac_2.9 is offline
Japanese-crap freak(NOTE AVATAR)
AKA: Alex Abenoja, A-Squared, & Anime
FRC #0599 (Robodox)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Northridge, California
Posts: 88
Anime-niac_2.9 will become famous soon enough
Re: Camera Is Spazzing Out!

when we tested it it started tracking something else, not a light. a little more specifically, lol, one of our programmers, and he wasn't wearing any green let alone a green light.
  #12   Spotlight this post!  
Unread 01-02-2006, 21:34
bush's Avatar
bush bush is offline
Registered User
AKA: Aaron
FRC #0710 (Pine Crest School)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Fort Lauderdale, Florida
Posts: 42
bush has a spectacular aura aboutbush has a spectacular aura about
Send a message via AIM to bush
Re: Camera Is Spazzing Out!

Quote:
Originally Posted by maniac_2040
One way to combat the camera locking onto fluorescent lighting or really bright lights is to make the camera code check the confidence level of the tracked blob. For us, when the camera "locked" onto any light other than the actual vision target it would have a very low confidence level and sort of "spaz out" (i.e. jerky). I made the code check the confidence level for a higher value and it seemed to fix the problem.

The code you need to change is in tracking.c, in the function Servo_Track() near the beginning. There's a line that looks like this:

if(T_Packet_Data.my != 0)

Which checks if the camera found a target, you simply change it to make sure the camera found a 'good' target like so:

if(T_Packet_Data.my != 0 && T_Packet_Data.confidence > some_value)

I just sort of tweaked around 'some_value' till I got good results. A confidence of 80-90 seems pretty good.

That's an excellent idea. Why didn't I think of this???
  #13   Spotlight this post!  
Unread 01-02-2006, 21:39
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 Is Spazzing Out!

Quote:
Originally Posted by Anime-niac_2.9
when we tested it it started tracking something else, not a light. a little more specifically, lol, one of our programmers, and he wasn't wearing any green let alone a green light.

It was tracking my team's mentor/teacher, rather than the green light, fixed it with some nudging of some values.
__________________
My Blog!
  #14   Spotlight this post!  
Unread 01-02-2006, 22:29
Anime-niac_2.9's Avatar
Anime-niac_2.9 Anime-niac_2.9 is offline
Japanese-crap freak(NOTE AVATAR)
AKA: Alex Abenoja, A-Squared, & Anime
FRC #0599 (Robodox)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Northridge, California
Posts: 88
Anime-niac_2.9 will become famous soon enough
Re: Camera Is Spazzing Out!

Quote:
Originally Posted by X-Istence
It was tracking my team's mentor/teacher, rather than the green light, fixed it with some nudging of some values.
plz, tell me exactly what values you changed. oh, and just so you know, first time we tested the camera the guy was facing the little thing and when it first tracked him it was in the crotch.
__________________
THE ROBODOX FORUM

Reading: Suzumiya Haruhi no Yuutsu by Tanigawa Nagaru
Religion: Haruhiism
  #15   Spotlight this post!  
Unread 03-02-2006, 07:34
mallot1243's Avatar
mallot1243 mallot1243 is offline
Registered User
FRC #1243
 
Join Date: Apr 2004
Rookie Year: 2004
Location: Swartz Creek, MI
Posts: 27
mallot1243 is an unknown quantity at this point
Re: Camera Is Spazzing Out!

OK, I finally got the camera to work, all it took was a new adapter (3.5 weeks to find that out...) So now we found the light and I think the camera gets so excited and freaks out. Any help for our epileptic light?
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
How To Use the Google Camera generalbrando Kit & Additional Hardware 2 07-02-2006 16:00
Camera pointing error? Craig Putnam Programming 14 21-01-2006 02:52
Scripting Setup and the Camera + Serial Port Drivers CJO Programming 22 11-01-2006 17:42
CMUCam2 Camera Code - Are important parts commented out? Mr. Lim Programming 4 14-01-2005 12:11


All times are GMT -5. The time now is 10:58.

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