Go to Post "You know, a robotics regional is the only place where you can walk in and see two people in chicken suits and not be confused." - Herodotus [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 25-01-2009, 20:52
Pancake Pancake is offline
Registered User
FRC #0991 (The Dukes)
Team Role: Photography
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Phoenix
Posts: 11
Pancake is an unknown quantity at this point
Yet another Camera thread...

For the past few days / week, I've been trying to get the camera code to work. This code I have made is a variation of the sample code provided. As an FYI, the Target.h and Target.cpp is a copy and paste from the sample code.

The code *seems* to recognize a target... when it sees pink above green (or was it green above pink?), the servos slow down significantly and then once the target is out of sight, it keeps on moving at a normal speed.

Help is appreciated,
Thanks.

EDIT: Seems like "Track.h" needs to go after "TrackAPI.h". Still, there's likely something wrong w/ the code.
Attached Files
File Type: zip Robotics.zip (12.3 KB, 52 views)

Last edited by Pancake : 25-01-2009 at 21:20.
Reply With Quote
  #2   Spotlight this post!  
Unread 26-01-2009, 08:00
Mike Mahar Mike Mahar is offline
Registered User
FRC #0138
 
Join Date: Jan 2007
Location: Amherst, NH
Posts: 64
Mike Mahar will become famous soon enough
Re: Yet another Camera thread...

The most likely case of this problem is that the sign of the horizontal direction is backward. When the two color demo sees the target it tries to step slowly until it is in the target is in the center. If the step value is backward it actually moves away from the target. Once the target is out of the image, the normal panning, which is faster, will kick in.
Reply With Quote
  #3   Spotlight this post!  
Unread 26-01-2009, 11:42
Pancake Pancake is offline
Registered User
FRC #0991 (The Dukes)
Team Role: Photography
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Phoenix
Posts: 11
Pancake is an unknown quantity at this point
Re: Yet another Camera thread...

Do you mean changing:
Code:
incrementV = verticalDestination - verticalPosition;
to
Code:
incrementV = verticalPosition - verticalDestination;
Now I wish I read the comments
Code:
// TODO: Check to see if this needs to be reversed
// you may need to reverse this based on your vertical servo installation
__________________
Team Webmaster
Reply With Quote
Reply


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
Yet another bumper thread Vikesrock Technical Discussion 26 19-01-2009 17:04
yet another programming error hawk_11 Programming 2 13-02-2005 15:57
Yet another website to critique Joshua May Website Design/Showcase 11 18-10-2004 09:18
And yet, ANOTHER questions cammie825 Programming 8 13-02-2003 14:48
Yet another scoring system... archiver 2001 0 23-06-2002 23:26


All times are GMT -5. The time now is 18:27.

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