TrackingWheelForwardOffsetTuner

This routine determines the effective forward offset for the lateral tracking wheel. The procedure executes a point turn at a given angle for a certain number of trials, along with a specified delay in milliseconds. The purpose of this is to track the change in the y position during the turn. The offset, or distance, of the lateral tracking wheel from the center or rotation allows the wheel to spin during a point turn, leading to an incorrect measurement for the y position. This creates an arc around around the center of rotation with an arc length of change in y and a radius equal to the forward offset. We can compute this offset by calculating (change in y position) / (change in heading) which returns the radius if the angle (change in heading) is in radians. This is based on the arc length formula of length = theta * radius.

To run this routine, simply adjust the desired angle and specify the number of trials and the desired delay. Then, run the procedure. Once it finishes, it will print the average of all the calculated forward offsets derived from the calculation. This calculated forward offset is then added onto the current forward offset to produce an overall estimate for the forward offset. You can run this procedure as many times as necessary until a satisfactory result is produced.

Since

4.0.0

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
The angle to turn for the forward offset tuning procedure.
Link copied to clipboard
open var DELAY_MILLIS: Int
The delay in milliseconds between each trial.
Link copied to clipboard
open var NUM_TRIALS: Int
The number of trials to run for the forward offset tuning procedure.

Functions

Link copied to clipboard
open fun accept(opMode: LinearOpMode, telemetry: DualTelemetry, drive: RoadRunnerDrive)
Performs this operation on the given arguments.

Inherited functions

Link copied to clipboard
open fun andThen(after: TriConsumer<in T1, in T2, in T3>): TriConsumer<T1, T2, T3>
Returns a composed TriConsumer that performs, in sequence, this operation followed by the after operation.