Running calibration doesn't save values but also no errors

#1

Hello!

I am using a ODrive Hardware v3.5-48, firmware v0.4.8 with 2 identical custom gimbal motors with AMT102 encoders. I’ve been calibrating the motors with some success – one of the motors is properly calibrated, while the other just has zero values for all constants. After the half unsuccessful calibration, there is surprisingly no errors using dump_errors(). Additionally, running current control on both motors appears to have the same response/behavior despite the zero gains for current control on one of them. The issue seems to be consistent with one specific axis, since swapping motors or encoders doesn’t address any of that. See below for motor object values after calibration.

Additionally, a separate issue is that, even if I set startup_motor_calibration or startup_encoder_index_search to true, there appears to be no response when rebooting the Odrive. However, if setting startup_encoder_offset_calibration or startup_closed_loop_control gives the appropriate response.

Bad calibration motor object object.

>>> od.right_axis.motor
error = 0x0000 (int)
armed_state = 0 (int)
is_calibrated = True (bool)
current_meas_phB = 0.04181647300720215 (float)
current_meas_phC = -0.012371301651000977 (float)
DC_calib_phB = -2.1364591121673584 (float)
DC_calib_phC = -1.3169938325881958 (float)
phase_current_rev_gain = 0.02500000037252903 (float)
thermal_current_lim = 4.651034832000732 (float)
get_inverter_temp()
current_control:
  p_gain = 0.0 (float)
  i_gain = nan (float)
  v_current_control_integral_d = 0.0 (float)
  v_current_control_integral_q = 0.0 (float)
  Ibus = 0.0 (float)
  final_v_alpha = 0.0 (float)
  final_v_beta = 0.0 (float)
  Iq_setpoint = 0.0 (float)
  Iq_measured = 0.0 (float)
  Id_measured = 0.0 (float)
  I_measured_report_filter_k = 1.0 (float)
  max_allowed_current = 60.75 (float)
  overcurrent_trip_level = 67.5 (float)
gate_driver:
  drv_fault = 0 (int)
timing_log:
  TIMING_LOG_GENERAL = 0 (int)
  TIMING_LOG_ADC_CB_I = 3062 (int)
  TIMING_LOG_ADC_CB_DC = 13062 (int)
  TIMING_LOG_MEAS_R = 0 (int)
  TIMING_LOG_MEAS_L = 0 (int)
  TIMING_LOG_ENC_CALIB = 8082 (int)
  TIMING_LOG_IDX_SEARCH = 7786 (int)
  TIMING_LOG_FOC_VOLTAGE = 8022 (int)
  TIMING_LOG_FOC_CURRENT = 0 (int)
config:
  pre_calibrated = True (bool)
  pole_pairs = 20 (int)
  calibration_current = 1.0 (float)
  resistance_calib_max_voltage = 2.0 (float)
  phase_inductance = 0.0 (float)
  phase_resistance = 0.0 (float)
  direction = 1 (int)
  motor_type = 2 (int)
  current_lim = 1.0 (float)
  inverter_temp_limit_lower = 100.0 (float)
  inverter_temp_limit_upper = 120.0 (float)
  requested_current_range = 60.0 (float)
  current_control_bandwidth = 1000.0 (float)

versus correctly calibrated motor:

>>> od.left_axis.motor
error = 0x0000 (int)
armed_state = 0 (int)
is_calibrated = True (bool)
current_meas_phB = 0.031622886657714844 (float)
current_meas_phC = 0.022771358489990234 (float)
DC_calib_phB = -2.086178779602051 (float)
DC_calib_phC = -1.472892165184021 (float)
phase_current_rev_gain = 0.02500000037252903 (float)
thermal_current_lim = 4.712416172027588 (float)
get_inverter_temp()
current_control:
  p_gain = 0.06311600655317307 (float)
  i_gain = 163.6945037841797 (float)
  v_current_control_integral_d = 0.0 (float)
  v_current_control_integral_q = 0.0 (float)
  Ibus = 0.0 (float)
  final_v_alpha = 0.0 (float)
  final_v_beta = 0.0 (float)
  Iq_setpoint = 0.0 (float)
  Iq_measured = 0.0 (float)
  Id_measured = 0.0 (float)
  I_measured_report_filter_k = 1.0 (float)
  max_allowed_current = 60.75 (float)
  overcurrent_trip_level = 67.5 (float)
gate_driver:
  drv_fault = 0 (int)
timing_log:
  TIMING_LOG_GENERAL = 0 (int)
  TIMING_LOG_ADC_CB_I = 5078 (int)
  TIMING_LOG_ADC_CB_DC = 14710 (int)
  TIMING_LOG_MEAS_R = 0 (int)
  TIMING_LOG_MEAS_L = 0 (int)
  TIMING_LOG_ENC_CALIB = 10558 (int)
  TIMING_LOG_IDX_SEARCH = 10386 (int)
  TIMING_LOG_FOC_VOLTAGE = 10498 (int)
  TIMING_LOG_FOC_CURRENT = 0 (int)
config:
  pre_calibrated = True (bool)
  pole_pairs = 20 (int)
  calibration_current = 1.0 (float)
  resistance_calib_max_voltage = 2.0 (float)
  phase_inductance = 6.311600736808032e-05 (float)
  phase_resistance = 0.16369450092315674 (float)
  direction = 1 (int)
  motor_type = 2 (int)
  current_lim = 1.0 (float)
  inverter_temp_limit_lower = 100.0 (float)
  inverter_temp_limit_upper = 120.0 (float)
  requested_current_range = 60.0 (float)
  current_control_bandwidth = 1000.0 (float)