Is it possible to directly read the built-in encoder values on Krakens?

As the title suggests I am looking for a way to read the actual values of the built-in relative encoders in the Krakens. My thought is that I would be able to make our autonomous more consistent by running the drivetrain motors a certain number of revolutions, however I am finding that there is a lack of information on how to do so with krakens. Any thoughts?

For context, it is our rookie year so we opted for java and used a timed code structure as it what I was most comfortable with using as the software lead.

Take a look at getPosition in the pheonix6 api:

Thank you! I tinkered with it and it works to the accuracy I was looking for.

1 Like