No angle?

ok we have our program working but there is one small problem their is no angle to target and so it turns until it cant see the target then lines up with the gyro
does anyone know what would cause this i have traced the Zero all the way back to Get IMAQ image and there is a zero all the way down
please help!

The sample code is always turning according to the gyro angle. If it identifies a target, that defines the angle to target, and the gyro setpoint is that angle. If it does not have a target identified, it assumes zero is your end of the field, and that is a reasonable guess as to where the target is.

If you manually place the target in front of the robot and look at the dashboard, is there a green mark around the target? The green box nearby is also giving the score of the target. Using this, you can test out where the camera code works and where it doesn’t. You can decide if you want to tune it to accept smaller targets or ignore them because it is too far to kick anyway, etc.

Greg McKaskle

When it has a target identified the angle is zero no matter what the score of the target is so it turns until there is no target then lines up with the gyro
yes there is a target shown with a green circle as well as the score and distance

Probe the vision output, the Target Info I guess it is called, and see if the X value is reasonably accurate. Second thing to do is to look at the values going into Rotate to Target to see how it computes the setpoint.

Greg McKaskle