Torque control not work

I am trying to use odrv0.axis0.controller.input_torque to control my motor, the problem is that whatever Nm that I input, the odrv0.axis0.motor.current_control.Iq_measured and odrv0.axis0.motor.current_control.Iq_setup is around 0.5 A, In my opinion, it should give me a constant number that keeps the motor having Nm that I input, and when I push the motor, the current keeps going up and stop and 1A.
I don’t know the problem is
This is my motor config:

controller config:
anticogging_enabled: True (bool)
calib_anticogging: False (bool)
calib_pos_threshold: 1.0 (float)
calib_vel_threshold: 1.0 (float)
cogging_ratio: 1.0 (float)
index: 0 (uint32)
pre_calibrated: False (bool)
axis_to_mirror: 255 (uint8)
circular_setpoint_range: 1.0 (float)
circular_setpoints: False (bool)
control_mode: 1 (uint8)
electrical_power_bandwidth: 20.0 (float)
enable_gain_scheduling: False (bool)
enable_overspeed_error: True (bool)
enable_torque_mode_vel_limit: True (bool)
enable_vel_limit: True (bool)
gain_scheduling_width: 10.0 (float)
homing_speed: 0.25 (float)
inertia: 0.0 (float)
input_filter_bandwidth: 2.0 (float)
input_mode: 1 (uint8)
load_encoder_axis: 0 (uint8)
mechanical_power_bandwidth: 20.0 (float)
mirror_ratio: 1.0 (float)
pos_gain: 18.0 (float)
spinout_electrical_power_threshold: 10.0 (float)
spinout_mechanical_power_threshold: -10.0 (float)
steps_per_circular_range: 1024 (int32)
torque_mirror_ratio: 0.0 (float)
torque_ramp_rate: 0.009999999776482582 (float)
vel_gain: 0.14000000059604645 (float)
vel_integrator_gain: 0.0 (float)
vel_integrator_limit: inf (float)
vel_limit: 1.0 (float)
vel_limit_tolerance: 1.2000000476837158 (float)
vel_ramp_rate: 1.0 (float)

It looks like you did not change the control mode. I haven’t worked with torque mode, but you can try odrv0.axis0.controller.config.control_mode = CONTROL_MODE_TORQUE_CONTROL

1 Like

thank you, but iam pretty sure mode 1 is the torque control mode.

1 Like

Did you follow these instructions? Control Modes — ODrive Documentation 0.0 documentation