Hi, dear community.
I got an Odrive v3.6, Odrive motor D5065-270kv, and encoder cui-amt102.
I’m following the documentation about how to calibrate the encoder using the odrive tool but I have errors
This is my configuration:
In [18]: odrv0.axis0.encoder.config.use_index=True
In [19]: odrv0.axis0.encoder.config.pre_calibrated=True
In [20]: odrv0.axis0.motor.config.pole_pairs=7
In [21]: odrv0.axis0.motor.config.motor_type=MOTOR_TYPE_HIGH_CURRENT
In [22]: odrv0.config.brake_resistance=0.47
In [23]: odrv0.axis0.encoder.config.cpr=8192
In [24]: odrv0.axis0.encoder.config.use_index =True
In [25]: odrv0.axis0.encoder.config.pre_calibrated=True
In [26]: odrv0.save_configuration()
In [27]: odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE
In [28]: odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE
In [29]: odrv0.axis0.controller.pos_setpoint = 9000
In [30]: odrv0.reboot()
Reconnected to ODrive 2057397C4D4D as odrv0
In [31]: odrv0.axis0.controller.pos_setpoint = 10000
In [32]: odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE
In [33]: odrv0.axis0.controller.pos_setpoint = 10000
In [34]: odrv0.axis0.controller.pos_setpoint = 100
These are the errors:
In [35]: hex(odrv0.axis0.motor.error)
Out[35]: ‘0x0’
In [36]: hex(odrv0.axis0.error)
Out[36]: ‘0x100’
In [37]: hex(odrv0.axis0.encoder.error)
Out[37]: ‘0x20’
When I run dump_errors(odrv0) I got this:
In [47]: dump_errors(odrv0)
axis0
axis: Error(s):
ERROR_ENCODER_FAILED
motor: no error
encoder: Error(s):
ERROR_INDEX_NOT_FOUND_YET
controller: no error
axis1
axis: no error
motor: no error
encoder: no error
controller: no error
It seems there is a lack of information about setting up & calibration for encoders.
I followed this documentation: Encoders