Quote:
Originally Posted by Ether
So if you start with the robot parallel to the sides then the gyro will give you the angle relative to the sides, which is what you said above you are looking for.
|
Not all robots will start parallel to the sides of the field. It's often advantageous to NOT start parallel to the side, in which case, a "best guess" at the value probably won't help.
You COULD do it with rangefinders, two to a side (one at each corner on each side of the robot)--"snap" a measurement and take the difference, which will give you two sides of the triangle, repeat to make sure you aren't bouncing off another robot--but that's probably more trouble than it's worth.
However, I think there's another way to do it, provided that you have a camera onboard that can track a vision target. If you can see the target, you can use the size to find how far away you are and the distortion from square (or circular) to find out your angle. If you think about it, this will also enable you to determine such items as whether you are in range to fire, your exact location on the field, and other things about position that you may desire to know. The problem? It might take a bit to figure out how to work it.
__________________
Past teams:
2003-2007: FRC0330 BeachBots
2008: FRC1135 Shmoebotics
2012: FRC4046 Schroedinger's Dragons
"Rockets are tricky..."--Elon Musk
