Go to Post I think it's important to keep FIRST's most important award as the top point getter [in Fantasy FIRST]. It's help reinforce that the Chairman's award, Engineering Inspiration and Woodie Flowers award are actually important and FIRST is about more than just the robots. - Koko Ed [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 08-02-2006, 14:25
Keith Watson Keith Watson is offline
Registered User
FRC #0957 (WATSON)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Wilsonville, OR
Posts: 112
Keith Watson is just really niceKeith Watson is just really niceKeith Watson is just really niceKeith Watson is just really nice
Search Servo Initialization Caution

The default search code initializes the camera pan/tilt servos with this code.

Code:
    if(new_search == 1)
    {
        new_search = 0;
        temp_pan_servo = 0;
        temp_tilt_servo = Tracking_Config_Data.Tilt_Center_PWM;
                            
    }
    else
    {
        // search code
    }
    PAN_SERVO = (unsigned char)temp_pan_servo;
    TILT_SERVO = (unsigned char)temp_tilt_servo;
Note that the pan servo pwm is hardcoded to zero. If you have changed PAN_MIN_PWM_DEFAULT from zero to something else then hardcoding to zero is incorrect. Change the line to:
Code:
        temp_pan_servo = Tracking_Config_Data.Pan_Min_PWM;
__________________
Keith Watson - Professional Software Engineer
No relation to "Kevin" Watson, who created the camera tracking code.

Last edited by Keith Watson : 08-02-2006 at 14:39.
  #2   Spotlight this post!  
Unread 09-02-2006, 01:05
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: Search Servo Initialization Caution

Quote:
Originally Posted by Keith Watson
The default search code initializes the camera pan/tilt servos with this code.

Code:
 if(new_search == 1)
{
new_search = 0;
temp_pan_servo = 0;
temp_tilt_servo = Tracking_Config_Data.Tilt_Center_PWM;
 
}
else
{
// search code
}
PAN_SERVO = (unsigned char)temp_pan_servo;
TILT_SERVO = (unsigned char)temp_tilt_servo;
Note that the pan servo pwm is hardcoded to zero. If you have changed PAN_MIN_PWM_DEFAULT from zero to something else then hardcoding to zero is incorrect. Change the line to:
Code:
 temp_pan_servo = Tracking_Config_Data.Pan_Min_PWM;
Hmmm... I wonder what the heck I was thinking when I did that? Oh well, since I can't possibly explain this away as an undocumented "feature", I guess we have to call it a bug <grin>.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #3   Spotlight this post!  
Unread 09-02-2006, 02:13
Keith Watson Keith Watson is offline
Registered User
FRC #0957 (WATSON)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Wilsonville, OR
Posts: 112
Keith Watson is just really niceKeith Watson is just really niceKeith Watson is just really niceKeith Watson is just really nice
Re: Search Servo Initialization Caution

I found it by reading the code to understand the algorithm. The rest of the code was all nicely parameterized.
__________________
Keith Watson - Professional Software Engineer
No relation to "Kevin" Watson, who created the camera tracking code.
  #4   Spotlight this post!  
Unread 09-02-2006, 07:49
Donut Donut is offline
The Arizona Mentor
AKA: Andrew
FRC #2662 (RoboKrew)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Goodyear, AZ
Posts: 1,313
Donut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond repute
Re: Search Servo Initialization Caution

You may want to keep temp_pan_servo or temp_tilt_servo the same for a new search as well; we ran into a problem where the camera would catch the target as it spun all the way back to 0 (as it does this the tilt angle increases, which is why it caught it on the way to the left but not the right), lose it when it got there, initialize a new search and have us repeat over and over.
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
Mozilla / FireFox Search Plugins Brandon Martus Announcements 7 06-06-2005 10:41
search white papers? sirbleedsalot CD Forum Support 3 03-04-2005 17:09
teach rookies how to search Ken Leung CD Forum Support 2 17-01-2005 00:03
20 second search interval sanddrag CD Forum Support 4 14-02-2004 08:52
Whacky C Complier behavior Larry Barello Programming 12 26-01-2004 22:15


All times are GMT -5. The time now is 06:07.

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