View Single Post
  #8   Spotlight this post!  
Unread 16-01-2006, 23:43
Terry Sherman's Avatar
Terry Sherman Terry Sherman is offline
Mentor -- Software
FRC #0093 (NEW Apple Corps.)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2003
Location: Wisconsin
Posts: 25
Terry Sherman is an unknown quantity at this point
Re: Camera pointing error?

We also so our camera looking a way to the side and up as well and decided to investigate a little bit. One thing we noticed is that the default Pan & Tilt values seem to be reversed. In the code we are using (I haven't checked, maybe Kevin has newer?) we see:
#define PAN_TARGET_PIXEL_DEFAULT 79
#define TILT_TARGET_PIXEL_DEFAULT 119

If I am thinking about this right the screen resolution is 240x160 where the 240 is the x-axis and 160 is the y-axis. The pixel values (if starting at 0) for the center of the screen would be (119,79). I think the x-axis correlates with 'pan' and y-axis to 'tilt'. So we changed the target defaults to:
#define PAN_TARGET_PIXEL_DEFAULT 119
#define TILT_TARGET_PIXEL_DEFAULT 79

And our camera now seems to be centered in on the target once it finds it and not looking off a into the distance a little but.

Note:We also used Sean Witte's 'CMUVisualizer' that he posted at this thread: http://www.chiefdelphi.com/forums/sh...ad.php?t=41240
I don't know if this works but here's a link to his attachment: http://www.chiefdelphi.com/forums/at...achmentid=3780

It now shows us locking in on the center of the screen now as well.

Hope this helps!
-Terry