How to Use encoder's offset function

I want to achieve the goal that when I give a position float data to encoder after encoder is reboot, encoder can take that as right position rather than 0.

After I look through Odrive’s reference,
I set encoder’s offset_value which is readable and writable
Then I set the state as full_sequence_calibration.
After that I set state as encoder_offset_calibration.
There is no change in encoder’s pos_estimate, which is out of my expectation.
Are there expertises who could help me?

Use encoder.set_linear_position(float)

1 Like

Thank you for your suggestion that solve my question perfectively.
Maybe you said the function encoder.set_linear_counts(int). :slightly_smiling_face:
And can you tell me sth about encoder.offset_value and AXIS_STATE_ENCONDER_OFFSETCALIBRATION, please?

Ah, set_linear_counts() is the older firmware version.

The encoder offset value is measuring the angle between the encoder’s “zero” position and the motor’s “zero” phase angle.