Log in

View Full Version : Our Camera runs away from the light?!?!?


team1500
20-01-2006, 23:34
Hopefully you guys can help us with a problem we are having the servo's on the CMU Cam seem to be reversed because they alway go away from the light instead of tracking towards it I read in one of the other posts that some of the teams had this problem last year however I could not find a way to fix it.
Any help would be appreciated
Thanks
Brad

bombadier337
20-01-2006, 23:37
You could try flipping the camera upside down in the pan/tilt box. If it was mounted incorrectly the first time it would cause something like that.

Greg Marra
20-01-2006, 23:40
There are also two #define's in the tracking.h file of the camera tracking code by Kevin Watson that specify the sign (+ or -) to be used when tracking. If you locate these two and flip them, you will be able to make that correction in software instead of in hardware.

iBheat
21-01-2006, 00:03
If you have the servos connected to the CMUCam board then you just have to jump the pan/tilt reverse jumper but if you are using the RC then you need to edit the code in tracking.h.


// If your camera suddenly moves away from the target once
// it finds it, you'll need to change the sign on one or
// both of these values.
#define PAN_ROTATION_SIGN_DEFAULT -1
#define TILT_ROTATION_SIGN_DEFAULT +1

team1500
21-01-2006, 00:09
Alrighty Thanks guys
We'll have to give those a try tomorrow.
Brad

stephenthe1
21-01-2006, 15:44
"If you have the servos connected to the CMUCam board then you just have to jump the pan/tilt reverse jumper"

I'm having this problem, how do you go about switching this jumper, and where is this jumper located? (Or how do I switch the pwm cable electronically?)

Joe Hershberger
21-01-2006, 18:14
"If you have the servos connected to the CMUCam board then you just have to jump the pan/tilt reverse jumper"

I'm having this problem, how do you go about switching this jumper, and where is this jumper located? (Or how do I switch the pwm cable electronically?)
Have you looked at the documentation for the camera?

Have a look on pave 17 of the CMUCam2 Workbook (http://www.kevin.org/frc/CMUcam2_workbook.pdf).

-Joe

stephenthe1
23-01-2006, 11:48
Have you looked at the documentation for the camera?

Have a look on pave 17 of the CMUCam2 Workbook (http://www.kevin.org/frc/CMUcam2_workbook.pdf).

-Joe


perfect, thanks

tribotec_ca88
23-01-2006, 14:03
I strongly recommend changing the following values first...(Found on Tracking.h) from:
#define PAN_ROTATION_SIGN_DEFAULT -1
#define TILT_ROTATION_SIGN_DEFAULT +1
to
#define PAN_ROTATION_SIGN_DEFAULT +1
#define TILT_ROTATION_SIGN_DEFAULT -1

Our team was having similar issues and in the end we found out all we had to do was invert the +/- signal...lol...:mad:

cmurdoch
23-01-2006, 17:42
we're having the same problem, but we've tried switching the values in tracking.h and it didn't work. Is there some reason it might not be recognizing the new values? :confused:

Greg Ross
23-01-2006, 19:15
we're having the same problem, but we've tried switching the values in tracking.h and it didn't work. Is there some reason it might not be recognizing the new values? :confused:
Are you using the Bells and Whistles camera code or the stripped down version? If you're using the Bells and Whistles version, I believe the values in tracking.h will normally only come into play the very first time you run the code. The first time you run the program, all the parameters get saved into EEPROM. To get it to use the the values from tracking.h, you will need to go into the tracking menu, and tell it to reload the default values.

If you're using the stripped down version, then I have no explanation why it's not working. :o

Bharat Nain
23-01-2006, 21:01
we're having the same problem, but we've tried switching the values in tracking.h and it didn't work. Is there some reason it might not be recognizing the new values? :confused:

Did something stupid today. The PWMs were switched. I debug it one axis at a time and realized that. I switched the Pwms for pan and tilt and they worked like a wonder. Little things can drive you crazy.

Ryan O
27-01-2006, 13:06
Hopefully you guys can help us with a problem we are having the servo's on the CMU Cam seem to be reversed because they alway go away from the light instead of tracking towards it I read in one of the other posts that some of the teams had this problem last year however I could not find a way to fix it.
Any help would be appreciated
Thanks
Brad


If you are using labview when this happens, it is only becxause labview is crewy. I just turned the servo horn around for labview and put it back for Kevin's code and it worked fine.

Burning Ice
28-01-2006, 10:39
Your Camera is upside down....I had the same problem....and i tore it apart and reassembled the camera multiple times......and found that having the camera upside down does that......

Any other questions, feel free to ask and ill help the best i can..

feel free to email me at
Johnbk14@gmail.com

itzrobz
29-01-2006, 11:52
i have the same problem. I am using labview. can anyone tell me how to reverse the pan?

Mark McLeod
29-01-2006, 14:15
i have the same problem. I am using labview. can anyone tell me how to reverse the pan?
See this post:
http://www.chiefdelphi.com/forums/showpost.php?p=434269&postcount=21

bhsrobotics1671
06-02-2006, 19:58
I strongly recommend changing the following values first...(Found on Tracking.h) from:
#define PAN_ROTATION_SIGN_DEFAULT -1
#define TILT_ROTATION_SIGN_DEFAULT +1
to
#define PAN_ROTATION_SIGN_DEFAULT +1
#define TILT_ROTATION_SIGN_DEFAULT -1

Our team was having similar issues and in the end we found out all we had to do was invert the +/- signal...lol...:mad:

how do you re-upload this file to the camera?