AXIS_STATE_CLOSED_LOOP_CONTROL is automatically changing the control mode to POSITION

Hello i am using an odrive 3.6 with a firmware v0.5.1 an i noticed that the odrive is always switching to POSITION_CONTROL when i activate the AXIS_STATE_CLOSED_LOOP_CONTROL.
the position control is working fine but if i change the mode to CONTROL_MODE_VELOCITY_CONTROL and i check the config it shows that it changed the variable but the motor is not responding to any input_vel.
velocity control never worked for me, and i dont know what is the reason.
dump_errors(odrv0) is showing no errors.

It’s because your input_mode is INPUT_MODE_TRAP_TRAJ. That mode only works with position control. For velocity control you can use INPUT_MODE_PASSTHROUGH or INPUT_MODE_POS_FILTER.

1 Like

Thank you man you are right, it works great now ^^

Hi there,

Note input_mode is set to 5 (TRAP_TRAJ) - this can’t be used in velocity mode, only PASSTHROUGH and VEL_RAMP

1 Like