Quote:
Originally Posted by GeeTwo
As with so many things, it's important to understand how much noise and drift you can accept. If you're only using the gyro for autonomous (15 seconds long) or to do short-term maneuvers (like backing up in a straight line without your probe knocking down a stack), you can allow significantly more drift than if you're expecting your "arena coordinates" mecanum drive to be stable through a full 2-1/2 minute match. If you're looking for full-match alignment and can't get it from your gyro or encoders, consider if your strategy puts you up against a wall or other well-defined feature of the field on a regular basis, and see if you can use that as an opportunity for a heading correction.
|
We never got it fully implemented in a competition robot, but we made code last year that would use the output from two ultrasonic sensors to detect the angle the robot was at compared to a flat wall. When we would click a button on the dashboard corresponding to which wall the robot was facing, it would automatically reset the gyro to the measured angle away from the angle of the wall (+/- 90 for side walls, 180 for back wall). This meant we wouldn't have to slam against a wall to reset the gyro, we just had to drive up to it at a not-too-shallow angle.