ODrive Control Law

Hi All!,
I am currently developing a robot that uses brushless dc motors, and the ODrive appears to be perfect for my application. My project involves adaptative control based on real time data input. I read that the ODrive is based on a PID controller, Is there any way of changing the ODrive control law?

Thanks in advance.

The ODrive firmware is open source. Knock yourself out! :stuck_out_tongue_winking_eye:

If you’d prefer not to dabble in real-time embedded C++ code, then you could always send control commands in torque mode, and implement your controller off-board in Python for example. USB or CAN comms may be fast enough, depending on what you need to do.

The ODrive control law works as described here:

You can run in any of four modes:

  • Position Control (uses all loops)
  • Velocity Control (uses only current & velocity loops)
  • Current Control (uses only current control loop)
  • Voltage Mode (aka Gimbal Mode) (open loop voltage control)