Question about Odrive's Torque control mode

Hi I am wondering the specifics of the torque control mode for Odrive, particularly:

  1. how does it work exactly? Do I input a specific torque and then Odrive will convert that value into PWM to input to the motor
  2. is it possible for me to input a specific torque for the motor to output through some kind of communication method such as CAN from an external MCU? if so, how frequent can I change it? I am looking to build a custom controller for a robot arm project I am working on and I need to constantly update the torque values for the motor to output
  1. You have to tell the ODrive what the torque constant of the motor is (in N-m / A). So it just divides the torque command by this value to get a value in Amps. Then it uses Field Oriented Control (FOC) to do the current control in the motor.

  2. The current control loop runs at 8kHz, and in theory you can update the target every loop, but that would fully saturate a CAN bus and you probably don’t need it quite that fast :stuck_out_tongue:

Check out the docs. We support USB, UART, and CAN

Ok, thanks, that makes sense!