Hi there,
I have 2 x motors setup on my odrive in current control mode with 4096 cpr encoders with no index. All is good following the motor and encoder calibrations however when I try to run directly on power-up without calibrating I was seeing strange issues where the motors, when given the same current command, sometimes they would both turn the same direction, sometimes the would be turning different directions and sometimes the acceleration of one vs the other was much slower. I have found that if I call AXIS_STATE_ENCODER_OFFSET_CALIBRATION on power up and re-calibrate both motors then I do get consistent behaviour. However, a calibration every startup is not possible for my application (vehicle) as there would be load.
These are some of my observations which I think point to the problem but I need some of your expertise to help solve the problem:
-
Following encoder calibration (and at any other time) I cannot ever set encoder.pre_calibrated = True. It is always False.
-
On power-up encoder.is_ready is always False. In my application I set this to True on startup and can command current to the motors but this is where I see the inconsistent effects.
Can anyone offer any insight into this problem as I have not found anything on this forum?
My encoder settings are:
error = 0x0000 (int)
is_ready = True (bool)
index_found = False (bool)
shadow_count = 442919 (int)
count_in_cpr = 551 (int)
interpolation = 0.5 (float)
phase = 1.9721193313598633 (float)
pos_estimate = 442919.125 (float)
pos_cpr = 551.68994140625 (float)
hall_state = 4 (int)
vel_estimate = 0.0 (float)
calib_scan_response = 4079.0 (float)
config:
mode = 0 (int)
use_index = False (bool)
find_idx_on_lockin_only = False (bool)
pre_calibrated = False (bool)
zero_count_on_find_idx = True (bool)
cpr = 4096 (int)
offset = 1926 (int)
offset_float = 0.7973593473434448 (float)
enable_phase_interpolation = True (bool)
bandwidth = 3000.0 (float)
calib_range = 0.019999999552965164 (float)
calib_scan_distance = 50.26548385620117 (float)
calib_scan_omega = 12.566370964050293 (float)
idx_search_unidirectional = False (bool)
ignore_illegal_hall_state = False (bool)
set_linear_count(count: int)
Thanks so much.
Alex