Skip to main content

Encoder Offsets and AScope Tuning

AdvantageScope Tuning

This example is to be done on the branch phoenix-6-AK. Offsets have been moved from a part of the IO class to a part of the subsystem. 

To tune the offsets (or any LoggedTunableNumber) ensure that TUNING_MODE in CONSTANTS.java is set to true.

Then open advantage scope and connect to the robot.

enable tuning mode

image.png

Your live source needs to be Network Tables 4, NOT Network Tables 4 (Advantagekit)

You can now edit values in the SmartDashboard section specifically the TunableNumbers category that will be updated in the software. 

Getting Encoder Offsets

This will differ slightly to the old way. Here we need to face all the wheels forward. with the driving gear to the LEFT

image.png

This will be the same for all 4 pods.

The offset is recorded in DEGREES

in Tuning mode zero offsets of pods you would like to set an encoder offset for.

image.png

Then for convenience the absolute position is given under RealOutputs/Drivetrain/IO/degreesNoOffset_enc

image.png

These can then be filled into the offsets above and tested. If they are satisfactory make the change permanent in HardwareMap.Java