Go to Post Not gonna lie, I wanna marry the person over at #254 who does their wiring... I have admired it for years. :) - Lightfoot26 [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 18-02-2007, 00:43
dpick1055's Avatar
dpick1055 dpick1055 is offline
David Pick
FRC #1739 (Chicago Knights)
Team Role: Alumni
 
Join Date: May 2005
Rookie Year: 2004
Location: Chicago
Posts: 75
dpick1055 is on a distinguished road
Send a message via AIM to dpick1055
Camera locks on but it still off

So we finally got our camera completely working, or so we thought. After getting the camera to lock onto the light really well and give us a distance to the light rather accurately we noticed that once the camera was locked on the pan servo was a few degrees off. This meant that when it was locked on from our home zone it appeared as though the camera was off by a foot or two. Is this related to something we did wrong in the code, or is that just how Kevin's bells and whistles code works? Thanks
__________________
Always remember to take your powered wheels off the ground when first testing code. Otherwise you'll end up with holes in the wall like us
  #2   Spotlight this post!  
Unread 18-02-2007, 01:06
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 locks on but it still off

Quote:
Originally Posted by dpick1055 View Post
So we finally got our camera completely working, or so we thought. After getting the camera to lock onto the light really well and give us a distance to the light rather accurately we noticed that once the camera was locked on the pan servo was a few degrees off. This meant that when it was locked on from our home zone it appeared as though the camera was off by a foot or two. Is this related to something we did wrong in the code, or is that just how Kevin's bells and whistles code works? Thanks
This has been discussed a few times in the past. Here's one thread.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #3   Spotlight this post!  
Unread 18-02-2007, 11:00
gnirts gnirts is offline
Suspicious pointer conversion
AKA: Robinson Levin
FRC #1648 (The Gearbox Gangstaz)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: ATL
Posts: 116
gnirts will become famous soon enough
Re: Camera locks on but it still off

Right now, when you square up the camera with our chassis, the actual field-of-view (which we found to be around 42* in the pan direction) is about 75% on the right side of our 'bot. We have adjusted the Pan Target pixel so that when tracking the camera unit points straight at the target, but now I am thinking that this isn't really desirable. Who cares where it points, you want the mx values on the center of the image sensor, right? Wouldn't that give you a better chance of not losing the light?

What about using pwm.h to adjust the PWM_CENTER value like so:
  1. Put the light directly in front of your camera/robot but far enough away from it, so that blob size is just a few pixels.
  2. The camera should aim to the left or right of it if the pan tracking pixel is at the center of the image sensor (default).
  3. When the terminal shows that pan error is close to zero pixels (try to get it within one) then record the pwm value being sent to the pan servo.
  4. Add (127 - pwmValueWithZeroPanError) * PWM_GAIN to PWM_CENTER for the pan PWM (or subtract--test which one helps).
Now a pan servo of 127 should mean the light is dead ahead (though the camera unit will be pointed away from it).

Is this better than changing the pan target pixel?

Thanks in advance,
Robinson Levin

[Note: I think that there is an underlying assumption in the adjust above that your previous PWM_CENTER value made a pwm output of 127 point the camera straight ahead, right?]

Last edited by gnirts : 18-02-2007 at 11:11.
  #4   Spotlight this post!  
Unread 18-02-2007, 13:11
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 locks on but it still off

Quote:
Originally Posted by gnirts View Post
...Is this better than changing the pan target pixel?
Yes, if the optical offset moves the center tracking pixel that far, I wouldn't decrease your field of view by moving it. If you know what the angular offset is, just add or subtract it from your calculation and you should be good to go.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
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
Not quite an animation, but still... Mazin 3D Animation and Competition 7 13-06-2006 22:25
Urgent help needed : Camera locks on to no apparent target! ?!?! Salik Syed Programming 11 06-03-2006 17:24
OI PWM Lights blink red but still works? SpeakerSilenced Programming 4 21-02-2005 10:44
Team 108 Finishes, but is still confuzed Specialagentjim 3D Animation and Competition 2 20-03-2002 19:33
What keeps you off a team but still with FIRST? Jessica Boucher General Forum 14 13-06-2001 21:37


All times are GMT -5. The time now is 16:56.

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