Quote:
|
Originally Posted by JamesBrown
How does your auto aim work? Did you have the camera drive the pan and tilt motors on your turret until it was aimed right? Did you use encoders to line up the gun with the target? Did you mount the camera with tilt and pan servos to the turret? Or did you do something different?
Our camera searches with the pan and tilt servos. It is mounted to the gun once it as been tracking for a few loops (10 I believe). It pans and tilts the gun until the camera faces the same direction as the gun. This works very well for us, it allows us to shoot while moving in our low gear or to shoot while we get pushed.
So how (if at all) did you do it?
|
first I have little experience in code but have plenty of mechanical brainpower. this year we have a code that will auto adjust for aiming. first we made a code that would read where the camera is currently pointing, which I believe is a positive or negative integer. based on this we were able to know where the target is because theoretically it is always aimed at the target. we also made a zero point on the camera that is where the camera is looking dead ahead of our robot and since or shooter doesn't tilt or turn we have to turn the robot to aim. we made so that when we think we are in a reasonable distance we flip a switch and the code basically turns the robot till the camera/code will read that the camera is at our zero/dead ahead setting which should put us aimed right at the target then we push another button and BOOM score, we hope!
