Tracking

I noticed that whenever the camera was tracking it was tilting downwards and then stopped tracking the green. Is this because I don’t have a setting right for the noise filter or a value wrong for the RGB values. Any help would be great.

If you are using Kevin’s code, the way the camera is mounted matters. If you mount it with the on-off switch near the top, you have to go and change a few signs in your code or else it will always try to move away from the light instead of centering on it.

Here’s what JSonntag is refering to in the code.
From 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. Start with the tilt first.
#define PAN_ROTATION_SIGN_DEFAULT -1
#define TILT_ROTATION_SIGN_DEFAULT 1

See question nine: http://kevin.org/frc/camera/. It’s best to rotate the camera 180 degrees. I’ve been trying to get 'em to fix that illustration for a year sigh.

-Kevin

Thanks Kevin, your solution worked, I’m eternally grateful to your greatness.