New control interface (input_mode) not working correctly


I have recently updated the firmware of the Odrive 3.6-56V board to 12-devel branch for CAN development, and I am aware of the change in the control interface mentioned in this CHANGELOG

With this new firmware, I was able to pass the FULL_STATE_CALIBRATION without any error.
I then ran following code to set the motor into velocity control
odrv0.axis0.controller.input_vel = 20000
The motor did start turning, but only at an extremely slow speed. Increasing the input_vel and vel_limit didn’t make it faster.

I have been using this Odrive board with firmware version 11 for a while and there was no problem.

I was wondering if you can help me with this issue, and let me know if you need more information.

Here is the odrv0.axis0.controller results:

error = 0x0000 (int)
input_pos = 0.0 (float)
input_vel = 20000.0 (float)
input_current = 0.0 (float)
pos_setpoint = 0.0 (float)
vel_setpoint = 0.0 (float)
current_setpoint = 0.0 (float)
trajectory_done = True (bool)
vel_integrator_current = 0.0 (float)
anticogging_valid = False (bool)
gain_scheduling_width = 10.0 (float)
enable_vel_limit = True (bool)
enable_current_mode_vel_limit = True (bool)
enable_gain_scheduling = False (bool)
enable_overspeed_error = True (bool)
control_mode = 3 (int)
input_mode = 2 (int)
pos_gain = 20.0 (float)
vel_gain = 0.0005000000237487257 (float)
vel_integrator_gain = 0.0010000000474974513 (float)
vel_limit = 20000.0 (float)
vel_limit_tolerance = 1.2000000476837158 (float)
vel_ramp_rate = 10000.0 (float)
current_ramp_rate = 1.0 (float)
homing_speed = 2000.0 (float)
inertia = 0.0 (float)
axis_to_mirror = 255 (int)
mirror_ratio = 1.0 (float)
load_encoder_axis = 0 (int)
input_filter_bandwidth = 2.0 (float)
anticogging: …
move_incremental(displacement: float, from_goal_point: bool)

Never mind, I just found out that I also need to set odrv0.axis0.controller.control_mode to be velocity control as well. So how exactly is this a simplified control interface?

1 Like

In your case, you just want to make input_mode = INPUT_MODE_PASSTHROUGH (value 1 I think?). Value 2 is INPUT_MODE_VELOCITY_RAMP, which limits the ramp rate of the velocity according to config.vel_ramp_rate, which may or may not be what you want.

So how exactly is this a simplified control interface?

We used to have the following values &/or functions which could potentially cause motion:

  • Pos_setpoint
  • vel_setpoint
  • current_setpoint
  • set_pos_setpoint(pos, vel, current)
  • set_vel_setpoint(vel, current)
  • set_current_setpoint(current)
  • move_to_pos(pos)
  • move_incremental(distance, from_goal_point)


  • Control Mode (Pos/Vel/Current/Voltage)

And I think I’m forgetting some. Now we have

  • input_pos
  • input_vel
  • input_current


  • Control Mode (Pos/Vel/Current/Voltage)
  • Input Mode (Many)

We’re considering Control Mode and just making input mode more explicit