Torque seems clamped (or current)

So here’s my problem,

I use the controller in torque mode (input mode = passthrough). When I send a command the torque or the current is limited. I have checked every limit and can’t find which one make this happening. I even looked at the temperature settings because I know it can limit the current if the controller gets too hot, but it’s not my case. Also, I’m pretty static, so speed limit isn’t the problem either.
When it’s coming to input_torque = -33, torque_setpoint = -8.25 and effective_torque_setpoint = -4, there is clearly something wrong in this.

Here’s a summary of the important settings and below the figure all of them.

odrv0.config.dc_max_positive_current = 50
odrv0.config.dc_max_negative_current = -5

odrv0.axis0.config.motor.current_soft_max = 55 # [A]
odrv0.axis0.config.motor.current_hard_max = 60 # [A]

odrv0.axis0.config.torque_soft_max = 10
odrv0.axis0.config.torque_soft_min = -10

And on this figure, I don’t get any error, it’s just that torque or current is limited.
Capture13

In [89]: odrv0.axis0
Out[89]:
active_errors: 0 (uint32)
commutation_mapper:
  config: ...
  pos_abs: 0.034189581871032715 (float)
  pos_rel: 0.8678468465805054 (float)
  status: 0 (uint8)
  vel: 0.0 (float)
config:
  I_bus_hard_max: inf (float)
  I_bus_hard_min: -inf (float)
  calib_range: 0.019999999552965164 (float)
  calib_scan_distance: 8.0 (float)
  calib_scan_vel: 2.0 (float)
  calibration_lockin: ...
  can: ...
  commutation_encoder: 8 (uint8)
  dir_gpio_pin: 9 (uint16)
  enable_error_gpio: False (bool)
  enable_step_dir: False (bool)
  enable_watchdog: True (bool)
  encoder_bandwidth: 100.0 (float)
  error_gpio_pin: 12 (uint16)
  general_lockin: ...
  index_search_at_target_vel_only: False (bool)
  load_encoder: 8 (uint8)
  motor: ...
  sensorless_ramp: ...
  startup_closed_loop_control: False (bool)
  startup_encoder_index_search: False (bool)
  startup_encoder_offset_calibration: False (bool)
  startup_homing: False (bool)
  startup_max_wait_for_ready: 3.0 (float)
  startup_motor_calibration: False (bool)
  step_dir_always_on: False (bool)
  step_gpio_pin: 8 (uint16)
  torque_soft_max: 10.0 (float)
  torque_soft_min: -10.0 (float)
  watchdog_timeout: 1.0 (float)
controller:
  anticogging_valid: False (bool)
  autotuning: ...
  autotuning_phase: 0.0 (float)
  config: ...
  effective_torque_setpoint: -4.0 (float)
  electrical_power: -2.4176650047302246 (float)
  input_pos: 0.0 (float)
  input_torque: -33.268096923828125 (float)
  input_vel: 0.0 (float)
  mechanical_power: -2.788583944006386e-43 (float)
  move_incremental(obj: object_ref, displacement: float, from_input_pos: bool)
  pos_setpoint: 0.0 (float)
  start_anticogging_calibration(obj: object_ref)
  torque_setpoint: -8.25 (float)
  trajectory_done: True (bool)
  vel_integrator_torque: 0.0 (float)
  vel_setpoint: 0.0 (float)
current_state: 1 (uint8)
disarm_reason: 0 (uint32)
disarm_time: 6539.076171875 (float)
interpolator:
  config: ...
  interpolation: 0.034189581871032715 (float)
  status: 0 (uint8)
is_armed: False (bool)
is_homed: False (bool)
last_drv_fault: 0 (uint32)
max_endstop:
  config: ...
  endstop_state: False (bool)
mechanical_brake:
  config: ...
  engage(obj: object_ref)
  release(obj: object_ref)
min_endstop:
  config: ...
  endstop_state: False (bool)
motor:
  acim_estimator: ...
  alpha_beta_controller: ...
  effective_current_lim: 55.0 (float)
  fet_thermistor: ...
  foc: ...
  input_id: 0.0 (float)
  input_iq: 0.0 (float)
  motor_thermistor: ...
  resistance_calibration_I_beta: 0.0 (float)
  sensorless_estimator: ...
pos_vel_mapper:
  config: ...
  pos_abs: 0.0 (float)
  pos_rel: 12.786108016967773 (float)
  status: 9 (uint8)
  vel: 0.0 (float)
procedure_result: 2 (uint8)
requested_state: 0 (uint8)
set_abs_pos(obj: object_ref, pos: float) -> delta_pos_ref: float
step_dir_active: False (bool)
steps: 0 (int64)
task_times:
  acim_estimator_update: ...
  can_heartbeat: ...
  controller_update: ...
  current_controller_update: ...
  current_sense: ...
  endstop_update: ...
  motor_update: ...
  open_loop_vector_generator_update: ...
  pwm_update: ...
  sensorless_estimator_update: ...
  thermistor_update: ...
trap_traj:
  config: ...
watchdog_feed(obj: object_ref)

EDIT : finally found why torque was limited :


Hence,
The torque mode velocity limiter can be completely disabled by setting:

odrv0.axis0.controller.enable_torque_mode_vel_limit = False

But be careful when disactivating this setting because there no more speed limit.

1 Like

Link to relevant docs for posterity: Getting Started — ODrive Pro Documentation 0.6.4 documentation

1 Like