|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#16
|
|||||
|
|||||
|
Re: CMUcam2 Frequently-Asked-Questions
Quote:
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
|
|||
|
|||
|
Re: CMUcam2 Frequently-Asked-Questions
Quote:
|
|
#18
|
|||
|
|||
|
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:
|
|
#19
|
||||
|
||||
|
Re: CMUcam2 Frequently-Asked-Questions
Quote:
okay thanks but i need to know how to re-upload those config files to the camera... thanks |
|
#20
|
|||||
|
|||||
|
Re: CMUcam2 Frequently-Asked-Questions
Quote:
Quote:
|
|
#21
|
||||
|
||||
|
Re: CMUcam2 Frequently-Asked-Questions
Quote:
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! |
|
#22
|
||||
|
||||
|
Re: CMUcam2 Frequently-Asked-Questions
Quote:
|
|
#23
|
|||
|
|||
|
Re: CMUcam2 Frequently-Asked-Questions
Quote:
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. |
|
#24
|
||||
|
||||
|
Re: CMUcam2 Frequently-Asked-Questions
Quote:
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 |
|
#25
|
||||
|
||||
|
Re: CMUcam2 Frequently-Asked-Questions
Quote:
-Kevin |
|
#26
|
|||
|
|||
|
Re: CMUcam2 Frequently-Asked-Questions
Quote:
|
|
#27
|
|||||
|
|||||
|
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
|
|
#28
|
||||
|
||||
|
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
|
||||
|
||||
|
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
|
|||||
|
|||||
|
Re: *** CMUcam2 Frequently-Asked-Questions ***
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.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |