gyro precision

two questions related to gyro-assisted autonomous

-how precise is a gyro in keeping a bot oriented over 10-12 feet - how many degrees of error should one expect

-what is speed of robot to allow a typical drivetrain and gyro to work together effectively (such as in this year’s gear-hanging auto challenge)

I’ve seen some robots move remarkably fast to hang a gear (center or left or right) in auto and some move much more slowly. I assume the most accurate are using gyros (and encoders for distance)

Over 10-12 feet in a straight line or with a single turn, any functional gyroscope would be good enough for FRC purposes. To get more specific, or for longer distances and maneuvers, you’d have to refer to the spec sheet.

I suspect the most accurate auto hangers use a camera, at least for the last part of the operation.

More precise than you need, and accurate enough for the job :smiley:

We use the NavX on our team. We appreciated the free ADC gyro in FIRST Choice last year, but since we could only get one, and there was no way to buy or order spares, we didn’t use it (we like to have at least 3 of everything - one for the real robot, one for the practice robot, and one for our trainer board).

We have found that the gyro can distinguish the tiniest of movements (precision). The documentation says that any heading drift (accuracy) is small enough that, for the purposes of a 15-second autonomous period, you can assume it’s virtually zero. Even for the purposes of a full 2.5 minute match, it would drift by at most a few degrees.

The limiting factor will actually be your drivetrain. The gyro will happily tell you the difference between driving at a heading of 0 degrees, versus a heading of 1 degree. Can you realistically fine tune the robot to drive 20 feet forward and distinguish between those two headings? Can you realistically command the robot to face a direction of 45 degrees left, versus 44 or 47 degrees? Your drivetrain setup, the type of wheels, the scrub friction, the robot weight, the friction in your gearboxes, will all impact how difficult it is. Generally the more precise you need to be, the longer it will take to execute a fine movement. The faster you do your movement the more likely it is you’ll overshoot because you’ll be fighting inertia, so your code has to take that into account. That’s why a lot of auto commands go slowly.

Achieving a repeatable, consistent movement also depends largely on your starting position. Any variation in the direction the robot is pointing at the start will be amplified as the movements continue. The gyro can keep you pointed in a nice straight line, but even tiniest misalignment at the start can lead to differences of many inches as your robot crosses the field. That is why, as GeeTwo says, the best approach is to use camera or some other sensor to give you a way to lock onto your target destination even if there was some variation in your starting point.

For example, one of our auto modes for the center gear works like this:

Drive forward about 3 feet, fast, using the gyro to maintain the heading (to compensate for drift). We allow a lot of error for this command because we just want to get there fast, we don’t care if it overshot a little.
Ask the vision system where the target is.
Drive toward the target, making steering corrections as needed to keep the target centered in the camera view.
Use distance sensors to detect when we’ve reached the airship wall.
Once we’re there, deploy the gear.

The theory here is that even if we’ve misaligned a little bit at the beginning, locking onto the target and using it to correct our heading will fix that.