Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   *** CMUcam2 Frequently-Asked-Questions *** (http://www.chiefdelphi.com/forums/showthread.php?t=42742)

Kevin Watson 27-01-2006 01:25

*** CMUcam2 Frequently-Asked-Questions ***
 
I've started a CMUcam2 frequently-asked-questions document here: http://kevin.org/frc/camera. If you have questions that you think should be added to the document, please post them here.

-Kevin

bear24rw 28-01-2006 23:45

Re: CMUcam2 Frequently-Asked-Questions
 
Q3: Where do we plug in the pan and tilt servos?
A3: By default the pan servo is attached to the robot controller's PWM 1 output and the tilt servo is plugged into the the robot controller's PWM 2 output. These assignments can be changed in camera.h.


Don't you mean "tracking.h" ?

Kevin Watson 29-01-2006 00:09

Re: CMUcam2 Frequently-Asked-Questions
 
Quote:

Originally Posted by bear24rw
Q3: Where do we plug in the pan and tilt servos?
A3: By default the pan servo is attached to the robot controller's PWM 1 output and the tilt servo is plugged into the the robot controller's PWM 2 output. These assignments can be changed in camera.h.


Don't you mean "tracking.h" ?

DOH! Thanks for pointing that out <sheepish-grin>.

-Kevin

mallot1243 30-01-2006 12:01

Re: CMUcam2 Frequently-Asked-Questions
 
what is the difference in using the PWM outputs and the Servo0, 1 on the camera?

Kevin Watson 30-01-2006 12:14

Re: CMUcam2 Frequently-Asked-Questions
 
Quote:

Originally Posted by mallot1243
what is the difference in using the PWM outputs and the Servo0, 1 on the camera?

The code currently uses the robot controller's PWM outputs to control the pan and tilt servos. I'm working on a version of tracking.c that will allow you to use robot controller or CMUcam2 PWM outputs. I'll post it if I can get it to work correctly.

-Kevin

Kevin Watson 30-01-2006 22:08

Re: CMUcam2 Frequently-Asked-Questions
 
The CMUcam2 Frequently-Asked-Questions document has been substantially updated in the last day or so. Included is a troubleshooting checklist. It can be found here: http://kevin.org/frc/camera.

-Kevin

Ryan O 31-01-2006 19:35

Re: CMUcam2 Frequently-Asked-Questions
 
In the thread titled "Code Errors with Bells and Whistles" I detailed a problem I encountered when I rewrote part of your code so the camera scans in both directions. Since you wrote the origanal, i was wondering if I possibly just left out a neccassary intailization line or something. Can you give any suggestions?

Kevin Watson 01-02-2006 00:47

Re: CMUcam2 Frequently-Asked-Questions
 
Quote:

Originally Posted by Ryan O
In the thread titled "Code Errors with Bells and Whistles" I detailed a problem I encountered when I rewrote part of your code so the camera scans in both directions. Since you wrote the origanal, i was wondering if I possibly just left out a neccassary intailization line or something. Can you give any suggestions?

Send me the code and I'll have a look.

-Kevin

Ryan O 01-02-2006 08:29

Re: CMUcam2 Frequently-Asked-Questions
 
Quote:

Originally Posted by Kevin Watson
Send me the code and I'll have a look.

-Kevin


Ok, I e-mail it to you if it doesn't work. I made a couple changes. One things was to move the intailization to the very top of the code. Before, I was calling Tracking_Config_Data info before intailization, so that might have been the problem. If it was I'll post here to let you know that it was fixed. Otherwise I should have it sent by five tonight. Thanks for the help.

mallot1243 08-02-2006 11:57

Re: CMUcam2 Frequently-Asked-Questions
 
Can you use a different motor to control pan function? if so what would the code have to look like?

bhsrobotics1671 08-02-2006 18:40

Re: CMUcam2 Frequently-Asked-Questions
 
Quote:

Originally Posted by Kevin Watson
I've started a CMUcam2 frequently-asked-questions document here: http://kevin.org/frc/camera. If you have questions that you think should be added to the document, please post them here.

-Kevin


how do you re-upload the tracking.h file to the camera again after modifying it?

thankss
-bunch of freshman noobs from clovis, CA
team 1671

X-Istence 08-02-2006 18:46

Re: CMUcam2 Frequently-Asked-Questions
 
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?

Different :P. First, the motor does not have PWM versus Angle, thus you'd have to find some method of finding how to fix it so that it did, then you'd have to figure out how you want to keep track of what angle it is at. Basically it is complicated.

nehalita 08-02-2006 18:55

Re: CMUcam2 Frequently-Asked-Questions
 
1) I was trying to drive the robot and operate the camera at the same time so I enabled "Default_Routine" in the Process_Data_From_Master_uP function but I think it conflicted with the camera code (i'm not sure if that's right) because the camera wouldn't work at all. So I just put whatever I needed before "putdata" [the pwms, relays, etc.]
i don't know if my assumptions were right or if i messed up but i think you should address this in some form of a question (that I obviously can't come up with right now).

2) This is a stupid mistake, but someone else might have done it before. If you "accidentally" switch the servos hooked up to the RC, you get that "searching searching searching" thing also and it took me an hour to figure that one out (it's always gotta be the simple things that take forever to figure out).

3) I think you should put something at the top or inside the code about being careful when you load the code for the first time. I had the pwms hooked up to the camera and my motors hooked up to pwm01 and pwm02. So, as the camera tracked the green light, the robot went crazy and i nearly killed myself. After reading the FAQs, I figured out why but maybe if there's a warning somewhere inside the code, it won't happen to another team.

4) When i started using the camera for the first few times, i had the serial cable hooked up to the camera along with the pwm to the ttl port. It's obvious to me now that I can't have both hooked up to the camera at the same time but it wasn't then. You could put that in your FAQs

....those are all the mistakes i can remember but i'm sure i have plenty more to come. =)

btw, after my series of errors, my camera worked wonderfully. you're the man kevin. my whole team's amazed how "i got" the camera to dance around but really, it was all your hard work and i got the credit for it. great job.
oh, and the FAQs helped a lot!

bhsrobotics1671 08-02-2006 19:23

Re: CMUcam2 Frequently-Asked-Questions
 
Quote:

Originally Posted by Kevin Watson
I've started a CMUcam2 frequently-asked-questions document here: http://kevin.org/frc/camera. If you have questions that you think should be added to the document, please post them here.

-Kevin


Kevin We Need Your Help Re-Uploading the tracking.h file

Anyone!?!?!?

mallot1243 09-02-2006 11:00

Re: CMUcam2 Frequently-Asked-Questions
 
I should have explained my self a little more. We're planning on taking the pan servo off and using the code to control a turret, is there a way to develope a potentiometer structure in replacement of the servo function?



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

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi