Go to Post We learned that no matter the outcome when you don't give up you will always win. - 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
  #16   Spotlight this post!  
Unread 09-02-2006, 12:32
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: CMUcam2 Frequently-Asked-Questions

Quote:
Originally Posted by mallot1243
...is there a way to develope a potentiometer structure in replacement of the servo function?
Absolutely. What you want is something called PID position control. Search the forums for PID and you'll find plenty of pointers.

Briefly, you control the motor speed based on the difference between the desired and measured position (in order to move it into place), modified by the rate at which the difference is changing (in order to keep it from overshooting), with a term that pushes harder as it's out of place longer (in order to nudge it if it settles a little short of the target).
  #17   Spotlight this post!  
Unread 09-02-2006, 13:27
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: CMUcam2 Frequently-Asked-Questions

Quote:
Originally Posted by bhsrobotics1671
Kevin We Need Your Help Re-Uploading the tracking.h file

Anyone!?!?!?
I haven't tried it yet but it appears to be in target.c in the function Initialize_Tracking(). Look for the call to Get_Tracking_Configuration() and see what the second parameter is used for.
__________________
Keith Watson - Professional Software Engineer
No relation to "Kevin" Watson, who created the camera tracking code.
  #18   Spotlight this post!  
Unread 09-02-2006, 14:55
nheft nheft is offline
Registered User
FTC #0533 (Psichotics)
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 1999
Location: Lindenhurst HS
Posts: 35
nheft is a jewel in the roughnheft is a jewel in the roughnheft is a jewel in the roughnheft is a jewel in the rough
Re: CMUcam2 Frequently-Asked-Questions

We ended up using the pan servo to pan the camera, then use the data to the pan servo to run a motor that steers our turret. In effect, the turret motor keeps the camera steered to the target. When the pan servo is looking straight ahead, the turret motor stops. When the pan servo is off-center, the turret motor turns the whole business in the required direction to get pan servo looking straight ahead. If the tracker is searching rather than tracking, we disable the turret motor until the tracker acquires the target. You can test if the tracker has acquired the target by examining T_Packet_Data.my. Zero signifies searching; nonzero signifies tracking.

Quote:
Originally Posted by mallot1243
Can you use a different motor to control pan function? if so what would the code have to look like?
  #19   Spotlight this post!  
Unread 10-02-2006, 00:37
bhsrobotics1671's Avatar
bhsrobotics1671 bhsrobotics1671 is offline
Andrew Nabors
AKA: Andrew Nabors
FRC #1671 (Buchanan Bird Brains)
Team Role: Coach
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Clovis, CA
Posts: 282
bhsrobotics1671 is a splendid one to beholdbhsrobotics1671 is a splendid one to beholdbhsrobotics1671 is a splendid one to beholdbhsrobotics1671 is a splendid one to beholdbhsrobotics1671 is a splendid one to beholdbhsrobotics1671 is a splendid one to beholdbhsrobotics1671 is a splendid one to behold
Re: CMUcam2 Frequently-Asked-Questions

Quote:
Originally Posted by Keith Watson
I haven't tried it yet but it appears to be in target.c in the function Initialize_Tracking(). Look for the call to Get_Tracking_Configuration() and see what the second parameter is used for.

okay thanks but i need to know how to re-upload those config files to the camera...
thanks
__________________
Buchanan Bird Brains - FRC Team 1671
2015 FIRST World Champions
118, 1678, 1671, 5012
  #20   Spotlight this post!  
Unread 10-02-2006, 00:46
nehalita's Avatar
nehalita nehalita is offline
Robots are friends
AKA: tagger fanatic
FRC #1345 (Platinum Dragons); FRC# 97 (RoboRuminants)
Team Role: Programmer
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Ft. Laud, FL
Posts: 870
nehalita has a reputation beyond reputenehalita has a reputation beyond reputenehalita has a reputation beyond reputenehalita has a reputation beyond reputenehalita has a reputation beyond reputenehalita has a reputation beyond reputenehalita has a reputation beyond reputenehalita has a reputation beyond reputenehalita has a reputation beyond reputenehalita has a reputation beyond reputenehalita has a reputation beyond repute
Send a message via AIM to nehalita Send a message via MSN to nehalita Send a message via Yahoo to nehalita
Re: CMUcam2 Frequently-Asked-Questions

Quote:
Originally Posted by bhsrobotics1671
okay thanks but i need to know how to re-upload those config files to the camera...
thanks
is this what you are talking about?
Quote:
Originally Posted by readme files from the frc camera code
Do this by copying the two files to your project directory and then right clicking on "Source Files" in the
project tree, selecting "Add Files...", if necessary, navigate to the project directory and then double click on the file you need
that was in the readme file under "other files" you should check them out, they give a nice summary of all the files.
__________________
"Relativity applies to physics, not ethics." Thank you Einstein
MIT '10

Proud Member of H.I.L.
The PLATINUM DRAGONS are on FIRE!
  #21   Spotlight this post!  
Unread 10-02-2006, 00:50
bhsrobotics1671's Avatar
bhsrobotics1671 bhsrobotics1671 is offline
Andrew Nabors
AKA: Andrew Nabors
FRC #1671 (Buchanan Bird Brains)
Team Role: Coach
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Clovis, CA
Posts: 282
bhsrobotics1671 is a splendid one to beholdbhsrobotics1671 is a splendid one to beholdbhsrobotics1671 is a splendid one to beholdbhsrobotics1671 is a splendid one to beholdbhsrobotics1671 is a splendid one to beholdbhsrobotics1671 is a splendid one to beholdbhsrobotics1671 is a splendid one to behold
Re: CMUcam2 Frequently-Asked-Questions

Quote:
Originally Posted by nehalita
is this what you are talking about?


that was in the readme file under "other files" you should check them out, they give a nice summary of all the files.

THANKS SO MUCH

we'll check it out
we got the pan to work but just not the tilt, and were not using pan i do not think..so yeah..big help

thanks!
__________________
Buchanan Bird Brains - FRC Team 1671
2015 FIRST World Champions
118, 1678, 1671, 5012
  #22   Spotlight this post!  
Unread 10-02-2006, 00:55
bhsrobotics1671's Avatar
bhsrobotics1671 bhsrobotics1671 is offline
Andrew Nabors
AKA: Andrew Nabors
FRC #1671 (Buchanan Bird Brains)
Team Role: Coach
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Clovis, CA
Posts: 282
bhsrobotics1671 is a splendid one to beholdbhsrobotics1671 is a splendid one to beholdbhsrobotics1671 is a splendid one to beholdbhsrobotics1671 is a splendid one to beholdbhsrobotics1671 is a splendid one to beholdbhsrobotics1671 is a splendid one to beholdbhsrobotics1671 is a splendid one to behold
Re: CMUcam2 Frequently-Asked-Questions

Quote:
Originally Posted by nehalita
is this what you are talking about?


that was in the readme file under "other files" you should check them out, they give a nice summary of all the files.
hey side note: what program are you using to do this?
__________________
Buchanan Bird Brains - FRC Team 1671
2015 FIRST World Champions
118, 1678, 1671, 5012
  #23   Spotlight this post!  
Unread 10-02-2006, 01:01
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: CMUcam2 Frequently-Asked-Questions

Quote:
Originally Posted by bhsrobotics1671
okay thanks but i need to know how to re-upload those config files to the camera...
thanks
Previously you mentioned tracking.h. We encountered the same problem where changing values in tracking.h were not taking effect. From reading the code this appears to be the place which controls it.
Code:
*	FUNCTION:		Get_Tracking_Configuration()
*
*	PURPOSE:		Initializes the Tracking_Config_Data structure with data
*					stored in EEPROM. If valid data isn't present in EEPROM 
*					or the force_default flag is set, default values from 
*					tracking.h will be used.		
*
*	CALLED FROM:	Initialize_Tracking(), above
*
*	PARAMETERS:		Calling this function with a value greater than zero will
*					force it to load the configuration structure with the
*					default values found in tracking.h.
Were you asking about something else?
__________________
Keith Watson - Professional Software Engineer
No relation to "Kevin" Watson, who created the camera tracking code.
  #24   Spotlight this post!  
Unread 10-02-2006, 01:10
bhsrobotics1671's Avatar
bhsrobotics1671 bhsrobotics1671 is offline
Andrew Nabors
AKA: Andrew Nabors
FRC #1671 (Buchanan Bird Brains)
Team Role: Coach
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Clovis, CA
Posts: 282
bhsrobotics1671 is a splendid one to beholdbhsrobotics1671 is a splendid one to beholdbhsrobotics1671 is a splendid one to beholdbhsrobotics1671 is a splendid one to beholdbhsrobotics1671 is a splendid one to beholdbhsrobotics1671 is a splendid one to beholdbhsrobotics1671 is a splendid one to behold
Re: CMUcam2 Frequently-Asked-Questions

Quote:
Originally Posted by Keith Watson
Previously you mentioned tracking.h. We encountered the same problem where changing values in tracking.h were not taking effect. From reading the code this appears to be the place which controls it.
Code:
*	FUNCTION:		Get_Tracking_Configuration()
*
*	PURPOSE:		Initializes the Tracking_Config_Data structure with data
*					stored in EEPROM. If valid data isn't present in EEPROM 
*					or the force_default flag is set, default values from 
*					tracking.h will be used.		
*
*	CALLED FROM:	Initialize_Tracking(), above
*
*	PARAMETERS:		Calling this function with a value greater than zero will
*					force it to load the configuration structure with the
*					default values found in tracking.h.
Were you asking about something else?

ok so my programmer guy know about these files, and knows how to change the data and what to change it too, we just need to know how to re-upload these config files i guess you could call them (i.e. tracking.h traching.c) to the camera's programming, and what program you use to do this

--thanks for all your help guys
__________________
Buchanan Bird Brains - FRC Team 1671
2015 FIRST World Champions
118, 1678, 1671, 5012
  #25   Spotlight this post!  
Unread 10-02-2006, 01:20
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: CMUcam2 Frequently-Asked-Questions

Quote:
Originally Posted by Keith Watson
Previously you mentioned tracking.h. We encountered the same problem where changing values in tracking.h were not taking effect...
You can also just select "Load default values" from either menu to get the values from the header file. Don't forget to save to EEPROM.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #26   Spotlight this post!  
Unread 10-02-2006, 02:03
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: CMUcam2 Frequently-Asked-Questions

Quote:
Originally Posted by bhsrobotics1671
ok so my programmer guy know about these files, and knows how to change the data and what to change it too, we just need to know how to re-upload these config files i guess you could call them (i.e. tracking.h traching.c) to the camera's programming, and what program you use to do this

--thanks for all your help guys
If your programmer is including tracking.c in your software build then nothing special needs to be done after changing the parameter I mentioned. It is contained in code that is already being run. Just do a normal rebuild and a normal download to the robot controller. This will pick up the change.
__________________
Keith Watson - Professional Software Engineer
No relation to "Kevin" Watson, who created the camera tracking code.
  #27   Spotlight this post!  
Unread 10-02-2006, 16:28
nehalita's Avatar
nehalita nehalita is offline
Robots are friends
AKA: tagger fanatic
FRC #1345 (Platinum Dragons); FRC# 97 (RoboRuminants)
Team Role: Programmer
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Ft. Laud, FL
Posts: 870
nehalita has a reputation beyond reputenehalita has a reputation beyond reputenehalita has a reputation beyond reputenehalita has a reputation beyond reputenehalita has a reputation beyond reputenehalita has a reputation beyond reputenehalita has a reputation beyond reputenehalita has a reputation beyond reputenehalita has a reputation beyond reputenehalita has a reputation beyond reputenehalita has a reputation beyond repute
Send a message via AIM to nehalita Send a message via MSN to nehalita Send a message via Yahoo to nehalita
Re: CMUcam2 Frequently-Asked-Questions

bhsrobotics1671: We are using MPLAB IDE v7.20; it came in a cd in the kit of parts. If you go to kevin watson's website, http://kevin.org/frc, you can dl the code and everything you could possibly need is in there. then go read the FAQs and you'll avoid many mistakes you might end up making
__________________
"Relativity applies to physics, not ethics." Thank you Einstein
MIT '10

Proud Member of H.I.L.
The PLATINUM DRAGONS are on FIRE!
  #28   Spotlight this post!  
Unread 20-01-2007, 14:01
arizonafoxx's Avatar
arizonafoxx arizonafoxx is offline
Registered User
FRC #4395 (T-Rex)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Fort Mill, SC
Posts: 96
arizonafoxx is an unknown quantity at this point
Re: *** CMUcam2 Frequently-Asked-Questions ***

When we tested the camera code it works perfectly. The camera will track the green light. We have our programming cable hooked up so that we get our Pan and Tilt angles displayed on the computer screen. Our question is what variable can we use from the code to take the Pan angle displayed on the computer and use it to change the position of the robot. We want to use a comparison statement like:

Psuedo Code
if(Pan_Angle > 10)
{
Turn robot left
}

if(Pan_Angle < -10)
{
Turn Robot right
}

if(Pan_Angle > -10 && Pan_Angle < 10)
{
Robot does not turn
}

We also want to do a similar thing with the tilt to calculate the distance. This is my first year with FRC but I am very familar with C programming and MPLab. I have looked through Kevin's code but I can't figure out what variable will acvhive our desired output. If anyone knows what i'm talking about please help me out.
  #29   Spotlight this post!  
Unread 20-01-2007, 17:21
The Vrooman's Avatar
The Vrooman The Vrooman is offline
Registered User
FRC #1137
 
Join Date: Jan 2007
Location: Mathews, Virginia
Posts: 7
The Vrooman is an unknown quantity at this point
Re: *** CMUcam2 Frequently-Asked-Questions ***

We have our camera working fine in teleoperated mode, but for some reason, we can't get it to work in autonomous mode. The red light comes on when the target is in front of the camera lens, but the camera will not actively search for a target, and it won't follow the target once we set it in position.

Is there something that needs to be added to user_routines_fast that activates the camera in autonomous?
  #30   Spotlight this post!  
Unread 20-01-2007, 17:49
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: *** CMUcam2 Frequently-Asked-Questions ***

Quote:
Originally Posted by The Vrooman View Post
Is there something that needs to be added to user_routines_fast that activates the camera in autonomous?
Indeed there is. You need to call the same CameraHandler() and ServoTrack() functions that Process_Data_From_Master_uP() does. Make sure you put them in the part of the autonomous loop that only executes once for each data packet from the OI.
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
Questions you've been asked about robotics JamizzleHavok13 Chit-Chat 32 09-08-2009 16:16
#1 The Journey of a FIRST Graduate: Questions Ken Leung General Forum 12 27-07-2005 18:24
Please post questions Chairman's judges asked!! Roxanna V Chairman's Award 0 05-04-2005 10:33
Q/A questions so far.. AmyPrib Rules/Strategy 49 28-01-2005 08:39
**FIRST EMAIL**/Autodesk Inventor Training and Technical Questions Information Rich Wong FIRST E-Mail Blast Archive 0 07-12-2004 17:22


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

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